I am running an application PHPlist on my linode server, simultaneously running 12 PHP scripts, each of which opens a MySQL connection. Now when I access PHPlist it often shows this error:
Fatal Error: Sorry, the server is currently too busy, please try again
When I am trying to access phpMyAdmin, it shows me a #1040 error.
Output of my PHP scripts which run through
cron jobs shows:
PHP Warning: mysqli_connect(): (HY000/1040): Too many connections
I am using the LAMP stack on the server with phpMyAdmin; the
top output in terminal shows
mysqld using 100-130% CPU. When I am trying to troubleshoot this problem I got some clues:
- Increase max_connection variable : I am using 200 (100 by default)
- Open table cache: 512 (400 by default)
There are lots of variables to set but I can't determine what specific ones, I am getting some reference from:
too many connections
But according to my usage how to increase memory and what is the maximum memory difficult for me.
On my server I am using around 12 PHP scripts, PHPlist application for sending emails, and a major database for user registrations.
Kindly help me to resolve this problem.