MySQL Errcode: 122 when creating databases after update

14 posts / 0 new
Last post
#1 Sun, 09/20/2009 - 09:15
Deviation

MySQL Errcode: 122 when creating databases after update

I've run into a bit of a snag after updating MySQL via Virtualmin. Any time I go to create a table, I get the following error:

#3 - Error writing file './DB_NAME/TABLE_NAME.frm' (Errcode: 122)

From what I've looked at thus far, I know its a quota issue. The first thing I did was create a new plan with unlimited quotas. I applied that to my virtual server without any luck. So I checked my limits with ulimit. It shows unlimited for mysql, the user account, and root.

I'm stuck. Any help would be appreciated. This wasn't an issue before the Virtualmin updates.

CentOS 5.2 x64 Virtualmin GPL 3.73 MySQL 5.0.77

Sun, 09/20/2009 - 11:00
andreychek

Hrm, well, as you've seen, that error definitely appears to be a quota or space error.

Are you sure you have enough space in /var (or specifically, /var/lib/mysql)?

Although this doesn't typically happen, you might want to verify that the mysql user doesn't have a quota set on it -- you can verify that by typing "quota -v mysql".

Next -- for the group of the Virtual Server you're creating -- what does "quota -g GROUPNAME" show?

-Eric

Sun, 09/20/2009 - 12:10
Deviation

quote -v mysql shows: Disk quotas for user mysql (uid 27): Filesystem blocks quota limit grace files quota limit grace /dev/xvda 101172 0 0 978 0 0

quota -g GROUPNAME shows: Filesystem blocks quota limit grace files quota limit grace /dev/xvda 1752600* 1048576 1048576 131 0 0

If i'm reading that correctly, its showing a 1GB quota?

There's 8GB free on the system.

Sun, 09/20/2009 - 12:22
andreychek

Mmm, yeah, looks like the group for your Virtual Server is using 1.7GB, but the quota is set to 1GB.

-Eric

Sun, 09/20/2009 - 16:42 (Reply to #4)
Deviation

So how do I get rid of the quota? I thought creating a new plan with no quota and assigning it to the user would work.

Sun, 09/20/2009 - 16:46
andreychek

Well, go into Edit Virtual Server -> Quotas and limits, and make sure the quota showing up there is what you'd expect to see.

-Eric

Sun, 09/20/2009 - 16:48
Deviation

Nevermind. Figured it out. Not real sure why the plan wouldn't update it though.

Sun, 09/20/2009 - 17:26
andreychek

In Edit Virtual Server, next to the Account Plan dropdown, there's a checkbox labeled "Apply limits from new plan if changed".

Is it possible that wasn't selected when choosing a new account plan?

-Eric

Sun, 09/20/2009 - 19:47 (Reply to #8)
Deviation

I made sure that was checked when I changed it. I just tested changing plans on other vservers and it seems to work ok. It also seems to work ok on this vserver now for some reason.

ahh well.

Mon, 09/21/2009 - 07:13
Deviation

I think I've figured out the cause. It appears that since teh 3.73gpl upgrade, Virtualmin actually started enforcing quotas that were a part of the Default Plan. Not sure why they weren't working before, but I just ran into this on another vserver.

Sun, 04/25/2010 - 11:17
carmelo

I actually just ran into this problem this morning.

Even though my Plan was set to unlimited - for some reason my User and Group we're both set to 1GB.

Did a Google search and came to this post - really helped pin point my issue.

Thu, 09/13/2012 - 06:34
thatch

i'm the admin of an unmanaged rackspace cloud server hosting probably 50 active creative pages at any time and this morning I ran into this very problem.

Basically i was getting the error:

'HY000, 1114, The table 'xxxxxxxx is full'

And this meant no users could save their details to our creative pages..

I tried about a half dozen things before i stumbled across this page and did the quota -g trick which showed me that the user/group account for our server had a soft limit of 1gb (default to virtualmin for new accounts) even though in the server options it was set to unlimited.

I increased this to 50gig and everything works. I created this account just to say a massive thanks for this help, without it the server would have been offline for a lot longer.

Cheers

Thu, 09/13/2012 - 08:24
andreychek

Howdy,

Thanks for posting your experiences!

I've tried to test this, by changing the default account plan to have an unlimited quota, and then creating a new user using that account plan.

When I do that, it's correctly created with no quota.

So I'm struggling to reproduce what you're running into there! I believe you're having an issue though, and I'd love to get to the bottom of it so other folks don't run into that.

I had a few questions --

  • What distro/version is it that you have?

  • Was this account created after the quota in the plan was set to unlimited (that is, changing the quota in the plan wouldn't necessarily update the quota for existing domains)

  • Which plan is set to unlimited -- is it the default plan? Or did you have a custom plan that you assigned? Both should work, I'm just trying to reproduce the exact circumstances there.

Thanks!

-Eric

Thu, 09/13/2012 - 09:37 (Reply to #13)
thatch

Hi Eric,

The problem is sorted now thanks to your earlier advice re: quota -g etc.

I had assumed that the controls in virtualmin -> edit virtual server -> quota also controlled the group and user associated with that virtual.

To fix i went into webmin -> users and groups and manually increased the quota via there.

Funny how this thread ended 2 years ago yet was invaluable to me thanks to it being a top result in google.

Cheers

Topic locked