Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: ModPerl

Apache crashes relatively often

 

 

ModPerl modperl RSS feed   Index | Next | Previous | View Threaded


frioux at gmail

Jun 17, 2009, 11:24 AM

Post #1 of 4 (538 views)
Permalink
Apache crashes relatively often

Hey guys,

We are having weird memory leak issues with Apache and some mod_perl.
Basically what happens is that, depending on load, we eventually run out of
ram and apache crashes. We have the setting that will restart apache after
a given numer of requests, and that seems to work temporarily, but
eventually in the log it claims to restart, but no ram is freed. The
following is written to the log when that happens:


[Wed Jun 17 13:07:49 2009] [notice] Child 5056: Process exiting because it
> reached MaxRequestsPerChild. Signaling the parent to restart a new child
> process.
> [Wed Jun 17 13:07:49 2009] [notice] Parent: Received restart signal --
> Restarting the server.
> [Wed Jun 17 13:07:49 2009] [warn] (OS 10038)An operation was attempted on
> something that is not a socket. : setsockopt(SO_UPDATE_ACCEPT_CONTEXT)
> failed.
> [Wed Jun 17 13:07:50 2009] [notice] Child 5056: Released the start mutex
> [Wed Jun 17 13:07:50 2009] [notice] Apache/2.2.11 (Win32) mod_ssl/2.2.11
> OpenSSL/0.9.8i mod_perl/2.0.4-dev Perl/v5.10.0 configured -- resuming normal
> operations
> [Wed Jun 17 13:07:50 2009] [notice] Server built: Dec 10 2008 00:10:06
> [Wed Jun 17 13:07:50 2009] [notice] Parent: Created child process 3164
> [Wed Jun 17 13:07:51 2009] [notice] Child 3164: Child process is running
> [Wed Jun 17 13:07:51 2009] [notice] Child 3164: Acquired the start mutex.
> [Wed Jun 17 13:07:51 2009] [notice] Child 3164: Starting 64 worker threads.
> [Wed Jun 17 13:07:51 2009] [notice] Child 3164: Starting thread to listen
> on port 443.
> [Wed Jun 17 13:07:51 2009] [notice] Child 3164: Starting thread to listen
> on port 80.
> [Wed Jun 17 13:08:00 2009] [notice] Child 5056: All worker threads have
> exited.
> [Wed Jun 17 13:08:00 2009] [notice] Child 5056: Child process is exiting
>

And just to be clear, here are the relevant conf sections:

ThreadLimit 64
> ThreadsPerChild 64
> MaxRequestsPerChild 10000
> MaxMemFree 51200
>

That's in the "root" part of the config, or to be more explicit, it's not in
a virtual host or anything like that.

We are running apache on a Windows server, so if that could be part of the
issue let me know.

Any help at all would be very much appreciated.

--
fREW Schmidt
http://blog.afoolishmanifesto.com


granitegadde at hotmail

Jun 17, 2009, 11:37 AM

Post #2 of 4 (507 views)
Permalink
RE: Apache crashes relatively often [In reply to]

My resume copies are at

http://www.gecpvt.com/IpResume55.pdf
http://www.gecpvt.com/IpResume55.docx

Phone numbers are

408-329-7307,212-203-0684,512-524-3905. (CELL) 512-773-8922

srinivas






From: frioux[at]gmail.com
Date: Wed, 17 Jun 2009 13:24:24 -0500
Subject: Apache crashes relatively often
To: modperl[at]perl.apache.org

Hey guys,

We are having weird memory leak issues with Apache and some mod_perl. Basically what happens is that, depending on load, we eventually run out of ram and apache crashes. We have the setting that will restart apache after a given numer of requests, and that seems to work temporarily, but eventually in the log it claims to restart, but no ram is freed. The following is written to the log when that happens:





[Wed Jun 17 13:07:49 2009] [notice] Child 5056: Process exiting because it reached MaxRequestsPerChild. Signaling the parent to restart a new child process.


[Wed Jun 17 13:07:49 2009] [notice] Parent: Received restart signal -- Restarting the server.
[Wed Jun 17 13:07:49 2009] [warn] (OS 10038)An operation was attempted on something that is not a socket. : setsockopt(SO_UPDATE_ACCEPT_CONTEXT) failed.


[Wed Jun 17 13:07:50 2009] [notice] Child 5056: Released the start mutex
[Wed Jun 17 13:07:50 2009] [notice] Apache/2.2.11 (Win32) mod_ssl/2.2.11 OpenSSL/0.9.8i mod_perl/2.0.4-dev Perl/v5.10.0 configured -- resuming normal operations


[Wed Jun 17 13:07:50 2009] [notice] Server built: Dec 10 2008 00:10:06
[Wed Jun 17 13:07:50 2009] [notice] Parent: Created child process 3164
[Wed Jun 17 13:07:51 2009] [notice] Child 3164: Child process is running


[Wed Jun 17 13:07:51 2009] [notice] Child 3164: Acquired the start mutex.
[Wed Jun 17 13:07:51 2009] [notice] Child 3164: Starting 64 worker threads.
[Wed Jun 17 13:07:51 2009] [notice] Child 3164: Starting thread to listen on port 443.


[Wed Jun 17 13:07:51 2009] [notice] Child 3164: Starting thread to listen on port 80.
[Wed Jun 17 13:08:00 2009] [notice] Child 5056: All worker threads have exited.
[Wed Jun 17 13:08:00 2009] [notice] Child 5056: Child process is exiting



And just to be clear, here are the relevant conf sections:

ThreadLimit 64


ThreadsPerChild 64
MaxRequestsPerChild 10000
MaxMemFree 51200

That's in the "root" part of the config, or to be more explicit, it's not in a virtual host or anything like that.



We are running apache on a Windows server, so if that could be part of the issue let me know.

Any help at all would be very much appreciated.
--
fREW Schmidt
http://blog.afoolishmanifesto.com

_________________________________________________________________
Hotmail® has ever-growing storage! Don’t worry about storage limits.
http://windowslive.com/Tutorial/Hotmail/Storage?ocid=TXT_TAGLM_WL_HM_Tutorial_Storage_062009


pharkins at gmail

Jun 26, 2009, 12:59 PM

Post #3 of 4 (457 views)
Permalink
Re: Apache crashes relatively often [In reply to]

On Wed, Jun 17, 2009 at 2:24 PM, fREW Schmidt<frioux[at]gmail.com> wrote:
> We are having weird memory leak issues with Apache and some mod_perl.
> Basically what happens is that, depending on load, we eventually run out of
> ram and apache crashes.  We have the setting that will restart apache after
> a given numer of requests, and that seems to work temporarily, but
> eventually in the log it claims to restart, but no ram is freed.

I haven't seen this before, but I'm guessing that it has to do with
the Windows MPM and the nature of Perl threads. Is it possible for
you to run your production server on Linux with the prefork MPM
instead?

- Perrin


aw at ice-sa

Jun 26, 2009, 1:25 PM

Post #4 of 4 (456 views)
Permalink
Re: Apache crashes relatively often [In reply to]

Perrin Harkins wrote:
> On Wed, Jun 17, 2009 at 2:24 PM, fREW Schmidt<frioux[at]gmail.com> wrote:
>> We are having weird memory leak issues with Apache and some mod_perl.

When you mention "some mod_perl", can you be a bit more specific about
which perl modules you are using ?
I have had problems of the same nature with some modules, particularly
some that have to do with XML processing; not only under Apache, but
also when used in other programs running as "daemons" for extended
periods of time. In some cases, I ended up extracting those pieces and
running them as external perl programs, via do() or system(). Not very
nice, but it stopped the problem in its tracks.

A CPAN module which helps track down such issues is Devel::Leak.

ModPerl modperl RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.