You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Nicholas Sherlock <n....@gmail.com> on 2009/09/24 02:13:48 UTC

[users@httpd] Re: Apace2 stops serving pages.

Middle Fork GIS wrote:
> [...] at random intervals, Apache stops serving pages.
> 
> HTTP request sent, awaiting response...
> 
> And there it sits until the server is started; likewise from a remote 
> browser, the page is never delivered.   Nothing appears in Apache's log, 
> even when set to the most verbose 'INFO' level.

The log is only written once the page has been served, so that isn't 
surprising.

> Apache is NOT pegging the CPU:  CPU usage will show close to 0% and the 
> load average will show close to zero as well.   Apache is not hogging 
> the memory, very little memory usage is shown.  

I'd take a look at your database. If one query locks all the important 
tables, then runs for minutes and minutes, every other query will block 
waiting for it. This will quickly fill up your Apache connection limit 
with people waiting for their response to be delivered. Eventually, the 
bad query times out and everything goes back to normal.

On MySQL, this would be diagnosed with a quick "SHOW PROCESSLIST", I'm 
not sure about PostgreSQL though.

Cheers,
Nicholas Sherlock


---------------------------------------------------------------------
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] Re: Apace2 stops serving pages.

Posted by Middle Fork GIS <mi...@gmail.com>.
Argh it happened again overnite.

I checked in first thing this morning and Apache had been hung for 8
bleeding hours.  Zero pages served in all that time.  Postgresql did not
seem to be at fault.  my query against it worked fine.  Also, all of my
queries are SELECT, so they are non-exclusive and shouldn't result in any
locks.

Also, when it hangs, NO requests get through, even those to static html
files.

I did note that all 250 of the spawned apache processes were still alive.




On Wed, Sep 23, 2009 at 5:13 PM, Nicholas Sherlock <n....@gmail.com>wrote:

> Middle Fork GIS wrote:
>
>> [...] at random intervals, Apache stops serving pages.
>>
>> HTTP request sent, awaiting response...
>>
>> And there it sits until the server is started; likewise from a remote
>> browser, the page is never delivered.   Nothing appears in Apache's log,
>> even when set to the most verbose 'INFO' level.
>>
>
> The log is only written once the page has been served, so that isn't
> surprising.
>
>  Apache is NOT pegging the CPU:  CPU usage will show close to 0% and the
>> load average will show close to zero as well.   Apache is not hogging the
>> memory, very little memory usage is shown.
>>
>
> I'd take a look at your database. If one query locks all the important
> tables, then runs for minutes and minutes, every other query will block
> waiting for it. This will quickly fill up your Apache connection limit with
> people waiting for their response to be delivered. Eventually, the bad query
> times out and everything goes back to normal.
>
> On MySQL, this would be diagnosed with a quick "SHOW PROCESSLIST", I'm not
> sure about PostgreSQL though.
>
> Cheers,
> Nicholas Sherlock
>
>
> ---------------------------------------------------------------------
> 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
>
>