I’ve one website built using WordPress and it sometimes throw an error like:
Warning: mysql_connect(): Can’t connect to local MySQL server through
socket ‘/var/lib/mysql/mysql.sock’ (2) in
…/public_html/wp-includes/wp-db.php on line 1372
When I made search for this issue, all answers justifying that this is problem from server side and not in coding. So I’ve contacted the server support team and they answered that it is an issue caused by memory use and answered “MySQL processes are using a lot of memory and getting OOM kills from the node“
So can anyone please tell me that what should I do to solve the issue, I asked server support team to increase memory size the they denied.