On Tue, 2009-05-12 at 18:24 +0530, Karthik kanna 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. MaxRequestsPerChild doesn't kill children after N requests, it kills them after N unique keep alive connections + non keep alive requests - IE if one keep alive connection requests 40 different entities in its lifetime, then apache will consider that as 1 request as far as counting MaxRequestsPerChild. See http://httpd.apache.org/docs/2.2/mod/mpm_common.html#maxrequestsperchild > > 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 Also, please don't email me 800+k of logs again. kthx :) --------------------------------------------------------------------- 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@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx