3

I've done quite a bit of reading before asking this, so let me preface by saying I am not running out of connections, or memory, or cpu, and from what I can tell, I am not running out of file descriptors either.

Here's what PHP throws at me when MySQL is under moderate load:

Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (11 "Resource temporarily unavailable")

This happens randomly under moderate load - but the more I push, the more frequently php throws this at me. While this is happening I can always connect locally through the console and from PHP through 127.0.0.1 instead of "localhost" which uses the faster unix socket.

Here's a few system variables to weed out the usual problems:

cat /proc/sys/fs/file-max = 4895952
lsof | wc -l = 215778 (during "outages")
Highest usage of available connections: 26% (261/1000)

InnoDB buffer pool / data size: 10.0G/3.7G (plenty o room)

soft nofile 999999
hard nofile 999999

I am actually running MariaDB (Server version: 10.0.17-MariaDB MariaDB Server)

These results are generated both under normal load, and by running mysqlslap during off hours, so, slow queries are not an issue - just high connections.

Any advice? I can report additional settings/data if necessary - mysqltuner.pl says everything is a-ok

and again, the revealing thing here is that connecting via IP works just fine and is fast during these outages - I just can't figure out why.

closed as off-topic by Colin 't Hart, hot2use, Md Haidar Ali Khan, RDFozz, Max Vernon Jul 31 '18 at 15:55

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Too localized - this could be because your code has a typo, basic error, or is not relevant to most of our audience. Consider revising your question so that it appeals to a broader audience. As it stands, the question is unlikely to help other users (regarding typo questions, see this meta question for background)." – Colin 't Hart, hot2use, Md Haidar Ali Khan, RDFozz, Max Vernon
If this question can be reworded to fit the rules in the help center, please edit the question.

0

Error 11 in unix is a segmentation fault error. Either the server has bad memory chips installed or you are making other configuration values too much for the server to handle.

I once experimented with setting the nofile value in linux to a value like yours and my whole server crashed. Now I make nofile set to maybe 40000 tops. Try that, then reboot the server to see if the problem goes away.

  • Thanks for the feedback, Mike. Errors are contextual, in this case error 11 is simply "Resource temporarily unavailable" and is not a segfault. The nofile value was at a lower level before, and I changed it simply to see if I was running out of file descriptors - I was not. The server has plenty of free ram available, I graph all of my metrics with Zabbix and watch them closely from the command line. – Chad E. Mar 6 '15 at 13:39

Not the answer you're looking for? Browse other questions tagged or ask your own question.