httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karthik kanna <kanna...@yahoo.com>
Subject [users@httpd] Apache child process not exiting after it served MaxRequestsPerChild
Date Tue, 12 May 2009 12:54:01 GMT
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


      Own a website.Get an unlimited package.Pay next to nothing.*Go to http://in.business.yahoo.com/
Mime
View raw message