500 Internal Server Error after a week

8 posts / 0 new
Last post
#1 Sat, 01/21/2012 - 01:28
alexandralin

500 Internal Server Error after a week

I just moved my WP blog from shared hosting to my VPS, file: 2.6 G, database: 23 tables,177,060 row, size: 90.4 MiB. I use CentOS Linux 5.7. This my first experience use VPS. The site run well in VPS for a week, but yesterday I got the error message: 500 Internal Server Error. I never made a new post or add a new plugin in this period.

I have done as below and still get 500 Internal Server Error

  1. I have refresh with F5 and have changed my .htaccess to be htaccess.txt

  2. In Virtualmin, I have changed:

  • I created a new account plan with quota 4GB and edit virtual server. I changed Total Server Quota and Server Administrator's Quota to be Unlimited.

  • I changed memory_limit in PHP (Service-Configure Website) to be 1024M

  • In PHP 5 Configuration, I have changed :

    • MySQL connection timeout? to be 1000 seconds
    • Maximum memory allocation to be 500M
    • Maximum file upload size to be 50M
    • Maximum input parsing time to be 60 seconds
  • In Website Options:

    • PHP script execution mode: FCGId (run as virtual server owner)
    • Maximum PHP script run time, I changed to be Unlimited
  • Apache error log

[Sat Jan 21 13:36:08 2012] [warn] mod_fcgid: read data timeout in 31 seconds

[Sat Jan 21 13:36:08 2012] [error] [client 157.55.17.145] Premature end of script headers: index.php

[Sat Jan 21 13:36:19 2012] [warn] mod_fcgid: read data timeout in 31 seconds

[Sat Jan 21 13:36:19 2012] [error] [client 220.181.94.227] Premature end of script headers: index.php

[Sat Jan 21 13:36:21 2012] [warn] mod_fcgid: read data timeout in 31 seconds

[Sat Jan 21 13:36:21 2012] [error] [client 157.55.18.23] Premature end of script headers: index.php

[Sat Jan 21 13:36:38 2012] [warn] (104)Connection reset by peer: mod_fcgid: read data from fastcgi server error.

[Sat Jan 21 13:36:38 2012] [error] [client 66.249.72.38] Premature end of script headers: index.php

[Sat Jan 21 13:36:38 2012] [warn] (104)Connection reset by peer: mod_fcgid: read data from fastcgi server error.

[Sat Jan 21 13:36:38 2012] [error] [client 66.249.72.38] Premature end of script headers: index.php

[Sat Jan 21 13:38:01 2012] [warn] mod_fcgid: read data timeout in 31 seconds

[Sat Jan 21 13:38:01 2012] [error] [client 207.46.204.188] Premature end of script headers: index.php

[Sat Jan 21 13:39:02 2012] [warn] mod_fcgid: read data timeout in 31 seconds

[Sat Jan 21 13:39:02 2012] [error] [client 66.249.72.38] Premature end of script headers: index.php

[Sat Jan 21 13:39:39 2012] [warn] mod_fcgid: read data timeout in 31 seconds

[Sat Jan 21 13:39:39 2012] [error] [client 66.249.72.38] Premature end of script headers: index.php

[Sat Jan 21 13:39:59 2012] [warn] mod_fcgid: read data timeout in 31 seconds

[Sat Jan 21 13:39:59 2012] [error] [client 207.46.13.95] Premature end of script headers: index.php

[Sat Jan 21 13:40:13 2012] [warn] mod_fcgid: read data timeout in 31 seconds

[Sat Jan 21 13:40:13 2012] [error] [client 66.249.72.38] Premature end of script headers: index.php

In the WebMin, I changed PHP configuration:

  • MySQL connection timeout? 180 seconds

  • Maximum memory allocation 256M

  • Maximum file upload size 2M

Can you help me how to solve this problem?

Thank you in advance.

Kind regards,

Sat, 01/21/2012 - 15:10
andreychek

Howdy,

Well, it appears as if your application is taking longer than 30 seconds to respond, so it's timing out. That implies some sort of problem with the application.

However, just to rule this out, you might try going into Server Configuration -> Website Options, and setting the PHP Execution Mode to "CGI".

-Eric

Sun, 01/22/2012 - 10:51
alexandralin

Hi Eric,

Thanks for your kind respond...

I have changed the setting to CGI and still get 500 error...

Any idea to solve it... :-)

Kind regards,

Mon, 01/23/2012 - 13:43
alexandralin

Hi all,

Can someone help me to solve this problem...???

Thanks and regards,

Mon, 01/23/2012 - 14:08
andreychek

You appear to be dealing with an application issue of some sort -- so correcting that will involve troubleshooting that specific application.

Your application is taking longer than 30 seconds to respond, so the key will be determining why it's responding so slowly.

That could be related to a configuration problem with your application, a malfunctioning plugin, or some similar problem.

Just to make sure Apache is working, you could create a test script with the name test.php in your public_html folder:

<div class="codeblock"><pre><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />&nbsp;phpinfo</span><span style="color: #007700">(); <br /></span><span style="color: #0000BB">?&gt;</span></span></code></pre></div>

And then access that test.php script from your web browser.

If that works, I'm not sure that we're going to be able to help you -- you may want to ask the support community for your application.

-Eric

Tue, 01/24/2012 - 06:15 (Reply to #5)
alexandralin

Thanks for your kind help Eric,

I have create text.php and I can access the page from browser.

May I know what do you mean with application? I use Wordpress, do you mean its plugin?

If the problem come from plugin, what do you think If I delete all plugins from file manager?

Thanks for your time to help me.

Kind regards, Leo

Tue, 01/24/2012 - 08:21
andreychek

Howdy,

If the problem come from plugin, what do you think If I delete all plugins from file manager?

Well, I don't know what the problem you're having is, if it's related to a plugin -- but since the test.php script works, it looks like the problem you're having is somehow related to WordPress.

So as a troubleshooting step, you may want to try removing one or more plugins from your WordPress setup (amongst other things).

I'm not a WordPress guru, so I won't really be able to resolve the issue for you, but I did find this FAQ here on how to disable WordPress plugins:

http://codex.wordpress.org/FAQ_Troubleshooting#How_to_deactivate_all_plu...

Mon, 03/12/2012 - 09:27
gustavox4ids

Hello all!

I had this same problem, and in my apache log messages appeared;

"mod_fcgid: read data timeout in 31 seconds"

"Premature end of script headers: index.php"

I solved my problem by upgrading PHP for PHP version 5.4.

Currently, to install PHP 5.4 on ubuntu is possible using the repository https://launchpad.net/~ondrej/+archive/php5

But I warn you, it worked perfectly on a clean install of Ubuntu 11.10 risking if you install on production server, you may have problems.

These are the steps:

sudo add-apt-repository ppa:ondrej/php5

sudo apt-get update

sudo apt-get install php5

You can check if PHP 5.4.0 is successfully installed with this command:

php5 -v

That's it!

Topic locked