httpd workes become zombie process
up vote
0
down vote
favorite
I am running a php service in a docker container via apache + mod_php. For some reason sooner or later I get "Service unavailable" on reverse proxy. Inspecting the container I always find that all httpd workers became zombies and are no longer reaped by master process. I assumed it was due to zombie reaping issues in docker containers and attempted to solve it by adding tini as pid 1. Unfortunately it didn't solve the issue, I suppose because httpd master process is still running, so workers are actually not orphans to be reaped by pid 1. At this point I have no ideas on how to approach this problem and thus ask for your assistance.
Does anyone know how to debug this kind of issue?
Below is the output of the 'top' command run inside of container. I use plain alpine as base image with php7 installed via 'apk'.
9 1 root S 169m 1% 3 0% /usr/sbin/httpd -D FOREGROUND
5493 0 root S 1592 0% 1 0% sh
5501 5493 root R 1524 0% 2 0% top
1 0 root S 760 0% 0 0% /sbin/tini -- /usr/sbin/httpd -D F
5484 9 apache Z 0 0% 3 0% [httpd]
5492 9 apache Z 0 0% 0 0% [httpd]
5485 9 apache Z 0 0% 0 0% [httpd]
5490 9 apache Z 0 0% 3 0% [httpd]
5486 9 apache Z 0 0% 0 0% [httpd]
5487 9 apache Z 0 0% 1 0% [httpd]
5483 9 apache Z 0 0% 3 0% [httpd]
5482 9 apache Z 0 0% 1 0% [httpd]
5489 9 apache Z 0 0% 1 0% [httpd]
5491 9 apache Z 0 0% 3 0% [httpd]
5488 9 apache Z 0 0% 0 0% [httpd]
php apache docker unix zombie-process
add a comment |
up vote
0
down vote
favorite
I am running a php service in a docker container via apache + mod_php. For some reason sooner or later I get "Service unavailable" on reverse proxy. Inspecting the container I always find that all httpd workers became zombies and are no longer reaped by master process. I assumed it was due to zombie reaping issues in docker containers and attempted to solve it by adding tini as pid 1. Unfortunately it didn't solve the issue, I suppose because httpd master process is still running, so workers are actually not orphans to be reaped by pid 1. At this point I have no ideas on how to approach this problem and thus ask for your assistance.
Does anyone know how to debug this kind of issue?
Below is the output of the 'top' command run inside of container. I use plain alpine as base image with php7 installed via 'apk'.
9 1 root S 169m 1% 3 0% /usr/sbin/httpd -D FOREGROUND
5493 0 root S 1592 0% 1 0% sh
5501 5493 root R 1524 0% 2 0% top
1 0 root S 760 0% 0 0% /sbin/tini -- /usr/sbin/httpd -D F
5484 9 apache Z 0 0% 3 0% [httpd]
5492 9 apache Z 0 0% 0 0% [httpd]
5485 9 apache Z 0 0% 0 0% [httpd]
5490 9 apache Z 0 0% 3 0% [httpd]
5486 9 apache Z 0 0% 0 0% [httpd]
5487 9 apache Z 0 0% 1 0% [httpd]
5483 9 apache Z 0 0% 3 0% [httpd]
5482 9 apache Z 0 0% 1 0% [httpd]
5489 9 apache Z 0 0% 1 0% [httpd]
5491 9 apache Z 0 0% 3 0% [httpd]
5488 9 apache Z 0 0% 0 0% [httpd]
php apache docker unix zombie-process
1: does it do that with simple static, only HTML content? That would indicate a PHP code issue (infinite loop of some kind?). Thus debug PHP. 2 What MPM module do you use? Show us your configurations: which MPM, what performance parameters are set. I am curious atMaxConnectionsPerChild. Set it different than 0 so the master process kills and start new child processes once in a while.
– Nic3500
Nov 10 at 18:28
3 since you talk of a proxy, the child processes are waiting for a response from some backend server. If you set the timeouts to 0, and the backend does not respond, the processes will appear stuck and do nothing.
– Nic3500
Nov 10 at 18:32
@Nic3500 The service itself is not a reverse proxy. I just use it as a router to the service itself.
– foverzar
Nov 11 at 8:00
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am running a php service in a docker container via apache + mod_php. For some reason sooner or later I get "Service unavailable" on reverse proxy. Inspecting the container I always find that all httpd workers became zombies and are no longer reaped by master process. I assumed it was due to zombie reaping issues in docker containers and attempted to solve it by adding tini as pid 1. Unfortunately it didn't solve the issue, I suppose because httpd master process is still running, so workers are actually not orphans to be reaped by pid 1. At this point I have no ideas on how to approach this problem and thus ask for your assistance.
Does anyone know how to debug this kind of issue?
Below is the output of the 'top' command run inside of container. I use plain alpine as base image with php7 installed via 'apk'.
9 1 root S 169m 1% 3 0% /usr/sbin/httpd -D FOREGROUND
5493 0 root S 1592 0% 1 0% sh
5501 5493 root R 1524 0% 2 0% top
1 0 root S 760 0% 0 0% /sbin/tini -- /usr/sbin/httpd -D F
5484 9 apache Z 0 0% 3 0% [httpd]
5492 9 apache Z 0 0% 0 0% [httpd]
5485 9 apache Z 0 0% 0 0% [httpd]
5490 9 apache Z 0 0% 3 0% [httpd]
5486 9 apache Z 0 0% 0 0% [httpd]
5487 9 apache Z 0 0% 1 0% [httpd]
5483 9 apache Z 0 0% 3 0% [httpd]
5482 9 apache Z 0 0% 1 0% [httpd]
5489 9 apache Z 0 0% 1 0% [httpd]
5491 9 apache Z 0 0% 3 0% [httpd]
5488 9 apache Z 0 0% 0 0% [httpd]
php apache docker unix zombie-process
I am running a php service in a docker container via apache + mod_php. For some reason sooner or later I get "Service unavailable" on reverse proxy. Inspecting the container I always find that all httpd workers became zombies and are no longer reaped by master process. I assumed it was due to zombie reaping issues in docker containers and attempted to solve it by adding tini as pid 1. Unfortunately it didn't solve the issue, I suppose because httpd master process is still running, so workers are actually not orphans to be reaped by pid 1. At this point I have no ideas on how to approach this problem and thus ask for your assistance.
Does anyone know how to debug this kind of issue?
Below is the output of the 'top' command run inside of container. I use plain alpine as base image with php7 installed via 'apk'.
9 1 root S 169m 1% 3 0% /usr/sbin/httpd -D FOREGROUND
5493 0 root S 1592 0% 1 0% sh
5501 5493 root R 1524 0% 2 0% top
1 0 root S 760 0% 0 0% /sbin/tini -- /usr/sbin/httpd -D F
5484 9 apache Z 0 0% 3 0% [httpd]
5492 9 apache Z 0 0% 0 0% [httpd]
5485 9 apache Z 0 0% 0 0% [httpd]
5490 9 apache Z 0 0% 3 0% [httpd]
5486 9 apache Z 0 0% 0 0% [httpd]
5487 9 apache Z 0 0% 1 0% [httpd]
5483 9 apache Z 0 0% 3 0% [httpd]
5482 9 apache Z 0 0% 1 0% [httpd]
5489 9 apache Z 0 0% 1 0% [httpd]
5491 9 apache Z 0 0% 3 0% [httpd]
5488 9 apache Z 0 0% 0 0% [httpd]
php apache docker unix zombie-process
php apache docker unix zombie-process
asked Nov 10 at 15:40
foverzar
1029
1029
1: does it do that with simple static, only HTML content? That would indicate a PHP code issue (infinite loop of some kind?). Thus debug PHP. 2 What MPM module do you use? Show us your configurations: which MPM, what performance parameters are set. I am curious atMaxConnectionsPerChild. Set it different than 0 so the master process kills and start new child processes once in a while.
– Nic3500
Nov 10 at 18:28
3 since you talk of a proxy, the child processes are waiting for a response from some backend server. If you set the timeouts to 0, and the backend does not respond, the processes will appear stuck and do nothing.
– Nic3500
Nov 10 at 18:32
@Nic3500 The service itself is not a reverse proxy. I just use it as a router to the service itself.
– foverzar
Nov 11 at 8:00
add a comment |
1: does it do that with simple static, only HTML content? That would indicate a PHP code issue (infinite loop of some kind?). Thus debug PHP. 2 What MPM module do you use? Show us your configurations: which MPM, what performance parameters are set. I am curious atMaxConnectionsPerChild. Set it different than 0 so the master process kills and start new child processes once in a while.
– Nic3500
Nov 10 at 18:28
3 since you talk of a proxy, the child processes are waiting for a response from some backend server. If you set the timeouts to 0, and the backend does not respond, the processes will appear stuck and do nothing.
– Nic3500
Nov 10 at 18:32
@Nic3500 The service itself is not a reverse proxy. I just use it as a router to the service itself.
– foverzar
Nov 11 at 8:00
1: does it do that with simple static, only HTML content? That would indicate a PHP code issue (infinite loop of some kind?). Thus debug PHP. 2 What MPM module do you use? Show us your configurations: which MPM, what performance parameters are set. I am curious at
MaxConnectionsPerChild. Set it different than 0 so the master process kills and start new child processes once in a while.– Nic3500
Nov 10 at 18:28
1: does it do that with simple static, only HTML content? That would indicate a PHP code issue (infinite loop of some kind?). Thus debug PHP. 2 What MPM module do you use? Show us your configurations: which MPM, what performance parameters are set. I am curious at
MaxConnectionsPerChild. Set it different than 0 so the master process kills and start new child processes once in a while.– Nic3500
Nov 10 at 18:28
3 since you talk of a proxy, the child processes are waiting for a response from some backend server. If you set the timeouts to 0, and the backend does not respond, the processes will appear stuck and do nothing.
– Nic3500
Nov 10 at 18:32
3 since you talk of a proxy, the child processes are waiting for a response from some backend server. If you set the timeouts to 0, and the backend does not respond, the processes will appear stuck and do nothing.
– Nic3500
Nov 10 at 18:32
@Nic3500 The service itself is not a reverse proxy. I just use it as a router to the service itself.
– foverzar
Nov 11 at 8:00
@Nic3500 The service itself is not a reverse proxy. I just use it as a router to the service itself.
– foverzar
Nov 11 at 8:00
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53240538%2fhttpd-workes-become-zombie-process%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1: does it do that with simple static, only HTML content? That would indicate a PHP code issue (infinite loop of some kind?). Thus debug PHP. 2 What MPM module do you use? Show us your configurations: which MPM, what performance parameters are set. I am curious at
MaxConnectionsPerChild. Set it different than 0 so the master process kills and start new child processes once in a while.– Nic3500
Nov 10 at 18:28
3 since you talk of a proxy, the child processes are waiting for a response from some backend server. If you set the timeouts to 0, and the backend does not respond, the processes will appear stuck and do nothing.
– Nic3500
Nov 10 at 18:32
@Nic3500 The service itself is not a reverse proxy. I just use it as a router to the service itself.
– foverzar
Nov 11 at 8:00