Welcome! Log In Create A New Profile

Advanced

php-fpm serves blank pages after spawn

Posted by xindxr 
php-fpm serves blank pages after spawn
February 05, 2012 02:34AM
My server was hacked this week so I had to reinstall everything, I am running nginx 1.0.11 and php-fpm 5.3.10.



Everything works great on php-fpm start until the first child is exited and a new one spawned.



At this point, everything stops. When I say everything stops, I mean that all log entries are stopped, all pages are served as blank and nothing is working. The processes are still running just fine, but everything becomes unresponsive.



Been trouble shooting for 24 hours and I am stuck...



I've resorted to a major hack just to keep something up - php-fpm restart every minute cronjob



php-fpm.conf



[global]

include=/etc/php-fpm.d/*.conf

pid = /var/run/php-fpm/php-fpm.pid

error_log = /var/log/php-fpm/error.log







www.conf (in the /etc/php-fpm.d/ folder)



[mypool]



listen = 127.0.0.1:9000

listen.backlog = -1

listen.allowed_clients = 127.0.0.1



user = flash

group = flash



pm = dynamic

pm.max_children = 50

pm.start_servers = 10

pm.min_spare_servers = 5

pm.max_spare_servers = 10

pm.max_requests = 100

pm.status_path = /status

request_terminate_timeout = 60

request_slowlog_timeout = 60

slowlog = /var/log/php-fpm/www-slow.log



env[HOSTNAME] = $HOSTNAME

env[PATH] = /usr/local/bin:/usr/bin:/bin

env[TMP] = /tmp

env[TMPDIR] = /tmp

env[TEMP] = /tmp



php_admin_value[error_log] = /var/log/php-fpm/www-error.log

php_admin_flag[log_errors] = on









nginx conf



user nginx flash;

worker_processes 3;

worker_rlimit_nofile 8192;



error_log /var/log/nginx/error.log error;

pid /var/run/nginx.pid;





events {

worker_connections 1024;

use epoll;

}





http {

include /etc/nginx/mime.types;

default_type application/octet-stream;



log_format main '$remote_addr - $remote_user [$time_local] "$request" '

'$status $body_bytes_sent "$http_referer" '

'"$http_user_agent" "$http_x_forwarded_for"';



access_log /var/log/nginx/access.log main;



log_format bots '[$time_local] "$http_user_agent" $host $request_uri $status';



limit_zone slimits $binary_remote_addr 1m;

limit_conn slimits 5;

access_log /var/log/nginx/bot.log bots;



sendfile on;

tcp_nopush on;

tcp_nodelay on;

server_tokens off;

gzip off;

keepalive_timeout 5;



server_name_in_redirect off;

client_max_body_size 64M;

server {

listen 80;

server_name ~^(www\.)?(?P<domain>.+)$;

if ($host ~* www\.(.*)) {

set $wwwless $1;

rewrite ^(.*)$ $scheme://$wwwless$1 permanent;

}



location ~ \.php$ {

include /etc/nginx/fastcgi_params;

fastcgi_pass 127.0.0.1:9000;

fastcgi_index index.php;

fastcgi_param SCRIPT_FILENAME /home/flash/public_html$fastcgi_script_name;

}



location / {

gzip on;

gzip_http_version 1.0;

gzip_vary on;

gzip_comp_level 3;

gzip_proxied any;

gzip_types text/plain text/html text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;

gzip_buffers 16 8k;

root /home/xindxr/public_html;

index index.php index.html index.htm;

if (-f $request_filename) {

break;

}

set $supercache_file '';

set $supercache_uri $request_uri;

if ($request_method = POST) {

set $supercache_uri '';

}

if ($query_string) {

set $supercache_uri '';

}

if ($http_cookie ~* "comment_author_|wordpress|wp-postpass_" ) {

set $supercache_uri '';

}

if ($supercache_uri ~ ^(.+)$) {

set $supercache_file /wp-content/cache/supercache/$http_host/$1index.html;

}

if (-f $document_root$supercache_file) {

rewrite ^(.*)$ $supercache_file break;

}

if (!-e $request_filename) {

rewrite . /index.php last;

}

}

}

}
Re: php-fpm serves blank pages after spawn
February 05, 2012 02:38AM
CORRECTION:

gzip_buffers 16 8k;

root /home/xindxr/public_html;


IS ACTUALLY:

gzip_buffers 16 8k;

root /home/flash/public_html;
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 195
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready