分类: 系统运维
2011-03-11 11:26:56
nginx+fastcgi问题及解决办法
1、内核错误
Mar 11 10:31:52 web2 kernel: [1117529.269606] php-cgi[13361]: segfault at 18 ip 71add2 sp 7fff874aafc0 error 4 in php-cgi[400000+695000]
Mar 11 10:32:08 web2 kernel: [1117594.788153] php-cgi[14010]: segfault at 18 ip 71add2 sp 7fff874aafe0 error 4 in php-cgi[400000+695000]
Mar 11 10:32:20 web2 kernel: [1117644.876692] php-cgi[10184]: segfault at 18 ip 71add2 sp 7fff874aaad0 error 4 in php-cgi[400000+695000]
2、php-fpm日志错误
Mar 11 11:20:30.771909 [NOTICE] fpm_got_signal(), line 48: received SIGCHLD
Mar 11 11:20:30.771967 [WARNING] fpm_children_bury(), line 215: child 16002 (pool default) exited on signal 11 SIGSEGV after 3150.449910 seconds from start
Mar 11 11:20:30.772419 [NOTICE] fpm_children_make(), line 352: child 19565 (pool default) started
3、php-cgi占用内存问题
1和2怀疑为同一问题所致,但目前还没有找到原因,比较差的解决办法是加大children的数量,即可解决,但加大的后果是php-cgi专用大量内存,需要一个平衡点,即children和max_requests之间的平衡,max_requests控制着php-cgi进程的重启速度,最终内存问题成为目前的最大问题了。