• Yohan Perera

    (@thevirtualpreacher)


    My blog randomly throws the following error upon visiting.

    ‘Resource Limit Exceeded’

    The meaning is obvious to me and upon speaking with my hosting provider I was instructed to optimize my WordPress theme.

    I can hire a developer to do it for me however wanted to check with the WordPress community first.

    Given below are replies by the hosting provider to support tickets I opened.

    1st reply

    I have checked the domain http://virtualpreacher.org/ and found that it is now loading. I checked tyhe logs and found the following error messages:


    [Wed Jan 30 08:26:10 2013] [warn] [client 115.114.17.146] mod_fcgid: can’t apply process slot for /usr/local/cpanel/cgi-sys/php-fcgi
    [Wed Jan 30 08:27:14 2013] [warn] [client 115.114.17.146] mod_fcgid: can’t apply process slot for /usr/local/cpanel/cgi-sys/php-fcgi
    [Wed Jan 30 08:27:31 2013] [warn] [client 115.114.17.146] mod_fcgid: can’t apply process slot for /usr/local/cpanel/cgi-sys/php-fcgi

    The issue that you are facing is mainly due to the number of fcgi processes that your site seems to be running simultaneously.

    We allow 3 child process and for each child process, 256 worker processes. Once that limit is breached, you see that kind of error. However, those errors are auto-fixed once the number of processes reduce.

    However I would request you to contact web-developer to optimize the website code.

    2nd reply

    On checking, I could see that the entry processes were full. There were some zombie processes under the user. I have now killed the zombie processes.

    Also I could see that many database queries were killed due to higher execution time. Please note that the query timeout set on our servers is 15 secs and all queries which take more time will be killed.

    —–
    Jan 31 00:59:22 cp-3 mkill[41699]: killed: thread_id: 20205366 user: virtudwt_wrdp1 host: localhost db: virtudwt_wrdp1 cmd: Sleep time: 20 query:
    —–

    We recommend you to contact your web-developer and get your website pages and database queries optimized. You will have to check the code with your developer to find the exact culprit.

    3rd reply

    The parent process for the zombie process was the apache process which was processing the connections. I have now killed the parent process.

    Do you see anything in these replies which I should consider before hiring a developer???

Viewing 3 replies - 1 through 3 (of 3 total)
  • Also I could see that many database queries were killed due to higher execution time. Please note that the query timeout set on our servers is 15 secs and all queries which take more time will be killed.

    A caching plugin will probably help and I see you have Super Cache installed and your home page is loading pretty fast for me.

    There could be some background cron processes that are clogging up the database and php connections. Also the most popular and most emailed sections are probably using some very inefficient queries. A good developer can optimize those for you or add some internal transient caching. Database queries should never take longer than a second or 2 at the very most.

    Thread Starter Yohan Perera

    (@thevirtualpreacher)

    Thanks Chris. I will give it a try…

    Thread Starter Yohan Perera

    (@thevirtualpreacher)

    OK. I tried 2 solutions after which the site kicked back to life within the next 30 minutes. Since then I have been monitoring the site status very closely for more than a week now and the problem has not returned. I am not sure which one was the solution so I will explain both approaches.

    1. If you are on cPanel, login and locate the category titled ‘Databases’ and the sub category titled ‘MySQL databases’. Open it and there are 2 buttons under the function ‘Modify Databases’. Namely ‘Check DB’ and ‘Repair DB’ Press these buttons one at a time to check the integrity of your DB and repair it. Don’t worry if the checks didn’t return any errors.

    2. Within less than a minute of performing the above I installed WP-DBManager plugin by Lester Chan and used it to optimize and repair the Database.

    Hope this will help if your blog is suffering from the same issue.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Resource Limit Exceeded’ is closed to new replies.