linux - Multiple httpd processes running in Docker Container -
this dockerfile
created installing httpd
on centos
:
#installing httpd centos:latest maintainer xxx@gmail.com run yum install -y httpd expose 80 #entrypoint ["systemctl"] entrypoint ["/usr/sbin/httpd"]
after building, when run container can see many httpd
process running inside container:
docker run -d -p 80:80 httpd:4.0 -dforeground
output of docker top
command:
uid pid ppid c stime tty time cmd root 2457 2443 0 04:26 ? 00:00:00 /usr/sbin/httpd -dforeground apache 2474 2457 0 04:26 ? 00:00:00 /usr/sbin/httpd -dforeground apache 2475 2457 0 04:26 ? 00:00:00 /usr/sbin/httpd -dforeground apache 2476 2457 0 04:26 ? 00:00:00 /usr/sbin/httpd -dforeground apache 2477 2457 0 04:26 ? 00:00:00 /usr/sbin/httpd -dforeground apache 2478 2457 0 04:26 ? 00:00:00 /usr/sbin/httpd -dforeground apache 2491 2457 0 04:26 ? 00:00:00 /usr/sbin/httpd -dforeground apache 2492 2457 0 04:26 ? 00:00:00 /usr/sbin/httpd -dforeground apache 2493 2457 0 04:26 ? 00:00:00 /usr/sbin/httpd -dforeground root 2512 2500 0 04:27 pts/0 00:00:00 /bin/bash apache 2532 2457 0 04:27 ? 00:00:00 /usr/sbin/httpd -dforeground
please let me know why many httpd processes running , how have 1 process pid 1 ?
apache runs multiple processes ready catch client request fast, because spawning server process slow, better have 1 ready when request comes in.
can configure number in httpd.conf
through startservers, minspareservers, maxspareservers , serverlimit directives.
wiki
Comments
Post a Comment