MySQL server stopped working - error 24


I have a problem with my MySQL server on my Virtualmin installation. All of a sudden, websites running on a CMS do not work anymore. I went inside Virtualmin and tried to look inside the database.

When I go to Edit databases, I get the following error when pressing ’ Manage database’:

SQL select table_schema,table_name from information_schema.views where table_schema = ? failed : Out of resources when opening file '/tmp/#sql_c91_0.MYD' (Errcode: 24) 

I get a sortlike error when entering the ‘Edit users’ menu.

SQL select user.user,user.password from user,db where db.user = user.user and (db.db = 'lilith' or db.db = 'lilith') failed : Out of resources when opening file './mysql/user.MYD' (Errcode: 24)

After I googled the error code, I came up with some earlier threads. I came as far as doing -quota -v mysql which has the following results:

Disk quotas for user mysql (uid 107): Système fichiers blocs quota limite sursisfichiers quota limite sursis /dev/disk/by-uuid/65e9b294-fad3-4c5d-8afd-b74086dea02e 83132 0 0 2073 0 0

(Sorry, my server is Francophone and I am not so I have no idea what some words are :P)

Unfortunally, this is where I get stuck as I have no idea how to proceed. I got a vague understanding that MySQL is not getting any quota at all at the moment.

I hope somebody can help me as I fear of having to revert to a severly outdated backup (that moment when you realise your backup isn’t properly configured as well…)

Further information:
It is a Debian 64 bit server

The only plausable thing I can think of what might have caused MySQL to go wrong is that I did some updates of my server OUTSIDE virtualmin in the command line instead of updating via the Virtualmin control panel.


It sounds like you may be running into an open files limit.

How many domains are you hosting on your server, out of curiosity?

And also, what distro/version is it that you’re using?


Hello Eric,

I am running 3 domains, of which all 3 are small Joomla based websites, although on that same server is a gameserver running. But also when that gameserver is not running I get that. I do think however that it started since I installed the gameserver, but it was on a seperate username/account on the server and it does not use MySQL.

Sorry I indeed forgot to mention what version I was using, it is Debian 7 64 bit ;).


That’s unusual that you’d see issues like that on a server with only 3 domains, but it may be related to what some of your websites or other content is doing behind the scenes.

I don’t think the issue was caused by you performing updates outside of Virtualmin… there’s nothing special that Virtualmin does for updates, it simply uses “apt” the same way you or I would do on the command line.

This problem sounded familiar though, and although I couldn’t find it yesterday, some digging I did today dug up a solution that I had used in the past for this particular problem.

Take a peek at my comment to this Forum post here:

Does that solution mentioned there work for you? Although in this particular case it was for a CentOS 6 system, the same sort of thing should work on Debian 7 just fine.


Hello Eric,

Unfortunally, there does not seem to be anything like


in my mysql file in that map. There is not even an ‘exec’ command. Is that a problem in there?

Should I send you my version of that file?

Well, the exact placement doesn’t really matter… if you have an init script in /etc/init.d/mysql, just place the “ulimit” line somewhere underneath the row of comments that is at the start of the file, and then restart MySQL.


You are my hero! Putting that line at the first ‘init command’ helped.

Now I will inmediatly ensure that weekly backups are made… never configured this on my ‘new’ (as in, half year old server) while I thought it was configured. :smiley: