VPS侦探论坛

 找回密码
 注册
查看: 6136|回复: 1

关于php-cgi的问题 求教军哥

[复制链接]
发表于 2011-5-4 09:12:41 | 显示全部楼层 |阅读模式

文件 /usr/local/php/etc/php-fpm.conf 里面 配置<value name="max_children">24</value>
可是进程里面有50个php-cgi啊!不是应该是24个吗?
执行这个
[root@localhost logs]# total=0; ii=0; for i in `ps -C php-cgi -o rss=`; do total=$(($total+$i)); ii=$(($ii+1));echo $ii; echo $i; done; echo "PHP-CGI Memory usage: $total kb"
1
352
2
244
3
244
4
244
5
244
6
244
7
244
8
244
9
244
10
244
11
244
12
244
13
244
14
244
15
244
16
244
17
244
18
244
19
244
20
244
21
244
22
244
23
244
24
244
25
244
26
4168
27
10636
28
10396
29
9692
30
10036
31
7624
32
9996
33
8460
34
9124
35
11916
36
9884
37
9688
38
8432
39
9784
40
9076
41
10780
42
8296
43
9184
44
10720
45
10352
46
8756
47
8204
48
9068
49
8812
50
8400
PHP-CGI Memory usage: 237692 kb
再则root执行命令
[root@localhost logs]# ps -ef
root      1888     1  0 Apr28 ?        00:00:01 /usr/sbin/sshd
root      1900     1  0 Apr28 ?        00:00:00 /bin/sh /usr/local/mysql/bin/mysqld_safe --datadir=/usr/local/mysql/var --pid-file=/usr/local/mysql/var/localhost.localdomain.pid
root      1923     1  0 Apr28 ?        00:00:02 crond
mysql     2040  1900  5 Apr28 ?        07:45:12 /usr/local/mysql/libexec/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/var --user=mysql --log-error=/usr/local/mysql/var/localhost.localdo
root      2043     1  0 Apr28 ?        00:00:09 /usr/local/php/bin/php-cgi --fpm --fpm-config /usr/local/php/etc/php-fpm.conf
www       2044  2043  0 Apr28 ?        00:00:00 /usr/local/php/bin/php-cgi --fpm --fpm-config /usr/local/php/etc/php-fpm.conf
www       2045  2043  0 Apr28 ?        00:00:00 /usr/local/php/bin/php-cgi --fpm --fpm-config /usr/local/php/etc/php-fpm.conf
www       2046  2043  0 Apr28 ?        00:00:00 /usr/local/php/bin/php-cgi --fpm --fpm-config /usr/local/php/etc/php-fpm.conf
www       2047  2043  0 Apr28 ?        00:00:00 /usr/local/php/bin/php-cgi --fpm --fpm-config /usr/local/php/etc/php-fpm.conf
www       2048  2043  0 Apr28 ?        00:00:00 /usr/local/php/bin/php-cgi --fpm --fpm-config /usr/local/php/etc/php-fpm.conf
www       2049  2043  0 Apr28 ?        00:00:00 /usr/local/php/bin/php-cgi --fpm --fpm-config /usr/local/php/etc/php-fpm.conf
www       2050  2043  0 Apr28 ?        00:00:00 /usr/local/php/bin/php-cgi --fpm --fpm-config /usr/local/php/etc/php-fpm.conf
www       2051  2043  0 Apr28 ?        00:00:00 /usr/local/php/bin/php-cgi --fpm --fpm-config /usr/local/php/etc/php-fpm.conf
www       2053  2043  0 Apr28 ?        00:00:00 /usr/local/php/bin/php-cgi --fpm --fpm-config /usr/local/php/etc/php-fpm.conf
www       2054  2043  0 Apr28 ?        00:00:00 /usr/local/php/bin/php-cgi --fpm --fpm-config /usr/local/php/etc/php-fpm.conf
www       2055  2043  0 Apr28 ?        00:00:00 /usr/local/php/bin/php-cgi --fpm --fpm-config /usr/local/php/etc/php-fpm.conf
www       2056  2043  0 Apr28 ?        00:00:00 /usr/local/php/bin/php-cgi --fpm --fpm-config /usr/local/php/etc/php-fpm.conf
www       2057  2043  0 Apr28 ?        00:00:00 /usr/local/php/bin/php-cgi --fpm --fpm-config /usr/local/php/etc/php-fpm.conf
www       2058  2043  0 Apr28 ?        00:00:00 /usr/local/php/bin/php-cgi --fpm --fpm-config /usr/local/php/etc/php-fpm.conf
www       2059  2043  0 Apr28 ?        00:00:00 /usr/local/php/bin/php-cgi --fpm --fpm-config /usr/local/php/etc/php-fpm.conf
www       2060  2043  0 Apr28 ?        00:00:00 /usr/local/php/bin/php-cgi --fpm --fpm-config /usr/local/php/etc/php-fpm.conf
www       2061  2043  0 Apr28 ?        00:00:00 /usr/local/php/bin/php-cgi --fpm --fpm-config /usr/local/php/etc/php-fpm.conf
www       2062  2043  0 Apr28 ?        00:00:00 /usr/local/php/bin/php-cgi --fpm --fpm-config /usr/local/php/etc/php-fpm.conf
www       2063  2043  0 Apr28 ?        00:00:00 /usr/local/php/bin/php-cgi --fpm --fpm-config /usr/local/php/etc/php-fpm.conf
www       2064  2043  0 Apr28 ?        00:00:00 /usr/local/php/bin/php-cgi --fpm --fpm-config /usr/local/php/etc/php-fpm.conf
www       2065  2043  0 Apr28 ?        00:00:00 /usr/local/php/bin/php-cgi --fpm --fpm-config /usr/local/php/etc/php-fpm.conf
www       2066  2043  0 Apr28 ?        00:00:00 /usr/local/php/bin/php-cgi --fpm --fpm-config /usr/local/php/etc/php-fpm.conf
www       2067  2043  0 Apr28 ?        00:00:00 /usr/local/php/bin/php-cgi --fpm --fpm-config /usr/local/php/etc/php-fpm.conf
www       2068  2043  0 Apr28 ?        00:00:00 /usr/local/php/bin/php-cgi --fpm --fpm-config /usr/local/php/etc/php-fpm.conf
root      2116     1  0 Apr28 ?        00:00:00 /usr/sbin/smartd -q never
root      2125     1  0 Apr28 tty1     00:00:00 /sbin/mingetty tty1
root      2126     1  0 Apr28 tty2     00:00:00 /sbin/mingetty tty2
root      2129     1  0 Apr28 tty3     00:00:00 /sbin/mingetty tty3
root      2130     1  0 Apr28 tty4     00:00:00 /sbin/mingetty tty4
root      2131     1  0 Apr28 tty5     00:00:00 /sbin/mingetty tty5
root      2132     1  0 Apr28 tty6     00:00:00 /sbin/mingetty tty6
root      4902  1888  0 08:52 ?        00:00:00 sshd: root@pts/0
root      4919  4902  0 08:52 pts/0    00:00:00 -bash
root      5117  4902  0 08:57 ?        00:00:00 /usr/libexec/openssh/sftp-server
root      5209     1  0 09:00 ?        00:00:00 /usr/local/php/bin/php-cgi --fpm --fpm-config /usr/local/php/etc/php-fpm.conf
www       5210  5209  0 09:00 ?        00:00:00 /usr/local/php/bin/php-cgi --fpm --fpm-config /usr/local/php/etc/php-fpm.conf
www       5211  5209  0 09:00 ?        00:00:00 /usr/local/php/bin/php-cgi --fpm --fpm-config /usr/local/php/etc/php-fpm.conf
www       5212  5209  0 09:00 ?        00:00:00 /usr/local/php/bin/php-cgi --fpm --fpm-config /usr/local/php/etc/php-fpm.conf
www       5213  5209  0 09:00 ?        00:00:00 /usr/local/php/bin/php-cgi --fpm --fpm-config /usr/local/php/etc/php-fpm.conf
www       5214  5209  0 09:00 ?        00:00:00 /usr/local/php/bin/php-cgi --fpm --fpm-config /usr/local/php/etc/php-fpm.conf
www       5215  5209  0 09:00 ?        00:00:00 /usr/local/php/bin/php-cgi --fpm --fpm-config /usr/local/php/etc/php-fpm.conf
www       5216  5209  0 09:00 ?        00:00:00 /usr/local/php/bin/php-cgi --fpm --fpm-config /usr/local/php/etc/php-fpm.conf
www       5217  5209  0 09:00 ?        00:00:00 /usr/local/php/bin/php-cgi --fpm --fpm-config /usr/local/php/etc/php-fpm.conf
www       5218  5209  0 09:00 ?        00:00:01 /usr/local/php/bin/php-cgi --fpm --fpm-config /usr/local/php/etc/php-fpm.conf
www       5219  5209  0 09:00 ?        00:00:00 /usr/local/php/bin/php-cgi --fpm --fpm-config /usr/local/php/etc/php-fpm.conf
www       5220  5209  0 09:00 ?        00:00:00 /usr/local/php/bin/php-cgi --fpm --fpm-config /usr/local/php/etc/php-fpm.conf
www       5221  5209  0 09:00 ?        00:00:00 /usr/local/php/bin/php-cgi --fpm --fpm-config /usr/local/php/etc/php-fpm.conf
www       5222  5209  0 09:00 ?        00:00:01 /usr/local/php/bin/php-cgi --fpm --fpm-config /usr/local/php/etc/php-fpm.conf
www       5223  5209  0 09:00 ?        00:00:00 /usr/local/php/bin/php-cgi --fpm --fpm-config /usr/local/php/etc/php-fpm.conf
www       5224  5209  0 09:00 ?        00:00:01 /usr/local/php/bin/php-cgi --fpm --fpm-config /usr/local/php/etc/php-fpm.conf
www       5225  5209  0 09:00 ?        00:00:00 /usr/local/php/bin/php-cgi --fpm --fpm-config /usr/local/php/etc/php-fpm.conf
www       5226  5209  0 09:00 ?        00:00:01 /usr/local/php/bin/php-cgi --fpm --fpm-config /usr/local/php/etc/php-fpm.conf
www       5227  5209  0 09:00 ?        00:00:00 /usr/local/php/bin/php-cgi --fpm --fpm-config /usr/local/php/etc/php-fpm.conf
www       5228  5209  0 09:00 ?        00:00:01 /usr/local/php/bin/php-cgi --fpm --fpm-config /usr/local/php/etc/php-fpm.conf
www       5229  5209  0 09:00 ?        00:00:00 /usr/local/php/bin/php-cgi --fpm --fpm-config /usr/local/php/etc/php-fpm.conf
www       5230  5209  0 09:00 ?        00:00:00 /usr/local/php/bin/php-cgi --fpm --fpm-config /usr/local/php/etc/php-fpm.conf
www       5231  5209  0 09:00 ?        00:00:01 /usr/local/php/bin/php-cgi --fpm --fpm-config /usr/local/php/etc/php-fpm.conf
www       5232  5209  0 09:00 ?        00:00:00 /usr/local/php/bin/php-cgi --fpm --fpm-config /usr/local/php/etc/php-fpm.conf
www       5233  5209  0 09:00 ?        00:00:00 /usr/local/php/bin/php-cgi --fpm --fpm-config /usr/local/php/etc/php-fpm.conf
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2011-5-4 09:18:07 | 显示全部楼层


这个是reload fpm的日志
有一行 May 04 09:15:06.285936 [NOTICE] fpm_pctl_kill_all(), line 181: 24 children are still alive
还有很多 May 04 09:15:06.787281 [NOTICE] fpm_children_bury(), line 215: child 5212 (pool default) exited with code 0 after 900.757460 seconds from start

May 04 09:15:06.285344 [NOTICE] fpm_got_signal(), line 70: received SIGUSR2
May 04 09:15:06.285418 [NOTICE] fpm_pctl(), line 256: switching to 'reloading' state
May 04 09:15:06.285542 [NOTICE] fpm_pctl_kill_all(), line 172: sending signal 3 SIGQUIT to child 5233 (pool default)
May 04 09:15:06.285563 [NOTICE] fpm_pctl_kill_all(), line 172: sending signal 3 SIGQUIT to child 5232 (pool default)
May 04 09:15:06.285578 [NOTICE] fpm_pctl_kill_all(), line 172: sending signal 3 SIGQUIT to child 5231 (pool default)
May 04 09:15:06.285593 [NOTICE] fpm_pctl_kill_all(), line 172: sending signal 3 SIGQUIT to child 5230 (pool default)
May 04 09:15:06.285607 [NOTICE] fpm_pctl_kill_all(), line 172: sending signal 3 SIGQUIT to child 5229 (pool default)
May 04 09:15:06.285620 [NOTICE] fpm_pctl_kill_all(), line 172: sending signal 3 SIGQUIT to child 5228 (pool default)
May 04 09:15:06.285634 [NOTICE] fpm_pctl_kill_all(), line 172: sending signal 3 SIGQUIT to child 5227 (pool default)
May 04 09:15:06.285647 [NOTICE] fpm_pctl_kill_all(), line 172: sending signal 3 SIGQUIT to child 5226 (pool default)
May 04 09:15:06.285661 [NOTICE] fpm_pctl_kill_all(), line 172: sending signal 3 SIGQUIT to child 5225 (pool default)
May 04 09:15:06.285674 [NOTICE] fpm_pctl_kill_all(), line 172: sending signal 3 SIGQUIT to child 5224 (pool default)
May 04 09:15:06.285687 [NOTICE] fpm_pctl_kill_all(), line 172: sending signal 3 SIGQUIT to child 5223 (pool default)
May 04 09:15:06.285701 [NOTICE] fpm_pctl_kill_all(), line 172: sending signal 3 SIGQUIT to child 5222 (pool default)
May 04 09:15:06.285771 [NOTICE] fpm_pctl_kill_all(), line 172: sending signal 3 SIGQUIT to child 5221 (pool default)
May 04 09:15:06.285790 [NOTICE] fpm_pctl_kill_all(), line 172: sending signal 3 SIGQUIT to child 5220 (pool default)
May 04 09:15:06.285803 [NOTICE] fpm_pctl_kill_all(), line 172: sending signal 3 SIGQUIT to child 5219 (pool default)
May 04 09:15:06.285817 [NOTICE] fpm_pctl_kill_all(), line 172: sending signal 3 SIGQUIT to child 5218 (pool default)
May 04 09:15:06.285830 [NOTICE] fpm_pctl_kill_all(), line 172: sending signal 3 SIGQUIT to child 5217 (pool default)
May 04 09:15:06.285843 [NOTICE] fpm_pctl_kill_all(), line 172: sending signal 3 SIGQUIT to child 5216 (pool default)
May 04 09:15:06.285857 [NOTICE] fpm_pctl_kill_all(), line 172: sending signal 3 SIGQUIT to child 5215 (pool default)
May 04 09:15:06.285870 [NOTICE] fpm_pctl_kill_all(), line 172: sending signal 3 SIGQUIT to child 5214 (pool default)
May 04 09:15:06.285884 [NOTICE] fpm_pctl_kill_all(), line 172: sending signal 3 SIGQUIT to child 5213 (pool default)
May 04 09:15:06.285898 [NOTICE] fpm_pctl_kill_all(), line 172: sending signal 3 SIGQUIT to child 5212 (pool default)
May 04 09:15:06.285912 [NOTICE] fpm_pctl_kill_all(), line 172: sending signal 3 SIGQUIT to child 5211 (pool default)
May 04 09:15:06.285925 [NOTICE] fpm_pctl_kill_all(), line 172: sending signal 3 SIGQUIT to child 5210 (pool default)
May 04 09:15:06.285936 [NOTICE] fpm_pctl_kill_all(), line 181: 24 children are still alive
May 04 09:15:06.777816 [NOTICE] fpm_got_signal(), line 48: received SIGCHLD
May 04 09:15:06.777988 [NOTICE] fpm_children_bury(), line 215: child 5229 (pool default) exited with code 0 after 900.649039 seconds from start
May 04 09:15:06.779711 [NOTICE] fpm_got_signal(), line 48: received SIGCHLD
May 04 09:15:06.779775 [NOTICE] fpm_children_bury(), line 215: child 5222 (pool default) exited with code 0 after 900.689251 seconds from start
May 04 09:15:06.787171 [NOTICE] fpm_got_signal(), line 48: received SIGCHLD
May 04 09:15:06.787253 [NOTICE] fpm_children_bury(), line 215: child 5210 (pool default) exited with code 0 after 900.762307 seconds from start
May 04 09:15:06.787281 [NOTICE] fpm_children_bury(), line 215: child 5212 (pool default) exited with code 0 after 900.757460 seconds from start
May 04 09:15:06.787305 [NOTICE] fpm_children_bury(), line 215: child 5217 (pool default) exited with code 0 after 900.726346 seconds from start
May 04 09:15:06.787337 [NOTICE] fpm_children_bury(), line 215: child 5224 (pool default) exited with code 0 after 900.677788 seconds from start
May 04 09:15:06.787362 [NOTICE] fpm_children_bury(), line 215: child 5231 (pool default) exited with code 0 after 900.649860 seconds from start
May 04 09:15:06.788702 [NOTICE] fpm_got_signal(), line 48: received SIGCHLD
May 04 09:15:06.788763 [NOTICE] fpm_children_bury(), line 215: child 5230 (pool default) exited with code 0 after 900.655465 seconds from start
May 04 09:15:06.789947 [NOTICE] fpm_got_signal(), line 48: received SIGCHLD
May 04 09:15:06.789999 [NOTICE] fpm_children_bury(), line 215: child 5216 (pool default) exited with code 0 after 900.733162 seconds from start
May 04 09:15:06.791268 [NOTICE] fpm_got_signal(), line 48: received SIGCHLD
May 04 09:15:06.791323 [NOTICE] fpm_children_bury(), line 215: child 5232 (pool default) exited with code 0 after 900.632372 seconds from start
May 04 09:15:06.792857 [NOTICE] fpm_got_signal(), line 48: received SIGCHLD
May 04 09:15:06.792913 [NOTICE] fpm_children_bury(), line 215: child 5219 (pool default) exited with code 0 after 900.728286 seconds from start
May 04 09:15:06.794079 [NOTICE] fpm_got_signal(), line 48: received SIGCHLD
May 04 09:15:06.794125 [NOTICE] fpm_children_bury(), line 215: child 5214 (pool default) exited with code 0 after 900.747997 seconds from start
May 04 09:15:06.797578 [NOTICE] fpm_got_signal(), line 48: received SIGCHLD
May 04 09:15:06.797644 [NOTICE] fpm_children_bury(), line 215: child 5211 (pool default) exited with code 0 after 900.768816 seconds from start
May 04 09:15:06.797675 [NOTICE] fpm_children_bury(), line 215: child 5228 (pool default) exited with code 0 after 900.672739 seconds from start
May 04 09:15:06.797714 [NOTICE] fpm_children_bury(), line 215: child 5233 (pool default) exited with code 0 after 900.637708 seconds from start
May 04 09:15:06.799344 [NOTICE] fpm_got_signal(), line 48: received SIGCHLD
May 04 09:15:06.799493 [NOTICE] fpm_children_bury(), line 215: child 5213 (pool default) exited with code 0 after 900.761387 seconds from start
May 04 09:15:06.800998 [NOTICE] fpm_got_signal(), line 48: received SIGCHLD
May 04 09:15:06.801056 [NOTICE] fpm_children_bury(), line 215: child 5227 (pool default) exited with code 0 after 900.680191 seconds from start
May 04 09:15:06.802291 [NOTICE] fpm_got_signal(), line 48: received SIGCHLD
May 04 09:15:06.802347 [NOTICE] fpm_children_bury(), line 215: child 5223 (pool default) exited with code 0 after 900.708089 seconds from start
May 04 09:15:06.803591 [NOTICE] fpm_got_signal(), line 48: received SIGCHLD
May 04 09:15:06.803644 [NOTICE] fpm_children_bury(), line 215: child 5220 (pool default) exited with code 0 after 900.724561 seconds from start
May 04 09:15:06.804988 [NOTICE] fpm_got_signal(), line 48: received SIGCHLD
May 04 09:15:06.805043 [NOTICE] fpm_children_bury(), line 215: child 5226 (pool default) exited with code 0 after 900.692341 seconds from start
May 04 09:15:06.806961 [NOTICE] fpm_got_signal(), line 48: received SIGCHLD
May 04 09:15:06.807021 [NOTICE] fpm_children_bury(), line 215: child 5221 (pool default) exited with code 0 after 900.720945 seconds from start
May 04 09:15:06.808362 [NOTICE] fpm_got_signal(), line 48: received SIGCHLD
May 04 09:15:06.808415 [NOTICE] fpm_children_bury(), line 215: child 5218 (pool default) exited with code 0 after 900.744829 seconds from start
May 04 09:15:06.809670 [NOTICE] fpm_got_signal(), line 48: received SIGCHLD
May 04 09:15:06.809722 [NOTICE] fpm_children_bury(), line 215: child 5215 (pool default) exited with code 0 after 900.756564 seconds from start
May 04 09:15:09.716097 [NOTICE] fpm_got_signal(), line 48: received SIGCHLD
May 04 09:15:09.716218 [NOTICE] fpm_children_bury(), line 215: child 5225 (pool default) exited with code 0 after 903.604549 seconds from start
May 04 09:15:09.716241 [NOTICE] fpm_pctl_exec(), line 95: reloading: execvp("/usr/local/php/bin/php-cgi", {"/usr/local/php/bin/php-cgi", "--fpm", "--fpm-config", "/usr/local/php/etc/php-fpm.conf"})
May 04 09:15:11.529595 [NOTICE] fpm_unix_init_main(), line 284: getrlimit(nofile): max:51200, cur:51200
May 04 09:15:11.529876 [NOTICE] fpm_sockets_init_main(), line 364: using inherited socket fd=6, "/tmp/php-cgi.sock"
May 04 09:15:11.530198 [NOTICE] fpm_event_init_main(), line 88: libevent: using epoll
May 04 09:15:11.537338 [NOTICE] fpm_init(), line 52: fpm is running, pid 5752
May 04 09:15:11.540434 [NOTICE] fpm_children_make(), line 352: child 5753 (pool default) started
May 04 09:15:11.543833 [NOTICE] fpm_children_make(), line 352: child 5754 (pool default) started
May 04 09:15:11.546982 [NOTICE] fpm_children_make(), line 352: child 5755 (pool default) started
May 04 09:15:11.548542 [NOTICE] fpm_children_make(), line 352: child 5756 (pool default) started
May 04 09:15:11.553810 [NOTICE] fpm_children_make(), line 352: child 5757 (pool default) started
May 04 09:15:11.556765 [NOTICE] fpm_children_make(), line 352: child 5758 (pool default) started
May 04 09:15:11.560099 [NOTICE] fpm_children_make(), line 352: child 5759 (pool default) started
May 04 09:15:11.563547 [NOTICE] fpm_children_make(), line 352: child 5760 (pool default) started
May 04 09:15:11.566670 [NOTICE] fpm_children_make(), line 352: child 5761 (pool default) started
May 04 09:15:11.621857 [NOTICE] fpm_event_loop(), line 107: libevent: entering main loop
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-12-24 21:26 , Processed in 0.025261 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表