You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Prasanna Ram Venkatachalam <vp...@gmail.com> on 2009/05/12 15:23:18 UTC

Re: [users@httpd] Apache child process not exiting after it served MaxRequestsPerChild

I am not 100% sure. Do you think Keep Alive time should be revisited? I
remember hearing it somewhere.

Regards
Prasanna Ram

On Tue, May 12, 2009 at 6:24 PM, Karthik kanna <ka...@yahoo.com> wrote:

>  Hi,
>
> I am using Apache 2.0.59 in AIX 5.3. Apache is running as "apache" user-id,
> even the parent process is also running as "apache" user-id. I am using
> non-standard ports like 8028/9028, so I do not require root user to run the
> parent process.. This is the configuration I am using in Apache 2.0.59.
>
>   StartServers 2
>   MaxClients 150
>   MinSpareThreads 25
>   MaxSpareThreads 75
>   ThreadsPerChild 25
>   MaxRequestsPerChild 30000
>
> Actually what is happening - when the child process served 30000 requests,
> it is not killed by the parent process and the child process is running
> forever on the server till I manually kill the child process or restart the
> Apache. But parent process spawns new child process. So the number of Apache
> httpd process is increasing day by day on the server. The thing is, few
> child process gets killed by the parent process once it served 30000
> requests. But few child process is not exiting.
>
> Truss output of the child process that is not exiting:
> 3911841: yield()                                =
> 3911841: thread_waitact(400)                    = 0
> 1144501: __semop(1048580, 0xF1B22D58, 1)        = 0
> 1144501: __semop(1048580, 0xF1B22D60, 1)        = 0
> 1144501: _nsleep(0x202069E8, 0x20206A60)        = 1
> 3911841: yield()                                =
> 822367: kread(-802643620, 0x00000000, 0) (sleeping...)
> 822367: kread(-802643620, 0x00000000, 0)        = 0
> 3911841: yield()                                =
> 822367: kread(-802643620, 0x00000000, 0) (sleeping...)
> 822367: kread(-802643620, 0x00000000, 0)        = 0
> 3911841: yield()                                =
> 3911841: thread_waitact(400)                    = 0
> Few system calls like thread_waitact(), kread(), semop() and yield() are
> running infinitely for the child process. Before the child process starts
> executing these system call infinitely, the last system call it was
> executing was thread_terminate_ack() after it served 30000 requests.
>
> In the child process, one thread is in running state executing _p_nsleep()
> system call and another thread is in wait state, whereas all other threads
> are in terminated status.
>
> *(dbx) thread*
>  thread  state-k     wchan    state-u    k-tid   mode held scope function
>  $t1     wait      0x38882158 running  2894597     k   no   pro  read
>
> >$t2     run                  running  3674465     k   no   pro  _p_nsleep
>
>  $t3                          terminated             u   no
> pro
> Since 2 threads are not terminated, I think child process is not exiting by
> the process process.
>
> Have you faced this problem? Any help you provide to resolve the issue is
> much appreciated.
>
> Regards,
> Karthik Kanna
>
>  ------------------------------
> Now surf faster and smarter ! Check out the new Firefox 3 - Yahoo! Edition
> * Click here!<http://in.rd.yahoo.com/tagline_firefox_1/*http://downloads.yahoo.com/in/firefox/?fr=om_email_firefox>
>



-- 
Prasanna Ram

Re: [users@httpd] Apache child process not exiting after it served MaxRequestsPerChild

Posted by Nick Kew <ni...@webthing.com>.
On Tue, 12 May 2009 19:22:52 +0530 (IST)
Karthik kanna <ka...@yahoo.com> wrote:

> Hi Eric,
>  
> I have attached

Please NEVER DO THAT in email to a public list (or to anyone
who hasn't given permission).

873k is a bloody big unsolicited download.  Some people have
to pay for it!  If you have big attachments, put them somewhere
and post a URL instead.

-- 
Nick Kew

Application Development with Apache - the Apache Modules Book
http://www.apachetutor.org/

---------------------------------------------------------------------
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] Apache child process not exiting after it served MaxRequestsPerChild

Posted by Karthik kanna <ka...@yahoo.com>.
Hi Eric,
 
I have attached the lingering thread backtrace its process stack. Also I have attached the truss output of another lingering thread once it is failed to exit. I am not sure attachments can be send to this mailing list. If you did not receive the attachment, please let me know.
 
Regards,
Karthik Kanna

________________________________
From: Eric Covener <co...@gmail.com>
To: users@httpd.apache.org
Sent: Tuesday, 12 May, 2009 7:04:17 PM
Subject: Re: [users@httpd] Apache child process not exiting after it served MaxRequestsPerChild

On Tue, May 12, 2009 at 9:31 AM, Karthik kanna <ka...@yahoo.com> wrote:
> Hi Prasanna,
>
> Thanks for your reply. Keepalive settings are as follows:
>
>
>
>   Timeout 600
>   KeepAlive On
>   MaxKeepAliveRequests 100
>   KeepAliveTimeout 15
>
> I do not think it is related to keepalive setting, because few child
> process dies properly after it served 30000 requests.

Can you get a full backtrace of that lingering thread?

-- 
Eric Covener
covener@gmail.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


      Now surf faster and smarter ! Check out the new Firefox 3 - Yahoo! Edition http://downloads.yahoo.com/in/firefox/?fr=om_email_firefox

Re: [users@httpd] Apache child process not exiting after it served MaxRequestsPerChild

Posted by Eric Covener <co...@gmail.com>.
On Tue, May 12, 2009 at 9:31 AM, Karthik kanna <ka...@yahoo.com> wrote:
> Hi Prasanna,
>
> Thanks for your reply. Keepalive settings are as follows:
>
>
>
>   Timeout 600
>   KeepAlive On
>   MaxKeepAliveRequests 100
>   KeepAliveTimeout 15
>
> I do not think it is related to keepalive setting, because few child
> process dies properly after it served 30000 requests.

Can you get a full backtrace of that lingering thread?

-- 
Eric Covener
covener@gmail.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] Apache child process not exiting after it served MaxRequestsPerChild

Posted by Prasanna Ram Venkatachalam <vp...@gmail.com>.
Oh.. :(.. Okie.. No errors in the log as well?

On Tue, May 12, 2009 at 7:01 PM, Karthik kanna <ka...@yahoo.com> wrote:

>  Hi Prasanna,
>
> Thanks for your reply. Keepalive settings are as follows:
>
>
>
>   Timeout 600
>   KeepAlive On
>   MaxKeepAliveRequests 100
>   KeepAliveTimeout 15
> I do not think it is related to keepalive setting, because few child
> process dies properly after it served 30000 requests.
>
> Regards,
> Karthik Kanna
>  ------------------------------
> *From:* Prasanna Ram Venkatachalam <vp...@gmail.com>
> *To:* users@httpd.apache.org
> *Sent:* Tuesday, 12 May, 2009 6:53:18 PM
> *Subject:* Re: [users@httpd] Apache child process not exiting after it
> served MaxRequestsPerChild
>
> I am not 100% sure. Do you think Keep Alive time should be revisited? I
> remember hearing it somewhere.
>
> Regards
> Prasanna Ram
>
> On Tue, May 12, 2009 at 6:24 PM, Karthik kanna <ka...@yahoo.com> wrote:
>
>>  Hi,
>>
>> I am using Apache 2.0.59 in AIX 5.3. Apache is running as "apache"
>> user-id, even the parent process is also running as "apache" user-id. I am
>> using non-standard ports like 8028/9028, so I do not require root user to
>> run the parent process.. This is the configuration I am using in Apache
>> 2.0.59.
>>
>>   StartServers 2
>>   MaxClients 150
>>   MinSpareThreads 25
>>   MaxSpareThreads 75
>>   ThreadsPerChild 25
>>   MaxRequestsPerChild 30000
>>
>> Actually what is happening - when the child process served 30000 requests,
>> it is not killed by the parent process and the child process is running
>> forever on the server till I manually kill the child process or restart the
>> Apache. But parent process spawns new child process. So the number of Apache
>> httpd process is increasing day by day on the server. The thing is, few
>> child process gets killed by the parent process once it served 30000
>> requests. But few child process is not exiting.
>>
>> Truss output of the child process that is not exiting:
>> 3911841: yield()                                =
>> 3911841: thread_waitact(400)                    = 0
>> 1144501: __semop(1048580, 0xF1B22D58, 1)        = 0
>> 1144501: __semop(1048580, 0xF1B22D60, 1)        = 0
>> 1144501: _nsleep(0x202069E8, 0x20206A60)        = 1
>> 3911841: yield()                                =
>> 822367: kread(-802643620, 0x00000000, 0) (sleeping...)
>> 822367: kread(-802643620, 0x00000000, 0)        = 0
>> 3911841: yield()                                =
>> 822367: kread(-802643620, 0x00000000, 0) (sleeping...)
>> 822367: kread(-802643620, 0x00000000, 0)        = 0
>> 3911841: yield()                                =
>> 3911841: thread_waitact(400)                    = 0
>> Few system calls like thread_waitact(), kread(), semop() and yield() are
>> running infinitely for the child process. Before the child process starts
>> executing these system call infinitely, the last system call it was
>> executing was thread_terminate_ack() after it served 30000 requests.
>>
>> In the child process, one thread is in running state executing _p_nsleep()
>> system call and another thread is in wait state, whereas all other threads
>> are in terminated status.
>>
>> *(dbx) thread*
>>  thread  state-k     wchan    state-u    k-tid   mode held scope function
>>  $t1     wait      0x38882158 running  2894597     k   no   pro  read
>>
>> >$t2     run                  running  3674465     k   no   pro  _p_nsleep
>>
>>  $t3                          terminated             u   no
>> pro
>> Since 2 threads are not terminated, I think child process is not exiting
>> by the process process.
>>
>> Have you faced this problem? Any help you provide to resolve the issue is
>> much appreciated.
>>
>> Regards,
>> Karthik Kanna
>>
>>  ------------------------------
>> Now surf faster and smarter ! Check out the new Firefox 3 - Yahoo! Edition
>> * Click here!<http://in.rd.yahoo..com/tagline_firefox_1/*http://downloads.yahoo.com/in/firefox/?fr=om_email_firefox>
>>
>
>
>
> --
> Prasanna Ram
>
> ------------------------------
> Cricket on your mind? Visit the ultimate cricket website. Enter now!<http://in.rd.yahoo..com/tagline_cricket_1/*http://beta.cricket.yahoo.com>
>



-- 
Prasanna Ram

Re: [users@httpd] Apache child process not exiting after it served MaxRequestsPerChild

Posted by Karthik kanna <ka...@yahoo.com>.
Hi Prasanna,
 
Thanks for your reply. Keepalive settings are as follows:
 
  Timeout 600
  KeepAlive On
  MaxKeepAliveRequests 100
  KeepAliveTimeout 15

I do not think it is related to keepalive setting, because few child process dies properly after it served 30000 requests.

Regards,
Karthik Kanna

________________________________
From: Prasanna Ram Venkatachalam <vp...@gmail.com>
To: users@httpd.apache.org
Sent: Tuesday, 12 May, 2009 6:53:18 PM
Subject: Re: [users@httpd] Apache child process not exiting after it served MaxRequestsPerChild


I am not 100% sure. Do you think Keep Alive time should be revisited? I remember hearing it somewhere.

Regards
Prasanna Ram


On Tue, May 12, 2009 at 6:24 PM, Karthik kanna <ka...@yahoo.com> wrote:

Hi,

I am using Apache 2.0.59 in AIX 5.3. Apache is running as "apache" user-id, even the parent process is also running as "apache" user-id. I am using non-standard ports like 8028/9028, so I do not require root user to run the parent process.. This is the configuration I am using in Apache 2.0.59.

  StartServers 2
  MaxClients 150
  MinSpareThreads 25
  MaxSpareThreads 75
  ThreadsPerChild 25
  MaxRequestsPerChild 30000

Actually what is happening - when the child process served 30000 requests, it is not killed by the parent process and the child process is running forever on the server till I manually kill the child process or restart the Apache. But parent process spawns new child process. So the number of Apache httpd process is increasing day by day on the server. The thing is, few child process gets killed by the parent process once it served 30000 requests. But few child process is not exiting.

Truss output of the child process that is not exiting:
3911841: yield()                                = 
3911841: thread_waitact(400)                    = 0
1144501: __semop(1048580, 0xF1B22D58, 1)        = 0
1144501: __semop(1048580, 0xF1B22D60, 1)        = 0
1144501: _nsleep(0x202069E8, 0x20206A60)        = 1
3911841: yield()                                = 
822367: kread(-802643620, 0x00000000, 0) (sleeping...)
822367: kread(-802643620, 0x00000000, 0)        = 0
3911841: yield()                                = 
822367: kread(-802643620, 0x00000000, 0) (sleeping...)
822367: kread(-802643620, 0x00000000, 0)        = 0
3911841: yield()                                = 
3911841: thread_waitact(400)                    = 0

Few system calls like thread_waitact(), kread(), semop() and yield() are running infinitely for the child process. Before the child process starts executing these system call infinitely, the last system call it was executing was thread_terminate_ack() after it served 30000 requests.

In the child process, one thread is in running state executing _p_nsleep() system call and another thread is in wait state, whereas all other threads are in terminated status.

(dbx) thread 
 thread  state-k     wchan    state-u    k-tid   mode held scope function 
 $t1     wait      0x38882158 running  2894597     k   no   pro  read               
>$t2     run                  running  3674465     k   no   pro  _p_nsleep         
 $t3                          terminated             u   no   pro                     

Since 2 threads are not terminated, I think child process is not exiting by the process process.

Have you faced this problem? Any help you provide to resolve the issue is much appreciated.

Regards,
Karthik Kanna


________________________________
Now surf faster and smarter ! Check out the new Firefox 3 - Yahoo! Edition * Click here!


-- 
Prasanna Ram



      Now surf faster and smarter ! Check out the new Firefox 3 - Yahoo! Edition http://downloads.yahoo.com/in/firefox/?fr=om_email_firefox