You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Nilesh Govindarajan <li...@itech7.com> on 2010/01/10 18:08:00 UTC

[users@httpd] Too many '500 Error'

I have a fedora 12 VPS with 500 MB RAM & 1 GB swap.

I've compiled Apache 2.2.14. Also using PHP 5.3.1 via FastCGI.

I've given Apache MaxClients = 500 (ThreadLimit properly set) and PHP a 
memory limit of 175M.

The problem is, some pages on my site www.itech7.com especially the 
admin interface don't load properly. It takes more than 30 secs and 
often results in an Error 500.

Where the problem is ? Drupal (site's app) or Apache ?

-- 
Nilesh Govindarajan
Site&  Server Adminstrator
www.itech7.com


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Too many '500 Error'

Posted by Tom Evans <te...@googlemail.com>.
On Mon, Jan 11, 2010 at 3:59 PM, Nilesh Govindarajan <li...@itech7.com> wrote:
> On 01/11/2010 05:12 PM, Tom Evans wrote:
>>
>> On Mon, Jan 11, 2010 at 5:28 AM, Nilesh Govindarajan<li...@itech7.com>
>>  wrote:
>>>>>>
>>>>>> No actually, all pages open. But sometimes it takes really long
>>>>>> although
>>>>>> there's no traffic out there. And I checked the log to see this -
>>>>>>
>>>>>> FastCGI: incomplete headers (0 bytes) received from server
>>>>>> "/usr/local/apache2/cgi-bin/php-cgi"
>>>>>>
>>>>> And this too-
>>>>>
>>>>> FastCGI: comm with server "/usr/local/apache2/cgi-bin/php-cgi" aborted:
>>>>> idle timeout (30 sec)
>>>>>
>>
>> The first message says that Apache tried to contact PHP over FastCGI
>> and the script did not return an appropriate response - it didn't
>> return anything. Apache will then display a 500 error.
>>
>> The second message says that Apache tried to contact PHP over FastCGI
>> and the PHP script did not return an appropriate response after the
>> idle timeout of 30 seconds. Again, Apache will display a 500 error.
>>
>> These indicate that the problem is that your PHP scripts crash and/or
>> take too long to run and sometimes fail to execute within the required
>> time limit.
>>
>> Cheers
>>
>> Tom
>>
>> ---------------------------------------------------------------------
>> The official User-To-User support forum of the Apache HTTP Server Project.
>> See<URL:http://httpd.apache.org/userslist.html>  for more info.
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>
> Well, as Daniel suggested, I tweaked MySQL and configured its caches. The
> things are smooth now.
> Any ways how to increase FastCGI script timeout ? The default is 30 I think.
>

http://lmgtfy.com/?q=mod_fastcgi+FastCGI+script+timeout

Cheers

Tom

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Too many '500 Error'

Posted by Nilesh Govindarajan <li...@itech7.com>.
On 01/11/2010 05:12 PM, Tom Evans wrote:
> On Mon, Jan 11, 2010 at 5:28 AM, Nilesh Govindarajan<li...@itech7.com>  wrote:
>>>>> No actually, all pages open. But sometimes it takes really long although
>>>>> there's no traffic out there. And I checked the log to see this -
>>>>>
>>>>> FastCGI: incomplete headers (0 bytes) received from server
>>>>> "/usr/local/apache2/cgi-bin/php-cgi"
>>>>>
>>>> And this too-
>>>>
>>>> FastCGI: comm with server "/usr/local/apache2/cgi-bin/php-cgi" aborted:
>>>> idle timeout (30 sec)
>>>>
>
> The first message says that Apache tried to contact PHP over FastCGI
> and the script did not return an appropriate response - it didn't
> return anything. Apache will then display a 500 error.
>
> The second message says that Apache tried to contact PHP over FastCGI
> and the PHP script did not return an appropriate response after the
> idle timeout of 30 seconds. Again, Apache will display a 500 error.
>
> These indicate that the problem is that your PHP scripts crash and/or
> take too long to run and sometimes fail to execute within the required
> time limit.
>
> Cheers
>
> Tom
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See<URL:http://httpd.apache.org/userslist.html>  for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>     "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>

Well, as Daniel suggested, I tweaked MySQL and configured its caches. 
The things are smooth now.
Any ways how to increase FastCGI script timeout ? The default is 30 I think.

-- 
Nilesh Govindarajan
Site & Server Adminstrator
www.itech7.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Too many '500 Error'

Posted by Tom Evans <te...@googlemail.com>.
On Mon, Jan 11, 2010 at 5:28 AM, Nilesh Govindarajan <li...@itech7.com> wrote:
>>>> No actually, all pages open. But sometimes it takes really long although
>>>> there's no traffic out there. And I checked the log to see this -
>>>>
>>>> FastCGI: incomplete headers (0 bytes) received from server
>>>> "/usr/local/apache2/cgi-bin/php-cgi"
>>>>
>>> And this too-
>>>
>>> FastCGI: comm with server "/usr/local/apache2/cgi-bin/php-cgi" aborted:
>>> idle timeout (30 sec)
>>>

The first message says that Apache tried to contact PHP over FastCGI
and the script did not return an appropriate response - it didn't
return anything. Apache will then display a 500 error.

The second message says that Apache tried to contact PHP over FastCGI
and the PHP script did not return an appropriate response after the
idle timeout of 30 seconds. Again, Apache will display a 500 error.

These indicate that the problem is that your PHP scripts crash and/or
take too long to run and sometimes fail to execute within the required
time limit.

Cheers

Tom

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Too many '500 Error'

Posted by Nilesh Govindarajan <li...@itech7.com>.
On 01/11/2010 12:49 AM, Daniel Reinhardt wrote:
>
> --------------------------------------------------
> From: "Nilesh Govindarajan" <li...@itech7.com>
> Sent: 10 January, 2010 17:22
> To: <us...@httpd.apache.org>
> Subject: Re: [users@httpd] Too many '500 Error'
>
>> On 01/10/2010 10:50 PM, Nilesh Govindarajan wrote:
>>> On 01/10/2010 10:47 PM, Daniel Reinhardt wrote:
>>>>
>>>> --------------------------------------------------
>>>> From: "Nilesh Govindarajan" <li...@itech7.com>
>>>> Sent: 10 January, 2010 17:08
>>>> To: <us...@httpd.apache.org>
>>>> Subject: [users@httpd] Too many '500 Error'
>>>>
>>>>> I have a fedora 12 VPS with 500 MB RAM & 1 GB swap.
>>>>>
>>>>> I've compiled Apache 2.2.14. Also using PHP 5.3.1 via FastCGI.
>>>>>
>>>>> I've given Apache MaxClients = 500 (ThreadLimit properly set) and 
>>>>> PHP a memory limit of 175M.
>>>>>
>>>>> The problem is, some pages on my site www.itech7.com especially 
>>>>> the admin interface don't load properly. It takes more than 30 
>>>>> secs and often results in an Error 500.
>>>>>
>>>>> Where the problem is ? Drupal (site's app) or Apache ?
>>>>
>>>>
>>>> Internal 500 error's usually come from something other then apache 
>>>> causing the error.  Something along the lines of a Database error 
>>>> or an internal backend script not functioning as it should.
>>>>
>>>> ---------------------------------------------------------------------
>>>> The official User-To-User support forum of the Apache HTTP Server 
>>>> Project.
>>>> See <URL:http://httpd.apache.org/userslist.html> for more info.
>>>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>>>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>>>> For additional commands, e-mail: users-help@httpd.apache.org
>>>>
>>> No actually, all pages open. But sometimes it takes really long 
>>> although there's no traffic out there. And I checked the log to see 
>>> this -
>>>
>>> FastCGI: incomplete headers (0 bytes) received from server 
>>> "/usr/local/apache2/cgi-bin/php-cgi"
>>>
>> And this too-
>>
>> FastCGI: comm with server "/usr/local/apache2/cgi-bin/php-cgi" 
>> aborted: idle timeout (30 sec)
>>
>> -- 
>> Nilesh Govindarajan
>> Site&  Server Adminstrator
>> www.itech7.com
>
> You need to check the scripts in those directories.  Something within 
> the scripts is causing it to time out.  I am guessing a database 
> connection.  I have seen this before with other scripts.
>
>
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server 
> Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
php-cgi inside cgi-bin is just a symlink to /usr/local/bin/php-cgi.

This problem is occurring when I was recently migrated to KVM-Fedora12 
from Xen-CentOS. On the previous one all was working fine, only RAM was 
128 M. But one more point to note is all in the previous one were 
self-compiled. Here Apache and PHP are self-compiled but MySQL from the 
Fedora repos.

Any ideas ?

-- 

Nilesh Govindarajan
Site&  Server Adminstrator
www.itech7.com


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Too many '500 Error'

Posted by Daniel Reinhardt <cr...@cryptodan.net>.
--------------------------------------------------
From: "Nilesh Govindarajan" <li...@itech7.com>
Sent: 10 January, 2010 17:22
To: <us...@httpd.apache.org>
Subject: Re: [users@httpd] Too many '500 Error'

> On 01/10/2010 10:50 PM, Nilesh Govindarajan wrote:
>> On 01/10/2010 10:47 PM, Daniel Reinhardt wrote:
>>>
>>> --------------------------------------------------
>>> From: "Nilesh Govindarajan" <li...@itech7.com>
>>> Sent: 10 January, 2010 17:08
>>> To: <us...@httpd.apache.org>
>>> Subject: [users@httpd] Too many '500 Error'
>>>
>>>> I have a fedora 12 VPS with 500 MB RAM & 1 GB swap.
>>>>
>>>> I've compiled Apache 2.2.14. Also using PHP 5.3.1 via FastCGI.
>>>>
>>>> I've given Apache MaxClients = 500 (ThreadLimit properly set) and PHP a 
>>>> memory limit of 175M.
>>>>
>>>> The problem is, some pages on my site www.itech7.com especially the admin 
>>>> interface don't load properly. It takes more than 30 secs and often results 
>>>> in an Error 500.
>>>>
>>>> Where the problem is ? Drupal (site's app) or Apache ?
>>>
>>>
>>> Internal 500 error's usually come from something other then apache causing 
>>> the error.  Something along the lines of a Database error or an internal 
>>> backend script not functioning as it should.
>>>
>>> ---------------------------------------------------------------------
>>> The official User-To-User support forum of the Apache HTTP Server Project.
>>> See <URL:http://httpd.apache.org/userslist.html> for more info.
>>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>>> For additional commands, e-mail: users-help@httpd.apache.org
>>>
>> No actually, all pages open. But sometimes it takes really long although 
>> there's no traffic out there. And I checked the log to see this -
>>
>> FastCGI: incomplete headers (0 bytes) received from server 
>> "/usr/local/apache2/cgi-bin/php-cgi"
>>
> And this too-
>
> FastCGI: comm with server "/usr/local/apache2/cgi-bin/php-cgi" aborted: idle 
> timeout (30 sec)
>
> -- 
> Nilesh Govindarajan
> Site&  Server Adminstrator
> www.itech7.com

You need to check the scripts in those directories.  Something within the 
scripts is causing it to time out.  I am guessing a database connection.  I have 
seen this before with other scripts.

 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Too many '500 Error'

Posted by Nilesh Govindarajan <li...@itech7.com>.
On 01/10/2010 10:50 PM, Nilesh Govindarajan wrote:
> On 01/10/2010 10:47 PM, Daniel Reinhardt wrote:
>>
>> --------------------------------------------------
>> From: "Nilesh Govindarajan" <li...@itech7.com>
>> Sent: 10 January, 2010 17:08
>> To: <us...@httpd.apache.org>
>> Subject: [users@httpd] Too many '500 Error'
>>
>>> I have a fedora 12 VPS with 500 MB RAM & 1 GB swap.
>>>
>>> I've compiled Apache 2.2.14. Also using PHP 5.3.1 via FastCGI.
>>>
>>> I've given Apache MaxClients = 500 (ThreadLimit properly set) and 
>>> PHP a memory limit of 175M.
>>>
>>> The problem is, some pages on my site www.itech7.com especially the 
>>> admin interface don't load properly. It takes more than 30 secs and 
>>> often results in an Error 500.
>>>
>>> Where the problem is ? Drupal (site's app) or Apache ?
>>
>>
>> Internal 500 error's usually come from something other then apache 
>> causing the error.  Something along the lines of a Database error or 
>> an internal backend script not functioning as it should.
>>
>> ---------------------------------------------------------------------
>> The official User-To-User support forum of the Apache HTTP Server 
>> Project.
>> See <URL:http://httpd.apache.org/userslist.html> for more info.
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
> No actually, all pages open. But sometimes it takes really long 
> although there's no traffic out there. And I checked the log to see 
> this -
>
> FastCGI: incomplete headers (0 bytes) received from server 
> "/usr/local/apache2/cgi-bin/php-cgi"
>
And this too-

FastCGI: comm with server "/usr/local/apache2/cgi-bin/php-cgi" aborted: 
idle timeout (30 sec)

-- 
Nilesh Govindarajan
Site&  Server Adminstrator
www.itech7.com


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Too many '500 Error'

Posted by Nilesh Govindarajan <li...@itech7.com>.
On 01/10/2010 10:47 PM, Daniel Reinhardt wrote:
>
> --------------------------------------------------
> From: "Nilesh Govindarajan" <li...@itech7.com>
> Sent: 10 January, 2010 17:08
> To: <us...@httpd.apache.org>
> Subject: [users@httpd] Too many '500 Error'
>
>> I have a fedora 12 VPS with 500 MB RAM & 1 GB swap.
>>
>> I've compiled Apache 2.2.14. Also using PHP 5.3.1 via FastCGI.
>>
>> I've given Apache MaxClients = 500 (ThreadLimit properly set) and PHP 
>> a memory limit of 175M.
>>
>> The problem is, some pages on my site www.itech7.com especially the 
>> admin interface don't load properly. It takes more than 30 secs and 
>> often results in an Error 500.
>>
>> Where the problem is ? Drupal (site's app) or Apache ?
>
>
> Internal 500 error's usually come from something other then apache 
> causing the error.  Something along the lines of a Database error or 
> an internal backend script not functioning as it should.
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server 
> Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
No actually, all pages open. But sometimes it takes really long although 
there's no traffic out there. And I checked the log to see this -

FastCGI: incomplete headers (0 bytes) received from server 
"/usr/local/apache2/cgi-bin/php-cgi"

-- 
Nilesh Govindarajan
Site&  Server Adminstrator
www.itech7.com


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Too many '500 Error'

Posted by Daniel Reinhardt <cr...@cryptodan.net>.
--------------------------------------------------
From: "Nilesh Govindarajan" <li...@itech7.com>
Sent: 10 January, 2010 17:08
To: <us...@httpd.apache.org>
Subject: [users@httpd] Too many '500 Error'

> I have a fedora 12 VPS with 500 MB RAM & 1 GB swap.
>
> I've compiled Apache 2.2.14. Also using PHP 5.3.1 via FastCGI.
>
> I've given Apache MaxClients = 500 (ThreadLimit properly set) and PHP a memory 
> limit of 175M.
>
> The problem is, some pages on my site www.itech7.com especially the admin 
> interface don't load properly. It takes more than 30 secs and often results in 
> an Error 500.
>
> Where the problem is ? Drupal (site's app) or Apache ?


Internal 500 error's usually come from something other then apache causing the 
error.  Something along the lines of a Database error or an internal backend 
script not functioning as it should. 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org