nginx & php-fpm [debug] 11: Resource temporarily unavailable The 2019 Stack Overflow Developer Survey Results Are InBlank Page: wordpress on nginx+php-fpmWhy does try_files append each path together?phpmyadmin having problems on nginx and php-fpm on RHEL 6Nginx php-fpm pool being blocked and stop respondingNGINX don't parse .php5 as .phpnginx rewrite throw 404 with last and breaknginx PHP files downloading instead of executingCodeIgniter nginx rewrite rules for i8ln URL'sHow to configure nginx to serve one site from two different document root and using different php depending on URLNGINX virtual host config for Magento2 in a subfolder
Getting crown tickets for Statue of Liberty
Mathematics of imaging the black hole
Relationship between Gromov-Witten and Taubes' Gromov invariant
What do hard-Brexiteers want with respect to the Irish border?
What to do when moving next to a bird sanctuary with a loosely-domesticated cat?
How to display lines in a file like ls displays files in a directory?
What is this sharp, curved notch on my knife for?
How do you keep chess fun when your opponent constantly beats you?
Will it cause any balance problems to have PCs level up and gain the benefits of a long rest mid-fight?
How to charge AirPods to keep battery healthy?
How do I free up internal storage if I don't have any apps downloaded?
What do I do when my TA workload is more than expected?
Is it okay to consider publishing in my first year of PhD?
Flight paths in orbit around Ceres?
If a sorcerer casts the Banishment spell on a PC while in Avernus, does the PC return to their home plane?
Is it safe to harvest rainwater that fell on solar panels?
Accepted by European university, rejected by all American ones I applied to? Possible reasons?
Are turbopumps lubricated?
Is it ethical to upload a automatically generated paper to a non peer-reviewed site as part of a larger research?
Falsification in Math vs Science
Can there be female White Walkers?
Did Scotland spend $250,000 for the slogan "Welcome to Scotland"?
Is it ok to offer lower paid work as a trial period before negotiating for a full-time job?
For what reasons would an animal species NOT cross a *horizontal* land bridge?
nginx & php-fpm [debug] 11: Resource temporarily unavailable
The 2019 Stack Overflow Developer Survey Results Are InBlank Page: wordpress on nginx+php-fpmWhy does try_files append each path together?phpmyadmin having problems on nginx and php-fpm on RHEL 6Nginx php-fpm pool being blocked and stop respondingNGINX don't parse .php5 as .phpnginx rewrite throw 404 with last and breaknginx PHP files downloading instead of executingCodeIgniter nginx rewrite rules for i8ln URL'sHow to configure nginx to serve one site from two different document root and using different php depending on URLNGINX virtual host config for Magento2 in a subfolder
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
New Development
The core php error logs are below, but the site specific error logs show this. The memory on my php.ini file is :
memory_size 1024;
so it's not php's memory limit. I've also disabled all my plugin's, so it's not the memory limit that is on my security plugin.
2014/12/13 16:12:40 [error] 28264#0: *212 FastCGI sent in stderr: "PHP message: PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 71 bytes) in /var/www/..
I am having troubles with a wordpress plugin running a full batch of imports. I get this error when I enable the nginx debug. The result is I get an immediate 404 error afterwards and I am unable to fully import my data.
I am pretty sure this is a bug, but I can't find the right answer to fix it.
Please Help.
What I have done so far:
- It looked like a nginx bug and my nginx version was old, so I upgraded. No change.
- It looked and still looks like it could be related to php-fpm. I've upgraded. No change.
- I've disabled all of my plugins. No Change.
Server
- CentOS 6.0
- nginx v 1.0.15
- PHP-FPM v 5.3.3 (fpm-fcgi)
- Webserver running 3 very low traffic sites
- PHP-FPM is set to ondemmand
PHP.ini config:
- pm = ondemand
- pm.process_idle_timeout = 50s
- pm.max_children = 20
- pm.start_servers = 1
- pm.min_spare_servers = 3
- pm.max_spare_servers = 5
- pm.max_requests = 1024
- pm.status_path = /status
I am unable to post my logs, so please check out the comparison
Nginx Log:
[12-Dec-2014 06:35:49.398315] DEBUG: pid 13384, fpm_pctl_perform_idle_server_maintenance(), line 362: [pool www] currently 0 active children, 1 spare children
[12-Dec-2014 06:35:50.399474] DEBUG: pid 13384, fpm_pctl_perform_idle_server_maintenance(), line 362: [pool www] currently 0 active children, 1 spare children
[12-Dec-2014 06:35:51.400765] DEBUG: pid 13384, fpm_pctl_perform_idle_server_maintenance(), line 362: [pool www] currently 0 active children, 1 spare children
[12-Dec-2014 06:35:52.402053] DEBUG: pid 13384, fpm_pctl_perform_idle_server_maintenance(), line 362: [pool www] currently 0 active children, 1 spare children
[12-Dec-2014 06:35:53.403346] DEBUG: pid 13384, fpm_pctl_perform_idle_server_maintenance(), line 362: [pool www] currently 0 active children, 1 spare children
[12-Dec-2014 06:35:53.417762] DEBUG: pid 13384, fpm_got_signal(), line 72: received SIGCHLD
[12-Dec-2014 06:35:53.417836] DEBUG: pid 13384, fpm_children_bury(), line 254: [pool www] child 18327 has been killed by the process managment after 52.123053 seconds from start
[12-Dec-2014 06:35:53.417863] DEBUG: pid 13384, fpm_event_loop(), line 411: event module triggered 1 events
[12-Dec-2014 06:35:54.404978] DEBUG: pid 13384, fpm_pctl_perform_idle_server_maintenance(), line 362: [pool www] currently 0 active children, 0 spare children
[12-Dec-2014 06:35:54.687559] DEBUG: pid 13384, fpm_children_make(), line 421: [pool www] child 18397 started
[12-Dec-2014 06:35:54.687593] DEBUG: pid 13384, fpm_pctl_on_socket_accept(), line 536: [pool www] got accept without idle child available .... I forked
[12-Dec-2014 06:35:54.687602] DEBUG: pid 13384, fpm_event_loop(), line 411: event module triggered 1 events
[12-Dec-2014 06:35:55.406455] DEBUG: pid 13384, fpm_pctl_perform_idle_server_maintenance(), line 362: [pool www] currently 0 active children, 1 spare children
[12-Dec-2014 06:35:56.407633] DEBUG: pid 13384, fpm_pctl_perform_idle_server_maintenance(), line 362: [pool www] currently 0 active children, 1 spare children
[12-Dec-2014 06:35:57.408949] DEBUG: pid 13384, fpm_pctl_perform_idle_server_maintenance(), line 362: [pool www] currently 0 active children, 1 spare children
[12-Dec-2014 06:35:58.410111] DEBUG: pid 13384, fpm_pctl_perform_idle_server_maintenance(), line 362: [pool www] currently 0 active children, 1 spare children
PHP log:
2014/12/12 06:35:02 [debug] 13350#0: *223 http header done
2014/12/12 06:35:54 [debug] 13350#0: accept on 0.0.0.0:80, ready: 1
2014/12/12 06:35:54 [debug] 13350#0: posix_memalign: 0000000002273A80:256 @16
2014/12/12 06:35:54 [debug] 13350#0: *226 accept: 66.249.67.123 fd:3
2014/12/12 06:35:54 [debug] 13350#0: *226 event timer add: 3: 60000:1418387814684
2014/12/12 06:35:54 [debug] 13350#0: *226 epoll add event: fd:3 op:1 ev:80000001
2014/12/12 06:35:54 [debug] 13350#0: accept() not ready (11: Resource temporarily unavailable)
2014/12/12 06:35:54 [debug] 13350#0: *226 malloc: 0000000002274AF0:1296
2014/12/12 06:35:54 [debug] 13350#0: *226 posix_memalign: 0000000002273BE0:256 @16
2014/12/12 06:35:54 [debug] 13350#0: *226 malloc: 000000000232F4B0:131072
2014/12/12 06:35:54 [debug] 13350#0: *226 posix_memalign: 00000000021F7590:4096 @16
2014/12/12 06:35:54 [debug] 13350#0: *226 http process request line
2014/12/12 06:35:54 [debug] 13350#0: *226 recv: fd:3 315 of 131072
2014/12/12 06:35:54 [debug] 13350#0: *226 http request line: "GET /stores/giltcity/page/78/ HTTP/1.1"
2014/12/12 06:35:54 [debug] 13350#0: *226 http uri: "/stores/giltcity/page/78/"
2014/12/12 06:35:54 [debug] 13350#0: *226 http args: ""
2014/12/12 06:35:54 [debug] 13350#0: *226 http exten: ""
2014/12/12 06:35:54 [debug] 13350#0: *226 http process request header line
2014/12/12 06:35:54 [debug] 13350#0: *226 http header: "Host: mydiscountman.com"
2014/12/12 06:35:54 [debug] 13350#0: *226 http header: "Connection: Keep-alive"
2014/12/12 06:35:54 [debug] 13350#0: *226 http header: "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
2014/12/12 06:35:54 [debug] 13350#0: *226 http header: "From: googlebot(at)googlebot.com"
2014/12/12 06:35:54 [debug] 13350#0: *226 http header: "Accept-Encoding: gzip,deflate"
2014/12/12 06:35:54 [debug] 13350#0: *226 http header: "User-Agent: Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
2014/12/12 06:35:54 [debug] 13350#0: *226 http header done
2014/12/12 06:37:11 [debug] 13350#0: accept on 0.0.0.0:80, ready: 1
Nginx Global Config /etc/nginx/nginx.conf :
user apache;
worker_processes 1;
pid /var/run/nginx.pid;
events
worker_connections 768;
multi_accept on;
use epoll;
http
# Let NGINX get the real client IP for its access logs
set_real_ip_from 127.0.0.1;
real_ip_header X-Forwarded-For;
# Basic Settings
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 20;
client_max_body_size 15m;
client_body_timeout 60;
client_header_timeout 60;
client_body_buffer_size 128k;
client_header_buffer_size 128k;
large_client_header_buffers 4 16k;
send_timeout 60;
reset_timedout_connection on;
types_hash_max_size 8192;
server_tokens off;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
# Logging Settings
# access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log debug;
# Log Format
log_format main '$remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
# Gzip Settings
gzip on;
gzip_static on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_min_length 512;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types text/css text/javascript text/xml text/plain text/x-component
application/javascript application/x-javascript application/json
application/xml application/rss+xml font/truetype application/x-font-ttf
font/opentype application/vnd.ms-fontobject image/svg+xml;
# Virtual Host Configs
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
Nginx Site Config /etc/nginx/sites-available/testme :
server pot
PHP.ini
[PHP]
;;;;;;;;;;;;;;;;;;;
; Quick Reference ;
;;;;;;;;;;;;;;;;;;;
error_reporting = E_ALL & ~E_NOTICE
extension=apc.so
;;;;;;;;;;;;;;;;;;;;
; Language Options ;
;;;;;;;;;;;;;;;;;;;;
engine = On
short_open_tag = Off
asp_tags = Off
precision = 14
y2k_compliance = On
zlib.output_compression = Off
implicit_flush = Off
unserialize_callback_func =
serialize_precision = 100
safe_mode = Off
safe_mode_gid = Off
safe_mode_include_dir =
safe_mode_exec_dir =
safe_mode_allowed_env_vars = PHP_
safe_mode_protected_env_vars = LD_LIBRARY_PATH
disable_functions =
disable_classes =
realpath_cache_size = 16k
realpath_cache_ttl = 120
;;;;;;;;;;;;;;;;;
; Miscellaneous ;
;;;;;;;;;;;;;;;;;
expose_php = On
;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;
max_execution_time = 600
set_time_limit = 600
max_input_time = 300
memory_limit = 2048M
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Error handling and logging ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
error_reporting = E_ALL & ~E_DEPRECATED
display_errors = Off
display_startup_errors = Off
log_errors = On
log_errors_max_len = 1024
ignore_repeated_errors = Off
ignore_repeated_source = Off
report_memleaks = On
track_errors = Off
html_errors = Off
error_log = /var/log/php-fpm/www-error.log
;;;;;;;;;;;;;;;;;
; Data Handling ;
;;;;;;;;;;;;;;;;;
variables_order = "GPCS"
request_order = "GP"
register_globals = Off
register_long_arrays = Off
register_argc_argv = Off
auto_globals_jit = On
post_max_size = 384M
magic_quotes_gpc = Off
magic_quotes_runtime = Off
magic_quotes_sybase = Off
auto_prepend_file =
auto_append_file =
default_mimetype = "text/html"
;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;
doc_root =
user_dir =
enable_dl = Off
cgi.fix_pathinfo=0
;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;
file_uploads = On
upload_max_filesize = 512M
;;;;;;;;;;;;;;;;;;
; Fopen wrappers ;
;;;;;;;;;;;;;;;;;;
allow_url_fopen = On
allow_url_include = Off
default_socket_timeout = 120
;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;
; Module Settings ;
;;;;;;;;;;;;;;;;;;;
[Date]
date.timezone = America/Chicago
[filter]
[iconv]
[intl]
[sqlite]
[sqlite3]
[Pcre]
[Pdo]
[Phar]
[Syslog]
define_syslog_variables = Off
[mail function]
SMTP = localhost
smtp_port = 25
sendmail_path = /usr/sbin/sendmail -t -i
mail.add_x_header = On
[SQL]
sql.safe_mode = Off
[ODBC]
odbc.allow_persistent = On
odbc.check_persistent = On
odbc.max_persistent = -1
odbc.max_links = -1
odbc.defaultlrl = 4096
odbc.defaultbinmode = 1
[MySQL]
mysql.allow_persistent = On
mysql.max_persistent = -1
mysql.max_links = -1
mysql.default_port =
mysql.default_socket =
mysql.default_host =
mysql.default_user =
mysql.default_password =
mysql.connect_timeout = 300
mysql.trace_mode = Off
[MySQLi]
mysqli.max_links = -1
mysqli.default_port = 3306
mysqli.default_socket =
mysqli.default_host =
mysqli.default_user =
mysqli.default_pw =
mysqli.reconnect = Off
[PostgresSQL]
pgsql.allow_persistent = On
pgsql.auto_reset_persistent = Off
pgsql.max_persistent = -1
pgsql.max_links = -1
pgsql.ignore_notice = 0
pgsql.log_notice = 0
[Sybase-CT]
sybct.allow_persistent = On
sybct.max_persistent = -1
sybct.max_links = -1
sybct.min_server_severity = 10
sybct.min_client_severity = 10
[bcmath]
bcmath.scale = 0
[browscap]
[Session]
session.save_handler = files
session.save_path = "/var/lib/php/session"
session.use_cookies = 1
session.use_only_cookies = 1
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain =
session.cookie_httponly =
session.serialize_handler = php
session.gc_probability = 1
session.gc_divisor = 1000
session.gc_maxlifetime = 1440
session.bug_compat_42 = Off
session.bug_compat_warn = Off
session.referer_check =
session.entropy_length = 0
session.entropy_file =
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 0
session.hash_function = 0
session.hash_bits_per_character = 5
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"
[MSSQL]
mssql.allow_persistent = On
mssql.max_persistent = -1
mssql.max_links = -1
mssql.min_error_severity = 10
mssql.min_message_severity = 10
mssql.compatability_mode = Off
mssql.timeout = 300
mssql.secure_connection = Off
[Tidy]
tidy.clean_output = Off
[soap]
soap.wsdl_cache_enabled=1
soap.wsdl_cache_dir="/tmp"
soap.wsdl_cache_ttl=86400
nginx php-fpm
bumped to the homepage by Community♦ 4 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
|
show 6 more comments
New Development
The core php error logs are below, but the site specific error logs show this. The memory on my php.ini file is :
memory_size 1024;
so it's not php's memory limit. I've also disabled all my plugin's, so it's not the memory limit that is on my security plugin.
2014/12/13 16:12:40 [error] 28264#0: *212 FastCGI sent in stderr: "PHP message: PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 71 bytes) in /var/www/..
I am having troubles with a wordpress plugin running a full batch of imports. I get this error when I enable the nginx debug. The result is I get an immediate 404 error afterwards and I am unable to fully import my data.
I am pretty sure this is a bug, but I can't find the right answer to fix it.
Please Help.
What I have done so far:
- It looked like a nginx bug and my nginx version was old, so I upgraded. No change.
- It looked and still looks like it could be related to php-fpm. I've upgraded. No change.
- I've disabled all of my plugins. No Change.
Server
- CentOS 6.0
- nginx v 1.0.15
- PHP-FPM v 5.3.3 (fpm-fcgi)
- Webserver running 3 very low traffic sites
- PHP-FPM is set to ondemmand
PHP.ini config:
- pm = ondemand
- pm.process_idle_timeout = 50s
- pm.max_children = 20
- pm.start_servers = 1
- pm.min_spare_servers = 3
- pm.max_spare_servers = 5
- pm.max_requests = 1024
- pm.status_path = /status
I am unable to post my logs, so please check out the comparison
Nginx Log:
[12-Dec-2014 06:35:49.398315] DEBUG: pid 13384, fpm_pctl_perform_idle_server_maintenance(), line 362: [pool www] currently 0 active children, 1 spare children
[12-Dec-2014 06:35:50.399474] DEBUG: pid 13384, fpm_pctl_perform_idle_server_maintenance(), line 362: [pool www] currently 0 active children, 1 spare children
[12-Dec-2014 06:35:51.400765] DEBUG: pid 13384, fpm_pctl_perform_idle_server_maintenance(), line 362: [pool www] currently 0 active children, 1 spare children
[12-Dec-2014 06:35:52.402053] DEBUG: pid 13384, fpm_pctl_perform_idle_server_maintenance(), line 362: [pool www] currently 0 active children, 1 spare children
[12-Dec-2014 06:35:53.403346] DEBUG: pid 13384, fpm_pctl_perform_idle_server_maintenance(), line 362: [pool www] currently 0 active children, 1 spare children
[12-Dec-2014 06:35:53.417762] DEBUG: pid 13384, fpm_got_signal(), line 72: received SIGCHLD
[12-Dec-2014 06:35:53.417836] DEBUG: pid 13384, fpm_children_bury(), line 254: [pool www] child 18327 has been killed by the process managment after 52.123053 seconds from start
[12-Dec-2014 06:35:53.417863] DEBUG: pid 13384, fpm_event_loop(), line 411: event module triggered 1 events
[12-Dec-2014 06:35:54.404978] DEBUG: pid 13384, fpm_pctl_perform_idle_server_maintenance(), line 362: [pool www] currently 0 active children, 0 spare children
[12-Dec-2014 06:35:54.687559] DEBUG: pid 13384, fpm_children_make(), line 421: [pool www] child 18397 started
[12-Dec-2014 06:35:54.687593] DEBUG: pid 13384, fpm_pctl_on_socket_accept(), line 536: [pool www] got accept without idle child available .... I forked
[12-Dec-2014 06:35:54.687602] DEBUG: pid 13384, fpm_event_loop(), line 411: event module triggered 1 events
[12-Dec-2014 06:35:55.406455] DEBUG: pid 13384, fpm_pctl_perform_idle_server_maintenance(), line 362: [pool www] currently 0 active children, 1 spare children
[12-Dec-2014 06:35:56.407633] DEBUG: pid 13384, fpm_pctl_perform_idle_server_maintenance(), line 362: [pool www] currently 0 active children, 1 spare children
[12-Dec-2014 06:35:57.408949] DEBUG: pid 13384, fpm_pctl_perform_idle_server_maintenance(), line 362: [pool www] currently 0 active children, 1 spare children
[12-Dec-2014 06:35:58.410111] DEBUG: pid 13384, fpm_pctl_perform_idle_server_maintenance(), line 362: [pool www] currently 0 active children, 1 spare children
PHP log:
2014/12/12 06:35:02 [debug] 13350#0: *223 http header done
2014/12/12 06:35:54 [debug] 13350#0: accept on 0.0.0.0:80, ready: 1
2014/12/12 06:35:54 [debug] 13350#0: posix_memalign: 0000000002273A80:256 @16
2014/12/12 06:35:54 [debug] 13350#0: *226 accept: 66.249.67.123 fd:3
2014/12/12 06:35:54 [debug] 13350#0: *226 event timer add: 3: 60000:1418387814684
2014/12/12 06:35:54 [debug] 13350#0: *226 epoll add event: fd:3 op:1 ev:80000001
2014/12/12 06:35:54 [debug] 13350#0: accept() not ready (11: Resource temporarily unavailable)
2014/12/12 06:35:54 [debug] 13350#0: *226 malloc: 0000000002274AF0:1296
2014/12/12 06:35:54 [debug] 13350#0: *226 posix_memalign: 0000000002273BE0:256 @16
2014/12/12 06:35:54 [debug] 13350#0: *226 malloc: 000000000232F4B0:131072
2014/12/12 06:35:54 [debug] 13350#0: *226 posix_memalign: 00000000021F7590:4096 @16
2014/12/12 06:35:54 [debug] 13350#0: *226 http process request line
2014/12/12 06:35:54 [debug] 13350#0: *226 recv: fd:3 315 of 131072
2014/12/12 06:35:54 [debug] 13350#0: *226 http request line: "GET /stores/giltcity/page/78/ HTTP/1.1"
2014/12/12 06:35:54 [debug] 13350#0: *226 http uri: "/stores/giltcity/page/78/"
2014/12/12 06:35:54 [debug] 13350#0: *226 http args: ""
2014/12/12 06:35:54 [debug] 13350#0: *226 http exten: ""
2014/12/12 06:35:54 [debug] 13350#0: *226 http process request header line
2014/12/12 06:35:54 [debug] 13350#0: *226 http header: "Host: mydiscountman.com"
2014/12/12 06:35:54 [debug] 13350#0: *226 http header: "Connection: Keep-alive"
2014/12/12 06:35:54 [debug] 13350#0: *226 http header: "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
2014/12/12 06:35:54 [debug] 13350#0: *226 http header: "From: googlebot(at)googlebot.com"
2014/12/12 06:35:54 [debug] 13350#0: *226 http header: "Accept-Encoding: gzip,deflate"
2014/12/12 06:35:54 [debug] 13350#0: *226 http header: "User-Agent: Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
2014/12/12 06:35:54 [debug] 13350#0: *226 http header done
2014/12/12 06:37:11 [debug] 13350#0: accept on 0.0.0.0:80, ready: 1
Nginx Global Config /etc/nginx/nginx.conf :
user apache;
worker_processes 1;
pid /var/run/nginx.pid;
events
worker_connections 768;
multi_accept on;
use epoll;
http
# Let NGINX get the real client IP for its access logs
set_real_ip_from 127.0.0.1;
real_ip_header X-Forwarded-For;
# Basic Settings
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 20;
client_max_body_size 15m;
client_body_timeout 60;
client_header_timeout 60;
client_body_buffer_size 128k;
client_header_buffer_size 128k;
large_client_header_buffers 4 16k;
send_timeout 60;
reset_timedout_connection on;
types_hash_max_size 8192;
server_tokens off;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
# Logging Settings
# access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log debug;
# Log Format
log_format main '$remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
# Gzip Settings
gzip on;
gzip_static on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_min_length 512;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types text/css text/javascript text/xml text/plain text/x-component
application/javascript application/x-javascript application/json
application/xml application/rss+xml font/truetype application/x-font-ttf
font/opentype application/vnd.ms-fontobject image/svg+xml;
# Virtual Host Configs
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
Nginx Site Config /etc/nginx/sites-available/testme :
server pot
PHP.ini
[PHP]
;;;;;;;;;;;;;;;;;;;
; Quick Reference ;
;;;;;;;;;;;;;;;;;;;
error_reporting = E_ALL & ~E_NOTICE
extension=apc.so
;;;;;;;;;;;;;;;;;;;;
; Language Options ;
;;;;;;;;;;;;;;;;;;;;
engine = On
short_open_tag = Off
asp_tags = Off
precision = 14
y2k_compliance = On
zlib.output_compression = Off
implicit_flush = Off
unserialize_callback_func =
serialize_precision = 100
safe_mode = Off
safe_mode_gid = Off
safe_mode_include_dir =
safe_mode_exec_dir =
safe_mode_allowed_env_vars = PHP_
safe_mode_protected_env_vars = LD_LIBRARY_PATH
disable_functions =
disable_classes =
realpath_cache_size = 16k
realpath_cache_ttl = 120
;;;;;;;;;;;;;;;;;
; Miscellaneous ;
;;;;;;;;;;;;;;;;;
expose_php = On
;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;
max_execution_time = 600
set_time_limit = 600
max_input_time = 300
memory_limit = 2048M
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Error handling and logging ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
error_reporting = E_ALL & ~E_DEPRECATED
display_errors = Off
display_startup_errors = Off
log_errors = On
log_errors_max_len = 1024
ignore_repeated_errors = Off
ignore_repeated_source = Off
report_memleaks = On
track_errors = Off
html_errors = Off
error_log = /var/log/php-fpm/www-error.log
;;;;;;;;;;;;;;;;;
; Data Handling ;
;;;;;;;;;;;;;;;;;
variables_order = "GPCS"
request_order = "GP"
register_globals = Off
register_long_arrays = Off
register_argc_argv = Off
auto_globals_jit = On
post_max_size = 384M
magic_quotes_gpc = Off
magic_quotes_runtime = Off
magic_quotes_sybase = Off
auto_prepend_file =
auto_append_file =
default_mimetype = "text/html"
;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;
doc_root =
user_dir =
enable_dl = Off
cgi.fix_pathinfo=0
;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;
file_uploads = On
upload_max_filesize = 512M
;;;;;;;;;;;;;;;;;;
; Fopen wrappers ;
;;;;;;;;;;;;;;;;;;
allow_url_fopen = On
allow_url_include = Off
default_socket_timeout = 120
;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;
; Module Settings ;
;;;;;;;;;;;;;;;;;;;
[Date]
date.timezone = America/Chicago
[filter]
[iconv]
[intl]
[sqlite]
[sqlite3]
[Pcre]
[Pdo]
[Phar]
[Syslog]
define_syslog_variables = Off
[mail function]
SMTP = localhost
smtp_port = 25
sendmail_path = /usr/sbin/sendmail -t -i
mail.add_x_header = On
[SQL]
sql.safe_mode = Off
[ODBC]
odbc.allow_persistent = On
odbc.check_persistent = On
odbc.max_persistent = -1
odbc.max_links = -1
odbc.defaultlrl = 4096
odbc.defaultbinmode = 1
[MySQL]
mysql.allow_persistent = On
mysql.max_persistent = -1
mysql.max_links = -1
mysql.default_port =
mysql.default_socket =
mysql.default_host =
mysql.default_user =
mysql.default_password =
mysql.connect_timeout = 300
mysql.trace_mode = Off
[MySQLi]
mysqli.max_links = -1
mysqli.default_port = 3306
mysqli.default_socket =
mysqli.default_host =
mysqli.default_user =
mysqli.default_pw =
mysqli.reconnect = Off
[PostgresSQL]
pgsql.allow_persistent = On
pgsql.auto_reset_persistent = Off
pgsql.max_persistent = -1
pgsql.max_links = -1
pgsql.ignore_notice = 0
pgsql.log_notice = 0
[Sybase-CT]
sybct.allow_persistent = On
sybct.max_persistent = -1
sybct.max_links = -1
sybct.min_server_severity = 10
sybct.min_client_severity = 10
[bcmath]
bcmath.scale = 0
[browscap]
[Session]
session.save_handler = files
session.save_path = "/var/lib/php/session"
session.use_cookies = 1
session.use_only_cookies = 1
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain =
session.cookie_httponly =
session.serialize_handler = php
session.gc_probability = 1
session.gc_divisor = 1000
session.gc_maxlifetime = 1440
session.bug_compat_42 = Off
session.bug_compat_warn = Off
session.referer_check =
session.entropy_length = 0
session.entropy_file =
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 0
session.hash_function = 0
session.hash_bits_per_character = 5
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"
[MSSQL]
mssql.allow_persistent = On
mssql.max_persistent = -1
mssql.max_links = -1
mssql.min_error_severity = 10
mssql.min_message_severity = 10
mssql.compatability_mode = Off
mssql.timeout = 300
mssql.secure_connection = Off
[Tidy]
tidy.clean_output = Off
[soap]
soap.wsdl_cache_enabled=1
soap.wsdl_cache_dir="/tmp"
soap.wsdl_cache_ttl=86400
nginx php-fpm
bumped to the homepage by Community♦ 4 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
can you add the nginx config?
– xofer
Dec 12 '14 at 17:07
I have no idea what the answer is, but I'd like to thank you for posting a great first question!
– Hyppy
Dec 12 '14 at 17:25
Thanks Hyppy! This is a tough one. Lots of moving pieces.
– Thomas
Dec 12 '14 at 19:25
so, the forking command is not a bug. The PHP process stopping 100% due to the child being killed is the fundamental problem. Why or how I am still unsure. Any ideas anyone?
– Thomas
Dec 13 '14 at 21:50
1
so it's not php's memory limit.You are drawing false conclusions. The error message says that PHP is running out of memory (at 256mb), the memory limit can be changed at runtime. There is no nginx or PHP fpm complexity/relevance here.
– AD7six
Dec 14 '14 at 13:47
|
show 6 more comments
New Development
The core php error logs are below, but the site specific error logs show this. The memory on my php.ini file is :
memory_size 1024;
so it's not php's memory limit. I've also disabled all my plugin's, so it's not the memory limit that is on my security plugin.
2014/12/13 16:12:40 [error] 28264#0: *212 FastCGI sent in stderr: "PHP message: PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 71 bytes) in /var/www/..
I am having troubles with a wordpress plugin running a full batch of imports. I get this error when I enable the nginx debug. The result is I get an immediate 404 error afterwards and I am unable to fully import my data.
I am pretty sure this is a bug, but I can't find the right answer to fix it.
Please Help.
What I have done so far:
- It looked like a nginx bug and my nginx version was old, so I upgraded. No change.
- It looked and still looks like it could be related to php-fpm. I've upgraded. No change.
- I've disabled all of my plugins. No Change.
Server
- CentOS 6.0
- nginx v 1.0.15
- PHP-FPM v 5.3.3 (fpm-fcgi)
- Webserver running 3 very low traffic sites
- PHP-FPM is set to ondemmand
PHP.ini config:
- pm = ondemand
- pm.process_idle_timeout = 50s
- pm.max_children = 20
- pm.start_servers = 1
- pm.min_spare_servers = 3
- pm.max_spare_servers = 5
- pm.max_requests = 1024
- pm.status_path = /status
I am unable to post my logs, so please check out the comparison
Nginx Log:
[12-Dec-2014 06:35:49.398315] DEBUG: pid 13384, fpm_pctl_perform_idle_server_maintenance(), line 362: [pool www] currently 0 active children, 1 spare children
[12-Dec-2014 06:35:50.399474] DEBUG: pid 13384, fpm_pctl_perform_idle_server_maintenance(), line 362: [pool www] currently 0 active children, 1 spare children
[12-Dec-2014 06:35:51.400765] DEBUG: pid 13384, fpm_pctl_perform_idle_server_maintenance(), line 362: [pool www] currently 0 active children, 1 spare children
[12-Dec-2014 06:35:52.402053] DEBUG: pid 13384, fpm_pctl_perform_idle_server_maintenance(), line 362: [pool www] currently 0 active children, 1 spare children
[12-Dec-2014 06:35:53.403346] DEBUG: pid 13384, fpm_pctl_perform_idle_server_maintenance(), line 362: [pool www] currently 0 active children, 1 spare children
[12-Dec-2014 06:35:53.417762] DEBUG: pid 13384, fpm_got_signal(), line 72: received SIGCHLD
[12-Dec-2014 06:35:53.417836] DEBUG: pid 13384, fpm_children_bury(), line 254: [pool www] child 18327 has been killed by the process managment after 52.123053 seconds from start
[12-Dec-2014 06:35:53.417863] DEBUG: pid 13384, fpm_event_loop(), line 411: event module triggered 1 events
[12-Dec-2014 06:35:54.404978] DEBUG: pid 13384, fpm_pctl_perform_idle_server_maintenance(), line 362: [pool www] currently 0 active children, 0 spare children
[12-Dec-2014 06:35:54.687559] DEBUG: pid 13384, fpm_children_make(), line 421: [pool www] child 18397 started
[12-Dec-2014 06:35:54.687593] DEBUG: pid 13384, fpm_pctl_on_socket_accept(), line 536: [pool www] got accept without idle child available .... I forked
[12-Dec-2014 06:35:54.687602] DEBUG: pid 13384, fpm_event_loop(), line 411: event module triggered 1 events
[12-Dec-2014 06:35:55.406455] DEBUG: pid 13384, fpm_pctl_perform_idle_server_maintenance(), line 362: [pool www] currently 0 active children, 1 spare children
[12-Dec-2014 06:35:56.407633] DEBUG: pid 13384, fpm_pctl_perform_idle_server_maintenance(), line 362: [pool www] currently 0 active children, 1 spare children
[12-Dec-2014 06:35:57.408949] DEBUG: pid 13384, fpm_pctl_perform_idle_server_maintenance(), line 362: [pool www] currently 0 active children, 1 spare children
[12-Dec-2014 06:35:58.410111] DEBUG: pid 13384, fpm_pctl_perform_idle_server_maintenance(), line 362: [pool www] currently 0 active children, 1 spare children
PHP log:
2014/12/12 06:35:02 [debug] 13350#0: *223 http header done
2014/12/12 06:35:54 [debug] 13350#0: accept on 0.0.0.0:80, ready: 1
2014/12/12 06:35:54 [debug] 13350#0: posix_memalign: 0000000002273A80:256 @16
2014/12/12 06:35:54 [debug] 13350#0: *226 accept: 66.249.67.123 fd:3
2014/12/12 06:35:54 [debug] 13350#0: *226 event timer add: 3: 60000:1418387814684
2014/12/12 06:35:54 [debug] 13350#0: *226 epoll add event: fd:3 op:1 ev:80000001
2014/12/12 06:35:54 [debug] 13350#0: accept() not ready (11: Resource temporarily unavailable)
2014/12/12 06:35:54 [debug] 13350#0: *226 malloc: 0000000002274AF0:1296
2014/12/12 06:35:54 [debug] 13350#0: *226 posix_memalign: 0000000002273BE0:256 @16
2014/12/12 06:35:54 [debug] 13350#0: *226 malloc: 000000000232F4B0:131072
2014/12/12 06:35:54 [debug] 13350#0: *226 posix_memalign: 00000000021F7590:4096 @16
2014/12/12 06:35:54 [debug] 13350#0: *226 http process request line
2014/12/12 06:35:54 [debug] 13350#0: *226 recv: fd:3 315 of 131072
2014/12/12 06:35:54 [debug] 13350#0: *226 http request line: "GET /stores/giltcity/page/78/ HTTP/1.1"
2014/12/12 06:35:54 [debug] 13350#0: *226 http uri: "/stores/giltcity/page/78/"
2014/12/12 06:35:54 [debug] 13350#0: *226 http args: ""
2014/12/12 06:35:54 [debug] 13350#0: *226 http exten: ""
2014/12/12 06:35:54 [debug] 13350#0: *226 http process request header line
2014/12/12 06:35:54 [debug] 13350#0: *226 http header: "Host: mydiscountman.com"
2014/12/12 06:35:54 [debug] 13350#0: *226 http header: "Connection: Keep-alive"
2014/12/12 06:35:54 [debug] 13350#0: *226 http header: "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
2014/12/12 06:35:54 [debug] 13350#0: *226 http header: "From: googlebot(at)googlebot.com"
2014/12/12 06:35:54 [debug] 13350#0: *226 http header: "Accept-Encoding: gzip,deflate"
2014/12/12 06:35:54 [debug] 13350#0: *226 http header: "User-Agent: Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
2014/12/12 06:35:54 [debug] 13350#0: *226 http header done
2014/12/12 06:37:11 [debug] 13350#0: accept on 0.0.0.0:80, ready: 1
Nginx Global Config /etc/nginx/nginx.conf :
user apache;
worker_processes 1;
pid /var/run/nginx.pid;
events
worker_connections 768;
multi_accept on;
use epoll;
http
# Let NGINX get the real client IP for its access logs
set_real_ip_from 127.0.0.1;
real_ip_header X-Forwarded-For;
# Basic Settings
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 20;
client_max_body_size 15m;
client_body_timeout 60;
client_header_timeout 60;
client_body_buffer_size 128k;
client_header_buffer_size 128k;
large_client_header_buffers 4 16k;
send_timeout 60;
reset_timedout_connection on;
types_hash_max_size 8192;
server_tokens off;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
# Logging Settings
# access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log debug;
# Log Format
log_format main '$remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
# Gzip Settings
gzip on;
gzip_static on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_min_length 512;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types text/css text/javascript text/xml text/plain text/x-component
application/javascript application/x-javascript application/json
application/xml application/rss+xml font/truetype application/x-font-ttf
font/opentype application/vnd.ms-fontobject image/svg+xml;
# Virtual Host Configs
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
Nginx Site Config /etc/nginx/sites-available/testme :
server pot
PHP.ini
[PHP]
;;;;;;;;;;;;;;;;;;;
; Quick Reference ;
;;;;;;;;;;;;;;;;;;;
error_reporting = E_ALL & ~E_NOTICE
extension=apc.so
;;;;;;;;;;;;;;;;;;;;
; Language Options ;
;;;;;;;;;;;;;;;;;;;;
engine = On
short_open_tag = Off
asp_tags = Off
precision = 14
y2k_compliance = On
zlib.output_compression = Off
implicit_flush = Off
unserialize_callback_func =
serialize_precision = 100
safe_mode = Off
safe_mode_gid = Off
safe_mode_include_dir =
safe_mode_exec_dir =
safe_mode_allowed_env_vars = PHP_
safe_mode_protected_env_vars = LD_LIBRARY_PATH
disable_functions =
disable_classes =
realpath_cache_size = 16k
realpath_cache_ttl = 120
;;;;;;;;;;;;;;;;;
; Miscellaneous ;
;;;;;;;;;;;;;;;;;
expose_php = On
;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;
max_execution_time = 600
set_time_limit = 600
max_input_time = 300
memory_limit = 2048M
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Error handling and logging ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
error_reporting = E_ALL & ~E_DEPRECATED
display_errors = Off
display_startup_errors = Off
log_errors = On
log_errors_max_len = 1024
ignore_repeated_errors = Off
ignore_repeated_source = Off
report_memleaks = On
track_errors = Off
html_errors = Off
error_log = /var/log/php-fpm/www-error.log
;;;;;;;;;;;;;;;;;
; Data Handling ;
;;;;;;;;;;;;;;;;;
variables_order = "GPCS"
request_order = "GP"
register_globals = Off
register_long_arrays = Off
register_argc_argv = Off
auto_globals_jit = On
post_max_size = 384M
magic_quotes_gpc = Off
magic_quotes_runtime = Off
magic_quotes_sybase = Off
auto_prepend_file =
auto_append_file =
default_mimetype = "text/html"
;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;
doc_root =
user_dir =
enable_dl = Off
cgi.fix_pathinfo=0
;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;
file_uploads = On
upload_max_filesize = 512M
;;;;;;;;;;;;;;;;;;
; Fopen wrappers ;
;;;;;;;;;;;;;;;;;;
allow_url_fopen = On
allow_url_include = Off
default_socket_timeout = 120
;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;
; Module Settings ;
;;;;;;;;;;;;;;;;;;;
[Date]
date.timezone = America/Chicago
[filter]
[iconv]
[intl]
[sqlite]
[sqlite3]
[Pcre]
[Pdo]
[Phar]
[Syslog]
define_syslog_variables = Off
[mail function]
SMTP = localhost
smtp_port = 25
sendmail_path = /usr/sbin/sendmail -t -i
mail.add_x_header = On
[SQL]
sql.safe_mode = Off
[ODBC]
odbc.allow_persistent = On
odbc.check_persistent = On
odbc.max_persistent = -1
odbc.max_links = -1
odbc.defaultlrl = 4096
odbc.defaultbinmode = 1
[MySQL]
mysql.allow_persistent = On
mysql.max_persistent = -1
mysql.max_links = -1
mysql.default_port =
mysql.default_socket =
mysql.default_host =
mysql.default_user =
mysql.default_password =
mysql.connect_timeout = 300
mysql.trace_mode = Off
[MySQLi]
mysqli.max_links = -1
mysqli.default_port = 3306
mysqli.default_socket =
mysqli.default_host =
mysqli.default_user =
mysqli.default_pw =
mysqli.reconnect = Off
[PostgresSQL]
pgsql.allow_persistent = On
pgsql.auto_reset_persistent = Off
pgsql.max_persistent = -1
pgsql.max_links = -1
pgsql.ignore_notice = 0
pgsql.log_notice = 0
[Sybase-CT]
sybct.allow_persistent = On
sybct.max_persistent = -1
sybct.max_links = -1
sybct.min_server_severity = 10
sybct.min_client_severity = 10
[bcmath]
bcmath.scale = 0
[browscap]
[Session]
session.save_handler = files
session.save_path = "/var/lib/php/session"
session.use_cookies = 1
session.use_only_cookies = 1
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain =
session.cookie_httponly =
session.serialize_handler = php
session.gc_probability = 1
session.gc_divisor = 1000
session.gc_maxlifetime = 1440
session.bug_compat_42 = Off
session.bug_compat_warn = Off
session.referer_check =
session.entropy_length = 0
session.entropy_file =
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 0
session.hash_function = 0
session.hash_bits_per_character = 5
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"
[MSSQL]
mssql.allow_persistent = On
mssql.max_persistent = -1
mssql.max_links = -1
mssql.min_error_severity = 10
mssql.min_message_severity = 10
mssql.compatability_mode = Off
mssql.timeout = 300
mssql.secure_connection = Off
[Tidy]
tidy.clean_output = Off
[soap]
soap.wsdl_cache_enabled=1
soap.wsdl_cache_dir="/tmp"
soap.wsdl_cache_ttl=86400
nginx php-fpm
New Development
The core php error logs are below, but the site specific error logs show this. The memory on my php.ini file is :
memory_size 1024;
so it's not php's memory limit. I've also disabled all my plugin's, so it's not the memory limit that is on my security plugin.
2014/12/13 16:12:40 [error] 28264#0: *212 FastCGI sent in stderr: "PHP message: PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 71 bytes) in /var/www/..
I am having troubles with a wordpress plugin running a full batch of imports. I get this error when I enable the nginx debug. The result is I get an immediate 404 error afterwards and I am unable to fully import my data.
I am pretty sure this is a bug, but I can't find the right answer to fix it.
Please Help.
What I have done so far:
- It looked like a nginx bug and my nginx version was old, so I upgraded. No change.
- It looked and still looks like it could be related to php-fpm. I've upgraded. No change.
- I've disabled all of my plugins. No Change.
Server
- CentOS 6.0
- nginx v 1.0.15
- PHP-FPM v 5.3.3 (fpm-fcgi)
- Webserver running 3 very low traffic sites
- PHP-FPM is set to ondemmand
PHP.ini config:
- pm = ondemand
- pm.process_idle_timeout = 50s
- pm.max_children = 20
- pm.start_servers = 1
- pm.min_spare_servers = 3
- pm.max_spare_servers = 5
- pm.max_requests = 1024
- pm.status_path = /status
I am unable to post my logs, so please check out the comparison
Nginx Log:
[12-Dec-2014 06:35:49.398315] DEBUG: pid 13384, fpm_pctl_perform_idle_server_maintenance(), line 362: [pool www] currently 0 active children, 1 spare children
[12-Dec-2014 06:35:50.399474] DEBUG: pid 13384, fpm_pctl_perform_idle_server_maintenance(), line 362: [pool www] currently 0 active children, 1 spare children
[12-Dec-2014 06:35:51.400765] DEBUG: pid 13384, fpm_pctl_perform_idle_server_maintenance(), line 362: [pool www] currently 0 active children, 1 spare children
[12-Dec-2014 06:35:52.402053] DEBUG: pid 13384, fpm_pctl_perform_idle_server_maintenance(), line 362: [pool www] currently 0 active children, 1 spare children
[12-Dec-2014 06:35:53.403346] DEBUG: pid 13384, fpm_pctl_perform_idle_server_maintenance(), line 362: [pool www] currently 0 active children, 1 spare children
[12-Dec-2014 06:35:53.417762] DEBUG: pid 13384, fpm_got_signal(), line 72: received SIGCHLD
[12-Dec-2014 06:35:53.417836] DEBUG: pid 13384, fpm_children_bury(), line 254: [pool www] child 18327 has been killed by the process managment after 52.123053 seconds from start
[12-Dec-2014 06:35:53.417863] DEBUG: pid 13384, fpm_event_loop(), line 411: event module triggered 1 events
[12-Dec-2014 06:35:54.404978] DEBUG: pid 13384, fpm_pctl_perform_idle_server_maintenance(), line 362: [pool www] currently 0 active children, 0 spare children
[12-Dec-2014 06:35:54.687559] DEBUG: pid 13384, fpm_children_make(), line 421: [pool www] child 18397 started
[12-Dec-2014 06:35:54.687593] DEBUG: pid 13384, fpm_pctl_on_socket_accept(), line 536: [pool www] got accept without idle child available .... I forked
[12-Dec-2014 06:35:54.687602] DEBUG: pid 13384, fpm_event_loop(), line 411: event module triggered 1 events
[12-Dec-2014 06:35:55.406455] DEBUG: pid 13384, fpm_pctl_perform_idle_server_maintenance(), line 362: [pool www] currently 0 active children, 1 spare children
[12-Dec-2014 06:35:56.407633] DEBUG: pid 13384, fpm_pctl_perform_idle_server_maintenance(), line 362: [pool www] currently 0 active children, 1 spare children
[12-Dec-2014 06:35:57.408949] DEBUG: pid 13384, fpm_pctl_perform_idle_server_maintenance(), line 362: [pool www] currently 0 active children, 1 spare children
[12-Dec-2014 06:35:58.410111] DEBUG: pid 13384, fpm_pctl_perform_idle_server_maintenance(), line 362: [pool www] currently 0 active children, 1 spare children
PHP log:
2014/12/12 06:35:02 [debug] 13350#0: *223 http header done
2014/12/12 06:35:54 [debug] 13350#0: accept on 0.0.0.0:80, ready: 1
2014/12/12 06:35:54 [debug] 13350#0: posix_memalign: 0000000002273A80:256 @16
2014/12/12 06:35:54 [debug] 13350#0: *226 accept: 66.249.67.123 fd:3
2014/12/12 06:35:54 [debug] 13350#0: *226 event timer add: 3: 60000:1418387814684
2014/12/12 06:35:54 [debug] 13350#0: *226 epoll add event: fd:3 op:1 ev:80000001
2014/12/12 06:35:54 [debug] 13350#0: accept() not ready (11: Resource temporarily unavailable)
2014/12/12 06:35:54 [debug] 13350#0: *226 malloc: 0000000002274AF0:1296
2014/12/12 06:35:54 [debug] 13350#0: *226 posix_memalign: 0000000002273BE0:256 @16
2014/12/12 06:35:54 [debug] 13350#0: *226 malloc: 000000000232F4B0:131072
2014/12/12 06:35:54 [debug] 13350#0: *226 posix_memalign: 00000000021F7590:4096 @16
2014/12/12 06:35:54 [debug] 13350#0: *226 http process request line
2014/12/12 06:35:54 [debug] 13350#0: *226 recv: fd:3 315 of 131072
2014/12/12 06:35:54 [debug] 13350#0: *226 http request line: "GET /stores/giltcity/page/78/ HTTP/1.1"
2014/12/12 06:35:54 [debug] 13350#0: *226 http uri: "/stores/giltcity/page/78/"
2014/12/12 06:35:54 [debug] 13350#0: *226 http args: ""
2014/12/12 06:35:54 [debug] 13350#0: *226 http exten: ""
2014/12/12 06:35:54 [debug] 13350#0: *226 http process request header line
2014/12/12 06:35:54 [debug] 13350#0: *226 http header: "Host: mydiscountman.com"
2014/12/12 06:35:54 [debug] 13350#0: *226 http header: "Connection: Keep-alive"
2014/12/12 06:35:54 [debug] 13350#0: *226 http header: "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
2014/12/12 06:35:54 [debug] 13350#0: *226 http header: "From: googlebot(at)googlebot.com"
2014/12/12 06:35:54 [debug] 13350#0: *226 http header: "Accept-Encoding: gzip,deflate"
2014/12/12 06:35:54 [debug] 13350#0: *226 http header: "User-Agent: Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
2014/12/12 06:35:54 [debug] 13350#0: *226 http header done
2014/12/12 06:37:11 [debug] 13350#0: accept on 0.0.0.0:80, ready: 1
Nginx Global Config /etc/nginx/nginx.conf :
user apache;
worker_processes 1;
pid /var/run/nginx.pid;
events
worker_connections 768;
multi_accept on;
use epoll;
http
# Let NGINX get the real client IP for its access logs
set_real_ip_from 127.0.0.1;
real_ip_header X-Forwarded-For;
# Basic Settings
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 20;
client_max_body_size 15m;
client_body_timeout 60;
client_header_timeout 60;
client_body_buffer_size 128k;
client_header_buffer_size 128k;
large_client_header_buffers 4 16k;
send_timeout 60;
reset_timedout_connection on;
types_hash_max_size 8192;
server_tokens off;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
# Logging Settings
# access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log debug;
# Log Format
log_format main '$remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
# Gzip Settings
gzip on;
gzip_static on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_min_length 512;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types text/css text/javascript text/xml text/plain text/x-component
application/javascript application/x-javascript application/json
application/xml application/rss+xml font/truetype application/x-font-ttf
font/opentype application/vnd.ms-fontobject image/svg+xml;
# Virtual Host Configs
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
Nginx Site Config /etc/nginx/sites-available/testme :
server pot
PHP.ini
[PHP]
;;;;;;;;;;;;;;;;;;;
; Quick Reference ;
;;;;;;;;;;;;;;;;;;;
error_reporting = E_ALL & ~E_NOTICE
extension=apc.so
;;;;;;;;;;;;;;;;;;;;
; Language Options ;
;;;;;;;;;;;;;;;;;;;;
engine = On
short_open_tag = Off
asp_tags = Off
precision = 14
y2k_compliance = On
zlib.output_compression = Off
implicit_flush = Off
unserialize_callback_func =
serialize_precision = 100
safe_mode = Off
safe_mode_gid = Off
safe_mode_include_dir =
safe_mode_exec_dir =
safe_mode_allowed_env_vars = PHP_
safe_mode_protected_env_vars = LD_LIBRARY_PATH
disable_functions =
disable_classes =
realpath_cache_size = 16k
realpath_cache_ttl = 120
;;;;;;;;;;;;;;;;;
; Miscellaneous ;
;;;;;;;;;;;;;;;;;
expose_php = On
;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;
max_execution_time = 600
set_time_limit = 600
max_input_time = 300
memory_limit = 2048M
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Error handling and logging ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
error_reporting = E_ALL & ~E_DEPRECATED
display_errors = Off
display_startup_errors = Off
log_errors = On
log_errors_max_len = 1024
ignore_repeated_errors = Off
ignore_repeated_source = Off
report_memleaks = On
track_errors = Off
html_errors = Off
error_log = /var/log/php-fpm/www-error.log
;;;;;;;;;;;;;;;;;
; Data Handling ;
;;;;;;;;;;;;;;;;;
variables_order = "GPCS"
request_order = "GP"
register_globals = Off
register_long_arrays = Off
register_argc_argv = Off
auto_globals_jit = On
post_max_size = 384M
magic_quotes_gpc = Off
magic_quotes_runtime = Off
magic_quotes_sybase = Off
auto_prepend_file =
auto_append_file =
default_mimetype = "text/html"
;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;
doc_root =
user_dir =
enable_dl = Off
cgi.fix_pathinfo=0
;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;
file_uploads = On
upload_max_filesize = 512M
;;;;;;;;;;;;;;;;;;
; Fopen wrappers ;
;;;;;;;;;;;;;;;;;;
allow_url_fopen = On
allow_url_include = Off
default_socket_timeout = 120
;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;
; Module Settings ;
;;;;;;;;;;;;;;;;;;;
[Date]
date.timezone = America/Chicago
[filter]
[iconv]
[intl]
[sqlite]
[sqlite3]
[Pcre]
[Pdo]
[Phar]
[Syslog]
define_syslog_variables = Off
[mail function]
SMTP = localhost
smtp_port = 25
sendmail_path = /usr/sbin/sendmail -t -i
mail.add_x_header = On
[SQL]
sql.safe_mode = Off
[ODBC]
odbc.allow_persistent = On
odbc.check_persistent = On
odbc.max_persistent = -1
odbc.max_links = -1
odbc.defaultlrl = 4096
odbc.defaultbinmode = 1
[MySQL]
mysql.allow_persistent = On
mysql.max_persistent = -1
mysql.max_links = -1
mysql.default_port =
mysql.default_socket =
mysql.default_host =
mysql.default_user =
mysql.default_password =
mysql.connect_timeout = 300
mysql.trace_mode = Off
[MySQLi]
mysqli.max_links = -1
mysqli.default_port = 3306
mysqli.default_socket =
mysqli.default_host =
mysqli.default_user =
mysqli.default_pw =
mysqli.reconnect = Off
[PostgresSQL]
pgsql.allow_persistent = On
pgsql.auto_reset_persistent = Off
pgsql.max_persistent = -1
pgsql.max_links = -1
pgsql.ignore_notice = 0
pgsql.log_notice = 0
[Sybase-CT]
sybct.allow_persistent = On
sybct.max_persistent = -1
sybct.max_links = -1
sybct.min_server_severity = 10
sybct.min_client_severity = 10
[bcmath]
bcmath.scale = 0
[browscap]
[Session]
session.save_handler = files
session.save_path = "/var/lib/php/session"
session.use_cookies = 1
session.use_only_cookies = 1
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain =
session.cookie_httponly =
session.serialize_handler = php
session.gc_probability = 1
session.gc_divisor = 1000
session.gc_maxlifetime = 1440
session.bug_compat_42 = Off
session.bug_compat_warn = Off
session.referer_check =
session.entropy_length = 0
session.entropy_file =
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 0
session.hash_function = 0
session.hash_bits_per_character = 5
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"
[MSSQL]
mssql.allow_persistent = On
mssql.max_persistent = -1
mssql.max_links = -1
mssql.min_error_severity = 10
mssql.min_message_severity = 10
mssql.compatability_mode = Off
mssql.timeout = 300
mssql.secure_connection = Off
[Tidy]
tidy.clean_output = Off
[soap]
soap.wsdl_cache_enabled=1
soap.wsdl_cache_dir="/tmp"
soap.wsdl_cache_ttl=86400
nginx php-fpm
nginx php-fpm
edited Dec 14 '14 at 18:30
Thomas
asked Dec 12 '14 at 16:59
ThomasThomas
2614
2614
bumped to the homepage by Community♦ 4 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 4 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
can you add the nginx config?
– xofer
Dec 12 '14 at 17:07
I have no idea what the answer is, but I'd like to thank you for posting a great first question!
– Hyppy
Dec 12 '14 at 17:25
Thanks Hyppy! This is a tough one. Lots of moving pieces.
– Thomas
Dec 12 '14 at 19:25
so, the forking command is not a bug. The PHP process stopping 100% due to the child being killed is the fundamental problem. Why or how I am still unsure. Any ideas anyone?
– Thomas
Dec 13 '14 at 21:50
1
so it's not php's memory limit.You are drawing false conclusions. The error message says that PHP is running out of memory (at 256mb), the memory limit can be changed at runtime. There is no nginx or PHP fpm complexity/relevance here.
– AD7six
Dec 14 '14 at 13:47
|
show 6 more comments
can you add the nginx config?
– xofer
Dec 12 '14 at 17:07
I have no idea what the answer is, but I'd like to thank you for posting a great first question!
– Hyppy
Dec 12 '14 at 17:25
Thanks Hyppy! This is a tough one. Lots of moving pieces.
– Thomas
Dec 12 '14 at 19:25
so, the forking command is not a bug. The PHP process stopping 100% due to the child being killed is the fundamental problem. Why or how I am still unsure. Any ideas anyone?
– Thomas
Dec 13 '14 at 21:50
1
so it's not php's memory limit.You are drawing false conclusions. The error message says that PHP is running out of memory (at 256mb), the memory limit can be changed at runtime. There is no nginx or PHP fpm complexity/relevance here.
– AD7six
Dec 14 '14 at 13:47
can you add the nginx config?
– xofer
Dec 12 '14 at 17:07
can you add the nginx config?
– xofer
Dec 12 '14 at 17:07
I have no idea what the answer is, but I'd like to thank you for posting a great first question!
– Hyppy
Dec 12 '14 at 17:25
I have no idea what the answer is, but I'd like to thank you for posting a great first question!
– Hyppy
Dec 12 '14 at 17:25
Thanks Hyppy! This is a tough one. Lots of moving pieces.
– Thomas
Dec 12 '14 at 19:25
Thanks Hyppy! This is a tough one. Lots of moving pieces.
– Thomas
Dec 12 '14 at 19:25
so, the forking command is not a bug. The PHP process stopping 100% due to the child being killed is the fundamental problem. Why or how I am still unsure. Any ideas anyone?
– Thomas
Dec 13 '14 at 21:50
so, the forking command is not a bug. The PHP process stopping 100% due to the child being killed is the fundamental problem. Why or how I am still unsure. Any ideas anyone?
– Thomas
Dec 13 '14 at 21:50
1
1
so it's not php's memory limit. You are drawing false conclusions. The error message says that PHP is running out of memory (at 256mb), the memory limit can be changed at runtime. There is no nginx or PHP fpm complexity/relevance here.– AD7six
Dec 14 '14 at 13:47
so it's not php's memory limit. You are drawing false conclusions. The error message says that PHP is running out of memory (at 256mb), the memory limit can be changed at runtime. There is no nginx or PHP fpm complexity/relevance here.– AD7six
Dec 14 '14 at 13:47
|
show 6 more comments
1 Answer
1
active
oldest
votes
The number of spare processes indicated in your logs clearly doesn't match your value for pm.min_spare_servers. That's probably because the php-fpm settings don't go in your php.ini file, they go in a fpm.conf file.
Given the lack of spare servers, it's no big surprise that you get a 'resource not available error'. I don't know why you'd get a 404 error though.
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "2"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
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%2fserverfault.com%2fquestions%2f652189%2fnginx-php-fpm-debug-11-resource-temporarily-unavailable%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
The number of spare processes indicated in your logs clearly doesn't match your value for pm.min_spare_servers. That's probably because the php-fpm settings don't go in your php.ini file, they go in a fpm.conf file.
Given the lack of spare servers, it's no big surprise that you get a 'resource not available error'. I don't know why you'd get a 404 error though.
add a comment |
The number of spare processes indicated in your logs clearly doesn't match your value for pm.min_spare_servers. That's probably because the php-fpm settings don't go in your php.ini file, they go in a fpm.conf file.
Given the lack of spare servers, it's no big surprise that you get a 'resource not available error'. I don't know why you'd get a 404 error though.
add a comment |
The number of spare processes indicated in your logs clearly doesn't match your value for pm.min_spare_servers. That's probably because the php-fpm settings don't go in your php.ini file, they go in a fpm.conf file.
Given the lack of spare servers, it's no big surprise that you get a 'resource not available error'. I don't know why you'd get a 404 error though.
The number of spare processes indicated in your logs clearly doesn't match your value for pm.min_spare_servers. That's probably because the php-fpm settings don't go in your php.ini file, they go in a fpm.conf file.
Given the lack of spare servers, it's no big surprise that you get a 'resource not available error'. I don't know why you'd get a 404 error though.
answered Jun 21 '15 at 20:53
mc0emc0e
5,3541127
5,3541127
add a comment |
add a comment |
Thanks for contributing an answer to Server Fault!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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%2fserverfault.com%2fquestions%2f652189%2fnginx-php-fpm-debug-11-resource-temporarily-unavailable%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
can you add the nginx config?
– xofer
Dec 12 '14 at 17:07
I have no idea what the answer is, but I'd like to thank you for posting a great first question!
– Hyppy
Dec 12 '14 at 17:25
Thanks Hyppy! This is a tough one. Lots of moving pieces.
– Thomas
Dec 12 '14 at 19:25
so, the forking command is not a bug. The PHP process stopping 100% due to the child being killed is the fundamental problem. Why or how I am still unsure. Any ideas anyone?
– Thomas
Dec 13 '14 at 21:50
1
so it's not php's memory limit.You are drawing false conclusions. The error message says that PHP is running out of memory (at 256mb), the memory limit can be changed at runtime. There is no nginx or PHP fpm complexity/relevance here.– AD7six
Dec 14 '14 at 13:47