Plesk

WordPress admin page is slow: Connection reset by peer: mod_fcgid: error reading data from FastCGI server

Note: the article requires advanced technical expertise. Consider contacting your hosting provider.

Symptoms

  1. WordPress is installed on Plesk server. Login to WordPress admin page is slow.
  2. Errors in /var/www/vhosts/system/example.com/logs/error_log:

    [warn] [client 203.0.113.2] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server, referer: https://example.com/wp-admin/
    [error] [client 203.0.113.2] Premature end of script headers: edit-comments.php, referer: https://example.com/wp-admin/

  3. Stracing Apache processes shows the following:

    # for fn in `ps fax | grep -i /usr/sbin/httpd | grep -v grep | awk '{ print $1 } '` ; do strace -fF -tT -s102400 -o /tmp/strace.log -p $fn & done
    wait for it...
    # for PID in `ps awufx | grep strace | grep -v grep | awk '{print $2}'` ; do kill -9 $PID ; done
    # grep plugins /tmp/strace.log | grep such
    32335 02:12:05 lstat("/var/www/vhosts/example.com/httpdocs/test_rp/wp-content/languages/plugins/woocommerce-en_US.mo", 0x7ffe87108a60) = -1 ENOENT (No such file or directory) <0.000015>

Cause

Corrupted WordPress plugins. In the example above, WooCommerce plugin.

Resolution

  1. Log in to Plesk 
  2. Deactivate one by one all plugins for the website at Domains > example.com > WordPress > Plugins until the issue is fixed.
  3. Re-install or delete the plugin, identified on the previous step.