1

I setup VESTA Control Panel for my VPS (RAM 1GB). I have trouble with Mysql server, when I test by sending about 10 - 30 requests to my site in 5 seconds, Mysql server will die and can't connect to database with errors

Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

Anybody can help me to resolve this issue ?

Update my explain:

I don't think it's duplicate question because I can restart MySQL to fix this issue (mysql.sock will be auto created) but I want to find solution , why MySQL die when have more 10 connections in 5 seconds. I think my VPS (MySQL DB) can work normally with more 10 connections in the same time, i don't think it die easily just more 10 requests

My memory

              total       used       free     shared    buffers     cached
Mem:           996        798        197          1          9         94
-/+ buffers/cache:        694        301
Swap:            0          0          0

ps aux

root     14086  0.0  2.2 166392 22708 ?        Ss   00:00   0:05 lfd - sleeping
root     17263  0.0  0.1 102084  1256 ?        Ss   03:07   0:00 sshd: root@nott
root     17265  0.0  0.0  57384  1004 ?        Ss   03:07   0:00 /usr/libexec/op
root     17297  0.0  0.1 102072  1256 ?        Ss   03:08   0:00 sshd: root@pts/
root     17304  0.0  0.1 108316  1264 pts/0    Ss   03:08   0:00 -bash
apache   17392  0.0  3.5 434008 35784 ?        S    03:09   0:02 /usr/sbin/httpd
apache   18047  0.1  3.6 433980 37044 ?        S    03:16   0:02 /usr/sbin/httpd
apache   18089  0.0  3.8 437740 38812 ?        S    03:16   0:01 /usr/sbin/httpd
apache   19337  0.1  3.7 437652 38732 ?        S    03:28   0:01 /usr/sbin/httpd
apache   19338  0.0  3.4 434236 35300 ?        S    03:28   0:01 /usr/sbin/httpd
apache   19341  0.0  3.5 434500 36260 ?        S    03:28   0:01 /usr/sbin/httpd
apache   19342  0.1  3.7 435816 38056 ?        S    03:28   0:01 /usr/sbin/httpd
apache   19971  0.1  3.5 434644 36472 ?        S    03:30   0:01 /usr/sbin/httpd
apache   19973  0.0  3.3 432676 34320 ?        S    03:30   0:01 /usr/sbin/httpd
apache   19974  0.1  3.7 435188 38396 ?        S    03:30   0:01 /usr/sbin/httpd
apache   19983  0.0  3.6 435224 37004 ?        S    03:30   0:00 /usr/sbin/httpd
postfix  20622  0.0  0.1  81532  1368 ?        S    03:32   0:00 pickup -l -t fi
apache   20899  0.1  3.6 435196 37680 ?        S    03:44   0:00 /usr/sbin/httpd
apache   20901  0.0  3.9 438104 40620 ?        S    03:44   0:00 /usr/sbin/httpd
apache   20902  0.1  3.9 437624 40720 ?        S    03:44   0:00 /usr/sbin/httpd
apache   20912  0.0  2.1 421336 22252 ?        S    03:44   0:00 /usr/sbin/httpd
apache   20914  0.0  2.1 421336 22252 ?        S    03:44   0:00 /usr/sbin/httpd
root     21083  0.0  0.1 108180  1616 pts/0    S    03:45   0:00 /bin/sh /usr/bi
mysql    21470  0.0  5.0 639988 51860 pts/0    Sl   03:45   0:00 /usr/libexec/my
root     21620  0.0  0.1 110240  1176 pts/0    R+   03:53   0:00 ps aux
Shayne
  • 65
  • 2
  • 11
  • 3
    possible duplicate : http://stackoverflow.com/questions/4448467/cant-connect-to-local-mysql-server-through-socket-var-lib-mysql-mysql-sock – Towfik Alrazihi Aug 31 '16 at 11:18
  • I don't think it's duplicate because I can restart MySQL to fix this issue but I want to find solution , why MySQL die when have more 10 connections in 5 seconds. I think my VPS (MySQL DB) can work normally with more 10 connections in the time , i don't think it die easily just more 10 requests – Shayne Sep 01 '16 at 02:05

0 Answers0