- A website hosted on a Plesk for Linux server performs slowly: loading takes more time than usual.
Some websites have database connection errors.
Load Average of the server greatly exceeds CPU cores count:
00:08:20 up 50 days, 21:34, 3 users, load average: 21,67, 21,59, 17,62
# grep -c ^processor /proc/cpuinfo
Most of the CPU power is consumed by PHP:
# ps -o pcpu,cmd -e –sort pcpu | tail -n5
11.0 /opt/plesk/php/5.3/bin/php-cgi -c /var/www/vhosts/system/example.com/etc/php.ini
16.3 /opt/plesk/php/5.3/bin/php-cgi -c /var/www/vhosts/system/example2.com/etc/php.ini
17.2 /opt/plesk/php/5.3/bin/php-cgi -c /var/www/vhosts/system/example3.com/etc/php.ini
26.1 /opt/plesk/php/5.3/bin/php-cgi -c /var/www/vhosts/system/example4.com/etc/php.ini
29.4 /opt/plesk/php/5.3/bin/php-cgi -c /var/www/vhosts/system/example5.com/etc/php.ini
Following errors can be found in error log of the Apache for subscription,
mod_fcgid: read data timeout in 45 seconds
End of script output before headers: index.php
mod_fcgid: ap_pass_brigade failed in handle_request_ipc function
Similar errors can be found in the log file
DB Error: SQLSTATE  Too many connections in /usr/share/psa-roundcube/program/lib/Roundcube/rcube_db.php on line 173 (POST /?_task=mail&_action=refresh)
DB Error:  Lock wait timeout exceeded; try restarting transaction <...>
There are not enough resources on server, thus new visitors have to wait until CPU can generate a page for them.
This is reflected by high Load Average values, which should rarely exceed CPU cores count.
The following options are available:
- Migrate to a more powerful server, or move some websites to a different server.
- If WordPress, or Joomla! is used, install and set up third party static page caching plugins, such as JotCache for Joomla! and WP Super Cache for WordPress.
- Enable nginx dynamic cache to decrease calls to the PHP backend: How to enable NGINX (Byte-Range) Caching in Plesk?