Quantcast
Channel: Nginx Forum - Php-fpm Mailing List - English
Viewing all 219 articles
Browse latest View live

pool get unavailable (1 reply)

$
0
0
Hello,

I'm using PHP FPM on Debian Squeeze with PHP 5.3.27. I have the following
pool configuration:

[bmde_prod]
listen = /var/lib/php5-sockets/bmde_prod.socket

pm = dynamic
pm.max_children = 250
pm.start_servers = 15
pm.min_spare_servers = 14
pm.max_spare_servers = 15
pm.max_requests = 1000

listen.backlog = -1

In normal operation, I have 16-20 pool processes running. From time to
time, the pool rises from 16-20 pool processes to maximum of 250 processes.
But there is no traffic from outside, after the limit of 250 is reached the
whole pool gets unavailable.


When I start a strace -n 3000 -f to all (250) running pool processes, I get
the following output:


[pid 20173] <... poll resumed> ) = 0 (Timeout)
[pid 20173] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
[pid 20173] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 1000 <unfinished ...>
[pid 19919] <... poll resumed> ) = 0 (Timeout)
[pid 19919] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
[pid 19919] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 1000 <unfinished ...>
[pid 20186] <... poll resumed> ) = 0 (Timeout)
[pid 20186] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
[pid 20186] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 1000 <unfinished ...>
[pid 19973] <... poll resumed> ) = 0 (Timeout)
[pid 19973] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
[pid 19973] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 1000 <unfinished ...>
[pid 20090] <... poll resumed> ) = 0 (Timeout)
[pid 20090] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
[pid 20090] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 1000 <unfinished ...>
[pid 20548] <... poll resumed> ) = 0 (Timeout)
[pid 20548] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
[pid 20548] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 1000 <unfinished ...>
[pid 20131] <... poll resumed> ) = 0 (Timeout)
[pid 20131] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
[pid 20131] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 1000 <unfinished ...>
[pid 19915] <... poll resumed> ) = 0 (Timeout)
[pid 19915] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
[pid 19915] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 1000 <unfinished ...>
[pid 19981] <... poll resumed> ) = 0 (Timeout)
[pid 19981] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
[pid 19981] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 1000 <unfinished ...>
[pid 20364] <... poll resumed> ) = 0 (Timeout)
[pid 20364] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
[pid 20364] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 1000 <unfinished ...>
[pid 20297] <... poll resumed> ) = 0 (Timeout)
[pid 20297] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
[pid 20297] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 1000 <unfinished ...>
[pid 19850] <... poll resumed> ) = 0 (Timeout)
[pid 19850] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
[pid 19850] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 1000 <unfinished ...>
[pid 20395] <... poll resumed> ) = 0 (Timeout)
[pid 20395] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
[pid 20395] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 1000 <unfinished ...>
[pid 20523] <... poll resumed> ) = 0 (Timeout)
[pid 20523] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
[pid 20523] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 1000 <unfinished ...>
[pid 20422] <... poll resumed> ) = 0 (Timeout)
[pid 20422] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
[pid 20422] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 1000 <unfinished ...>
[pid 20016] <... poll resumed> ) = 0 (Timeout)
[pid 19774] <... poll resumed> ) = 0 (Timeout)
[pid 20016] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 0 <unfinished ...>
[pid 19774] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 0 <unfinished ...>
[pid 20016] <... poll resumed> ) = 0 (Timeout)
[pid 19774] <... poll resumed> ) = 0 (Timeout)
[pid 20016] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 1000 <unfinished ...>
[pid 19774] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 1000 <unfinished ...>
[pid 20495] <... poll resumed> ) = 0 (Timeout)
[pid 20363] <... poll resumed> ) = 0 (Timeout)

.... and a lot more of the same lines.


If I kill one or two processes of the pool, the pool itself gets available
again and lowers the pool processes to normal operation.

Does anybody know that's about that?

Thanks,
Jonas

--

---
You received this message because you are subscribed to the Google Groups "highload-php-en" group.
To unsubscribe from this group and stop receiving emails from it, send an email to highload-php-en+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

SIGKILL while performing lengthy task in shutdown function (1 reply)

$
0
0
Hi,

we've seen the following happen a few times, and I'd like to know who is
sending the SIGKILL, and if I can do anything about that.

We run a lengthy update process in a shutdown function after the response
has been flushed with fastcgi_finish_request(). It usually takes 6-10s, but
under high load, it can take 40s or more. Sometimes, after roughly 30s (sometimes
more, sometimes less), the process performing the update receives a SIGKILL.
While we can usually recover from this (by simply restarting the update), the
SIGKILL may just hit us while we own the shared memory lock to update APC. This
lock is _not_ freed when the process dies, so that all further attempts to
access APC block.

In the PHP error_log, the typical order of events is:

[26-Feb-2014 15:02:01] update start (PID 27582)
[26-Feb-2014 15:02:01] WARNING: [pool php] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 8 children, there are 0 idle, and 48 total children
[26-Feb-2014 15:02:02] WARNING: [pool php] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 16 children, there are 0 idle, and 53 total children
[...] more of the same

[26-Feb-2014 15:02:08] WARNING: [pool php] server reached pm.max_children setting (80), consider raising it
[26-Feb-2014 15:02:29] WARNING: [pool php] child 27582 exited on signal 9 (SIGKILL) after 103.188030 seconds from start


So, my question is, who is sending a SIGKILL to the process, why is
it done, and can I influence this behaviour in any way?

As far as I can tell, the SIGKILL is not caused by exceeding the
PHP max_execution_time (the overall CPU time used is smaller than
the configured limit) or the cpu time ulimit (set to unlimited).


thanks,


rainer

--

---
You received this message because you are subscribed to the Google Groups "highload-php-en" group.
To unsubscribe from this group and stop receiving emails from it, send an email to highload-php-en+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Odd memory graph (when php-fpm went crazy) Can someone explain what happened? (2 replies)

$
0
0
Hi, I recently had an outage with a VM that runs Ubuntu Linux 12.04 64bit
in an ESX Vmware environment. The php is 5.3 We've been having issues
with php-fpm needing to be restarted when the system becomes unusable. The
cacti graph of the memory of during the event is really confusing to me.

See attached. Can someone please tell me what the OS/Kernel/php-fpm was
doing that caused real memory to increase, cache memory to deplete, and
unused memory to increase? During this, we ran out of swap.

If anyone knows what went on, I would really appreciate it.

Please let me know if there is some other information you need. Simply
stopping and starting php-fpm fixed the issue. We suspect a poorly
writting app causing the usage and we are zeroing in on that, but any help
with understanding what happened would be wonderful.

Thanks!!

Pete

--

---
You received this message because you are subscribed to the Google Groups "highload-php-en" group.
To unsubscribe from this group and stop receiving emails from it, send an email to highload-php-en+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

nginx + PHP-FPM via socket not performing better than apache !!! (no replies)

$
0
0
Hi,
I have been trying to setup nginx and fpm on our production machine.It already runs apache + mod-php and it serves around 50 Req/s with high memory usage but load average is below 1 on an 8 core 16GB machine.

I installed nginx + php-fpm via socket on this box and tried to put the same amount of traffic which apache bears with LVS but it accepts around 60-70 Req/sec only, if I try to increase it to 100 + the system load shoots and the php-fpm active processes reaches its limit and it stalls .

So is it intended to behave this way ? because what I have read on the forums/ blogs etc is that nginx with php-fpm outperforms apache.
I could be somethings wrong ,need suggestions and help to answer this question.


Thanks
Rajat

session handling bug (no replies)

$
0
0
I am developing an application on my localhost that uses Nginx/PHP5-fpm from Dotdeb (Linux Neptune 3.3), and have come across a bug in the handling of assignment of session_id() that doesn't occur under Apache/Lightspeed with PHP (on my host server).

This code:
session_id($date . '-' . $userid . '-' . $_SESSION['till']);

has to be modified to be:

$_SESSION['id']=($date . '-' . $userid . '-' . $_SESSION['till']);

and then use the $_SESSION['id'] instead of the true session_id().

The symptom is that the session is destroyed when going to the next page.

huge quantity of "Listen queue overflow: 193 already in queue awaiting acceptance" (1 reply)

$
0
0
Hi all!
I change server, from an HP with 2 CPU Xeon quad core 8gb ram to a Dell with 2 CPU Xeon quad core and 16gb ram, both servers are with FreeBSD and I'm using same php-fpm and nginx configurations.

But I've a trouble about php-fpm, my log have a really huge of:
sonewconn: pcb 0xfffffe01f2c6f870: Listen queue overflow: 193 already in queue awaiting acceptance

I use PHP 5.3.28 with Suhosin-Patch

that's my php-fpm configuration:

[global]
pid = run/php-fpm.pid

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

emergency_restart_threshold = 10
emergency_restart_interval = 1m

process_control_timeout = 10s
process.max = 0

[www]
user = www
group = www
security.limit_extensions = .php

listen = /tmp/php-fpm.$pool.sock
listen.allowed_clients = 127.0.0.1
listen.backlog = -1

pm = static
pm.max_children = 8
pm.max_requests = 10000000

request_slowlog_timeout = 40s
slowlog = /var/log/php-fpm/slow.$pool.log

env[TMP] = /tmp
env[TMPDIR] = /tmp
env[TEMP] = /tmp


Any idea?

--
RedFoxy Darrest
http://www.redfoxy.it


--

---
You received this message because you are subscribed to the Google Groups "highload-php-en" group.
To unsubscribe from this group and stop receiving emails from it, send an email to highload-php-en+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Struggling with php-fpm ERRORS (no replies)

$
0
0
There is this issue in the server that is not allowing me to run correctly
php-fpm, but despite this issue everything is running with a problem of 524
CloudFlare time out every time I SEND, POST ,etc

My server Configuration is: 12.04.4 LTS, Precise Pangolin + NGINX + ionCube
+ igBinary + CloudFlare (php-fpm)

Every time I try to start PHP-FPM I get stuck until I open a new session .

PHP-FPM LOG says this :

> [02-May-2014 02:51:05] ERROR: An another FPM instance seems to already
> > listen on /var/run/php5-fpm.sock
> >
> [02-May-2014 02:51:05] ERROR: FPM initialization failed


So far what I've investigate, with my short knowledge is that I have CGI
php.ini, PHP-FPM php.ini CLI php.ini

https://www.dropbox.com/s/nddqpmf0937x739/Screenshot%202014-05-02%2011.19.11.png

that maybe are in conflict

also php-fpm is correctly configured (Well that is what I think):
www.conf:

http://pastebin.com/QcTTBUEW

my NGNIX.conf is just the same that H5BP-NGINX Config provied
and my site-enable is:

server {
> # listen 80 deferred; # for Linux
> # listen 80 accept_filter=httpready; # for FreeBSD
> listen 80;
>
> # The host name to respond to
> server_name censocanino.com www.censocanino.com;
>
> # Path for static files
> root /sites/censocanino.com/public;
>
> # Try static files first, then php
> index index.html index.htm index.php;
>
> # Specific logs for this vhost
> access_log /sites/censocanino.com/log/log-access.log;
> error_log /sites/censocanino.com/log/log-error.log error;
>
> #Specify a charset
> charset utf-8;
>
> # Redirect needed to "hide" index.php
> location / {
> try_files $uri $uri/ /index.php?q=$uri&$args;
> }
>
> # Don't log robots.txt or favicon.ico files
> location ~* ^/(favicon.ico|robots.txt)$ {
> access_log off;
> log_not_found off;
> }
> # Custom 404 page
> error_page 404 /404.php;
>
> location ~*
> ^.+.(gif|jpg|jpeg|png|wmv|avi|mpg|mpeg|mp4|htm|html|js|css|mp3|swf|ico|flv|xml)
> {
> access_log off;
> expires 30d;
> }
>
> # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
> location ~ \.php$ {
> fastcgi_split_path_info ^(.+\.php)(/.+)$;
> # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
>
> # With php5-cgi alone:
> # fastcgi_pass 127.0.0.1:9000;
> # With php5-fpm:
> fastcgi_pass unix:/var/run/php5-fpm.sock;
> fastcgi_intercept_errors on;
> fastcgi_index index.php;
> fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
> include fastcgi_params;
> }
>
> # Deny access to .htaccess
> location ~ /\.ht {
> deny all;
> }
>
> # PHPMYADMIN
> location /phpmyadmin {
> root /usr/share/;
> index index.php index.html index.htm;
> location ~ ^/phpmyadmin/(.+\.php)$ {
> try_files $uri =404;
> root /usr/share/;
> fastcgi_pass unix:/var/run/php5-fpm.sock;
> fastcgi_index index.php;
> fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
> include fastcgi_params;
> }
> location ~*
> ^/phpmyadmin/(.+\.(jpeg|jpg|png|css|gif|ico|js|html|xml|txt))$ {
> root /usr/share/;
> }
> }
> location /phpMyAdmin {
> rewrite ^/* /phpmyadmin last;
> }
>
> # Include the basic h5bp config set
> include h5bp/basic.conf;
> }
>


More reference:

> `http://censocanino.com/phpinfo.php`


thanks


**EDIT**

I just notice that php-fpm.sock is 0kb

--

---
You received this message because you are subscribed to the Google Groups "highload-php-en" group.
To unsubscribe from this group and stop receiving emails from it, send an email to highload-php-en+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Does FPM in PHP 5.2. support statistics feature like PHP5.3.x+ (no replies)

$
0
0
HI all,
I want to ask how to use statistics feature in FPM in PHP5.2.x. I notice
that fpm in php5.2.x use the xml syntax. but when i add <value
name="status">/status</value> into fpm 's configuration file, it report
Warning, unknown setting 'status' in section '/configuration/workers/pool'


I have found the xml syntax example from here:
http://www.fatbsd.com/fpm/xml.html. and I add status setting like that, but
the fpm doesn't work.

I guess the fpm in php.5.2.x doesn't support statistics feature, right? is
anybody can tell me?

--

---
You received this message because you are subscribed to the Google Groups "highload-php-en" group.
To unsubscribe from this group and stop receiving emails from it, send an email to highload-php-en+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sympa + Nginx errors (no replies)

$
0
0
Hello,
I'm quite new to Nginx, but so far i've had reasonable success in getting things to work, until I try and use the Sympa mailing list web interface.

With this config:

server {
listen 80;
server_name www.tld.co.uk;


location /static-sympa {
alias /var/lib/sympa/static_content;
}

location /sympa {
root /usr/lib/cgi-bin/sympa;
gzip off;
fastcgi_pass unix:/etc/php5/fpm/socks/www.tld.co.uk.sock;
fastcgi_split_path_info ^(/sympa)(.+)$;
include /etc/nginx/fastcgi_params;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param REMOTE_USER $remote_user;
fastcgi_param SCRIPT_FILENAME $document_root/wwsympa-wrapper.fcgi;
fastcgi_intercept_errors on;
}

And with this in the /etc/nginx/fastcgi_params file:

fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;

fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;

fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;

fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;

# PHP only, required if PHP was built with --enable-force-cgi-redirect
fastcgi_param REDIRECT_STATUS 200;


On trying to access www.tld.co.uk/sympa I get nothing at all in the Nginx error log, and the following in the Nginx access log:
<client IP> - - [18/May/2014:23:00:04 +0100] "GET /sympa HTTP/1.1" 200 6205 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.152 Safari/537.36"

Even with php5-fpm configured for debug logging, nothing happens in the php5-fpm.log file either (and I can see that things do happen in this file for other Nginx web pages like postfixadmin or roundcube, so am reasonably confident that php5-fpm is correct).

What puzzles me most is that what gets posted to the clients web browser when visiting www.tld.co.uk/sympa is the following:

ELF????>?Ä?@@0?@8 @????@@@@@ø?ø????8?8?@8?@?????@@Œ?Œ? ??è è `è `X?`? ????`?`à?à????T?T?@T?@DD?Påtd?¨?¨?@¨?@,,?Qåtd??Råtd?è è `è `?????/lib64/ld-linux-x86-64.so.2???GNU??????GNUD?¬kV­´,û¯@©ècÞã‰Ø¡?????????????;?C?,?? 3?#???__gmon_start__libc.so.6setregidsetreuidexecvegetegidgeteuid__libc_start_mainGLIBC_2.2.5??????????u?i ?Uà?`???`????`????`????`?? ?`??(?`??Hƒì?è÷HƒÄ?Ãÿ5ê ÿ%ì ??@ÿ%ê héàÿÿÿÿ%â h?éÐÿÿÿÿ%Ú h?éÀÿÿÿÿ%Ò h?é°ÿÿÿÿ%Ê h?é ÿÿÿÿ% h?éÿÿÿATUH‰ÕSH‰óè‘ÿÿÿA‰Äè‰ÿÿÿD‰æ‰Çè¿ÿÿÿèªÿÿÿA‰Äè¢ÿÿÿD‰æ‰Çè¸ÿÿÿHÇ?€?@H‰ÞH‰ê[]A\¿€?@émÿÿÿ1íI‰Ñ^H‰âHƒäðPTIÇÀÐ?@HÇÁà?@HÇÇp?@è3ÿÿÿôHƒì?H‹?å H…Àt?ÿÐHƒÄ?А¸G?`UH-@?`Hƒø?H‰åw?]øH…Àtô]¿@?`ÿà??€¸@?`UH-@?`HÁø?H‰åH‰ÂHÁê?H?ÐH‰ÆHÑþu?]úH…Òtô]¿@?`ÿâ??€€=¹ u?UH‰åè~ÿÿÿ]Æ?¦ ?óÃ??@Hƒ=P? t?¸H…Àt?U¿ø `H‰åÿÐ]é{ÿÿÿévÿÿÿóÃfffff.??„H‰l$ØL‰d$àH-ÿ? L%ð? L‰l$èL‰t$ðL‰|$øH‰\$ÐHƒì8L)åA‰ýI‰öHÁý?I‰×èËýÿÿH…ít?1Û??@L‰úL‰öD‰ïAÿ?ÜHƒÃ?H9ërêH‹\$?H‹l$?L‹d$?L‹l$ L‹t$(L‹|$0HƒÄ8АHƒì?HƒÄ?Ã??/usr/lib/cgi-bin/sympa/wwsympa.fcgi???;,?XýÿÿHÈýÿÿp(ÿÿÿ 8ÿÿÿ¸??zR?x???????$??ýÿÿp??F??J??w?€??;*3$",DPýÿÿSB??Œ?A??†?D? ƒ???A??B???t€þÿÿ?$Œxþÿÿ‰QŒ?†?_?@Fƒ??Ž?? ?@€?@???ð?@ l?@?è `???ð `???˜?@õþÿoÐ?@?°?@?ð?@ a????è?`????`?@?H?@?? ?þÿÿo(?@ÿÿÿo?ðÿÿo??@?`??@&?@6?@F?@V?@f?@.shstrtab.interp.note.ABI-tag.note.gnu.build-id.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rela.dyn.rela.plt.init.text.fini.rodata.eh_frame_hdr.eh_frame.init_array.fini_array.jcr.dynamic.got.got.plt.data.bss???8?@8??????T?@T? ?!??t?@t?$?8??˜?@˜?4???4öÿÿo?Ð?@Ð????>??ð?@ð?À????F??°?@°?a?Nÿÿÿo???@??????[þÿÿo?(?@(? ???j??H?@H?????t??`?@`?? ??~??ð?@ð???y???@?p??„??p?@p?ü??Š??l?@l? ???x?@x?0?˜??¨?@¨?,?¦??Ø?@Ø?´?°??è `è ??¼??ð `ð ??È??ø `ø ??Í???`?à????Ö??à?`à????Û??è?`è?H??ä??0?`0???ê??@?`@?????@?ï?


I hope that somebody on this list can please help me understand what it is doing.

Many Thanks in advance!

Reducing the math on pm.start_servers' default value? (no replies)

$
0
0
Just noticed this small but funny thing when looking at my php-fpm.conf
file tonight:

; The number of child processes created on startup.
> ; Note: Used only when pm is set to 'dynamic'
> ; Default Value: min_spare_servers + (max_spare_servers -
> min_spare_servers) / 2
> ;pm.start_servers = 20
>

It seems to me like this equation:

min_spare_servers + (max_spare_servers - min_spare_servers) / 2
>

can actually be reduced to:

(min_spare_servers + max_spare_servers) / 2
>


Or am I missing something obvious?

--

---
You received this message because you are subscribed to the Google Groups "highload-php-en" group.
To unsubscribe from this group and stop receiving emails from it, send an email to highload-php-en+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Huge memory leaks here, really need help. (4 replies)

$
0
0
Hi,
I need some help with a server running a single website. The memory is increasing really fast, about 1GB per day.
Restarting php-fpm and nginx is not freeing any memory.
I need to reboot the whole server every 15 days, I can't figure out the problem since 4 months now.

Here is the status and conf files, I hope you can help ;)

Using
- Nginx/1.4.5
- PHP 5.5.3-1ubuntu2.3
- APCu Version 4.0.1
- Memcached and php memcache


Memcache status :
Free: 46.3 MBytes (72.4%)
Used: 17.7 MBytes (27.6%)
Hits: 30985436 (60.3%)
Misses: 20412444 (39.7%)
Used Cache Size 17.7 MBytes
Total Cache Size 64.0 MBytes


APCu status
Free: 1023.4 MBytes (99.9%)
Used: 637.7 KBytes (0.1%)
Hits: 40594423 (100.0%)
Misses: 428 (0.0%)
Request Rate (hits, misses) 73.83 cache requests/second
Hit Rate 73.83 cache requests/second


Nginx status :
Active connections: 146
server accepts handled requests
8792651 8792651 17113216
Reading: 0 Writing: 11 Waiting: 135


php fpm status :
pool: www
process manager: static
start time: 05/Jun/2014:09:44:04 +0200
start since: 549019
accepted conn: 62499
listen queue: 0
max listen queue: 0
listen queue len: 0
idle processes: 33
active processes: 27
total processes: 60
max active processes: 61
max children reached: 0
slow requests: 14236


top command :
top - 18:13:51 up 6 days, 8:29, 1 user, load average: 0,56, 0,57, 0,66
Tasks: 193 total, 2 running, 191 sleeping, 0 stopped, 0 zombie
%Cpu(s): 13,6 us, 1,0 sy, 0,0 ni, 85,1 id, 0,0 wa, 0,0 hi, 0,3 si, 0,0 st
KiB Mem: 32840792 total, 9399012 used, 23441780 free, 465028 buffers
KiB Swap: 1046520 total, 0 used, 1046520 free, 1931844 cached


File : php-fpm.conf
[global]
pid = /var/run/php5-fpm.pid
error_log = /var/log/php/php5-fpm.log
log_level = notice
emergency_restart_threshold = 10
emergency_restart_interval = 1m
process_control_timeout = 20s
include=/etc/php5/fpm/pool.d/*.conf


File : pool.d/www.conf
[www]
user = www-data
group = www-data
listen = /var/run/php5-fpm.sock
listen.backlog = 65536
pm = static
pm.max_children = 60
pm.start_servers = 5
pm.min_spare_servers = 5
pm.max_spare_servers = 10
pm.max_requests = 5000
pm.status_path = /php-status
ping.path = /php-ping
slowlog = /var/log/php/$pool.log.slow
request_slowlog_timeout = 30s
request_terminate_timeout = 120s
rlimit_files = 131072
rlimit_core = unlimited
chdir = /
catch_workers_output = yes
security.limit_extensions = .php .php3 .php4 .php5 .jpg


File : sysctl.conf
net.ipv6.conf.all.autoconf = 0
net.ipv6.conf.default.autoconf = 0
net.ipv6.conf.eth0.autoconf = 0
net.ipv6.conf.all.accept_ra = 0
net.ipv6.conf.default.accept_ra = 0
net.ipv6.conf.eth0.accept_ra = 0
net.core.somaxconn=65535
fs.file-max = 100000
kernel.pid_max = 1048576
net.core.wmem_max = 1048576
net.core.optmem_max = 1048576
vm.max_map_count = 262144
net.core.rmem_max = 1048576

Thank you !
regards,
Anthony

php-pfm + chucked encoding (no replies)

$
0
0
Hi,

I have a PHP application that outputs chunk-encoded data (http://en.wikipedia.org/wiki/Chunked_transfer_encoding) along with a "transfer-encoding: chunked" header.

This works as expected using apache but not when I'm using nginx+php-fpm.

The "transfer-encoding: chunked" header is replaced by a "transfer-encoding: identity" header and this makes it impossible for the client to properly decode the response since it doesn't know that the data is chunk-encoded.

Anyone know how to solve this? I'm using nginx/1.4.6 (Ubuntu) and PHP 5.5.9-1ubuntu4.

Thanks.

php-fpm master process crashes silently (no replies)

$
0
0
Hello,

I hope you can help me.
I'm running NGINX with PHP-FPM and since some weeks my master process is crashing silently. (nothing about a crash in any logs)
The Nginx and php version are irrelevent because this problem persists over some versions.
But the problem occurred after I upgraded to Ubuntu 14.04.
The strange thing is: Monit tells me that php-fpms master process is crashing once a week exactly on Sunday 6:50 or Monday 6:50 UTC +1. (Mabe something with logrotation?)
The only crazy thing I can see is, that shortly before php is crashing, its testing its configuration file multiple times / second.
I cannot see any high load or anything at the time of the crash.
I even reset every configuration file of php-fpm and installed the defaults, or set the pollig method to poll or epoll.
The latest crash was yesterday 6:50. Short before the crash (5 minutes) and after the crash (1 hour) syslog said:
kernel: [C.D] php5-fpm[8380]: segfault at X ip Y sp Z error 6 in php5-fpm[400000+7ff000]
kernel: [C.E] Core dump to |/usr/share/apport/apport A 11 0 B pipe failed

How can I fix the php and the apport error?

Thank you!

connection issue php-fpm and nginx (1 reply)

$
0
0
Hi all, How are you?

I am trying to setup a new environment with the following characteristics:
* CentOS version 6.5 (64 bits);
* Nginx version 1.6.1;
* PHP-fpm version 5.3.3-27;
* PHP version 5.3.3;
* Mysql version 5.1.73;

This is my /etc/nginx/conf.d/default.conf file:
------------------start default.conf
server {
listen 80;
server_name localhost;

root /usr/share/nginx/html;

location / {
root /usr/share/nginx/html;
index index.html index.htm;
}

index index.html index.htm index.php default.php;

error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}

location ~ \.php$ {
fastcgi_pass unix:/var/run/php-fpm.socket;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
include fastcgi_params;
}
}

------------------end default.conf

This is small part of /etc/php-fpm.d/www.conf concerned with nginx:
------------------start www.conf
[www]
listen = /var/run/php-fpm.socket
listen.owner = nginx
listen.group = nginx
listen.mode = 0666
user = nginx
group = nginx
pm.status_path = /status
------------------start www.conf

I have created a index.php page at /usr/share/nginx/html folder with the following content:
------------------start index.php
<?php
phpinfo();
?>
------------------start index.php

The issue is that when I try to access http://localhost/info.php thus nginx provides me info.php source code.
I mean, when I try to access http://localhost/info.php then nginx pushes info.php source code without any further processing.
Therefore, It looks like that there is a configuration problem between nginx and PHP-fpm, but I can not figure out what is going on.
It is also important to note that nginx and PHP-fpm errors logs does not registry any kind of error/issue.

Please, May someone help me?I have no idea of what is going on.

I appreciate any help you can give me,
Roger

Blank PHP pages with Nginx 1.7.4 + PHP 5.6 + Ubuntu 14.04? (no replies)

$
0
0
Hi,

I'm running Ubuntu 14.04 with nginx 1.7.4 (ppa:nginx/development) and PHP 5.6 (ppa:ondrej/php5-5.6).

Everything was working just fine with nginx 1.7.1 but when I upgraded to 1.7.4 every single PHP page is blank, even phpinfo.

I tried rebuilding my VPS and starting over from scratch but no matter what I did I still get a blank page with 1.7.4.

As soon as I revert to nginx 1.7.1 or the latest build available with the default Ubuntu LTS 14.04 repository there's no problem.

Has anyone else experienced this with 1.7.4-1+trusty? What might be the cause?

Here is the config I'm testing with:

server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;

root /var/www/domain.com;
index index.php index.html index.htm;

server_name domain.com;

location / {
try_files $uri $uri/ =404;
}

error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}

location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
}

php-fpm high cpu usage (no replies)

$
0
0
I have a high traffic site (we are talking about millions of pageviews per month here) and i am having trouble optimizing php-fpm as each process is using a huge amount of cpu(15% to 99%).My load average is typically 20 at peak times (which is huge).



http://gyazo.com/866d574730def373e6c79e074fd52fcd

My server specs(i upgraded both ram and cpu in an attempt to solve the problem).My site uses just Nginx+PHP-FPM , there is no database or anything else but i use Zend Opcache

nginx version: nginx/1.7.5
PHP 5.5.16 (cli) (built: Sep 3 2014 20:08:58)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2014, by Zend Technologies

Dual Xeon E5-2620
16gb of ram

I have many such warning in my logs

WARNING: [pool www] child 15215 exited on signal 15 (SIGTERM) after 319.786619 seconds from start

WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 76 idle, and 338 total children

My php-fpm config

pm = dynamic
pm.max_children = 800
pm.start_servers = 120
pm.min_spare_servers = 80
pm.max_spare_servers = 160
pm.max_requests = 500

upstream sent invalid status "" while reading response header from upstream (1 reply)

$
0
0
Just started getting 502 Bad Gateway and in the nginx error log I see:

upstream sent invalid status "" while reading response header from upstream

When I restarted php-fpm, everything went back to normal and working. Did something with php-fpm just go wrong? I don't see anything in the php-fpm error logs. What typically causes this, and what are some fixes to prevent it from happening again.

upstream select (no replies)

$
0
0
I am running Joomla + CiviCRM and the php-fpm requierements are much differents between the two.
I am trying to select the proper upstream php based on the args, like that "/index.php?Itemid=1050&option=com_civicrm&view=Events&lang=fr".
I would like all pages refering to com_civicrm to be handled by a specific upstream and all the rest by another. I am pretty sure that the upstream hash should do the job but I can't find how.

Any suggestion?

Suggest some best PHP development companies in India (no replies)

$
0
0
Hello,

I am planning to design a new website for my business. Therefore want the details of best PHP development companies in India so as to build an attractive website.

failed (13: Permission denied) while reading upstream (no replies)

$
0
0
hello all. I need help with this issue:

tail -n 7 /var/log/nginx/log
2015/03/14 02:11:36 [crit] 4138#0: *1338 open() "/var/lib/nginx/fastcgi/6/18/0000000186" failed (13: Permission denied) while reading upstream, client: 88.23.59.219, server: localhost, request: "GET /apamcyl/wp-admin/customize.php?save=Guardar+y+publicar HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "www.forestux.es", referrer: "http://www.forestux.es/apamcyl/wp-admin/customize.php?save=Guardar+y+publicar"
2015/03/14 02:13:26 [crit] 4138#0: *1345 open() "/var/lib/nginx/fastcgi/7/18/0000000187" failed (13: Permission denied) while reading upstream, client: 88.23.59.219, server: localhost, request: "GET /apamcyl/wp-admin/customize.php?save=Guardar+y+publicar HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "www.forestux.es", referrer: "http://www.forestux.es/apamcyl/wp-admin/customize.php?save=Guardar+y+publicar"
2015/03/14 02:46:55 [emerg] 4161#0: "server" directive is not allowed here in /etc/nginx/nginx.conf:81
2015/03/14 02:48:25 [notice] 4165#0: signal process started
2015/03/14 02:49:42 [crit] 4166#0: *1352 open() "/var/lib/nginx/fastcgi/8/18/0000000188" failed (13: Permission denied) while reading upstream, client: 88.23.59.219, server: localhost, request: "GET /apamcyl/wp-admin/customize.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "www.forestux.es", referrer: "http://www.forestux.es/apamcyl/wp-admin/"
2015/03/14 02:49:45 [crit] 4166#0: *1363 open() "/var/lib/nginx/fastcgi/9/18/0000000189" failed (13: Permission denied) while reading upstream, client: 88.23.59.219, server: localhost, request: "GET /apamcyl/wp-admin/customize.php?save=Guardar+y+publicar HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "www.forestux.es", referrer: "http://www.forestux.es/apamcyl/wp-admin/customize.php"

It happens when I try to save any configuration with a wordpress user, like updoading a file or changing anything of the aspect of a web page.

The directory /var/lib/nginx/fastcgi is empty, and these are their owners/permissions:

ls -al /var/lib/nginx/fastcgi
total 8
drwx------ 2 panchito root 4096 feb 28 18:08 ./
drwx------ 7 root root 4096 feb 28 18:08 ../

I changed permissions to it to 706, or even 777 with the same results.

I built my own LEMP "home web server" with this:

uname -a:
Linux Sherwood 3.10.17 #2 SMP Wed Oct 23 16:34:38 CDT 2013 x86_64 Intel(R) Xeon(TM) CPU 3.20GHz GenuineIntel GNU/Linux

cat /etc/slackware-version
Slackware 14.1

php-fpm -v
PHP 5.4.20 (fpm-fcgi) (built: Oct 11 2013 17:50:39)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies

nginx -v
nginx version: nginx/1.6.2

php -v
PHP 5.4.20 (cli) (built: Oct 11 2013 17:50:38)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies


I paste too any configuration from my nginx.conf I think can be useful for you:

user panchito grupo_panchito;
worker_processes 1;
server {
listen 80;
server_name localhost;

#charset koi8-r;

#access_log logs/host.access.log main;

location / {
root /var/www;
index index.php index.html index.htm;
}
location ~ \.php$ {
root /var/www;
fastcgi_split_path_info ^(.+\.php)(.+)$;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www$fastcgi_script_name;
include fastcgi_params;
}
}


Note I decompressed wordpress in a directory called /var/www/directory_name

I paste too my php-fpm.conf:

;;;;;;;;;;;;;;;;;;;;;
; FPM Configuration ;
;;;;;;;;;;;;;;;;;;;;;

; All relative paths in this configuration file are relative to PHP's install
; prefix (/usr). This prefix can be dynamically changed by using the
; '-p' argument from the command line.

; Include one or more files. If glob(3) exists, it is used to include a bunch of
; files from a glob(3) pattern. This directive can be used everywhere in the
; file.
; Relative path can also be used. They will be prefixed by:
; - the global prefix if it's been set (-p argument)
; - /usr otherwise
;include=etc/php-fpm/*.conf

;;;;;;;;;;;;;;;;;;
; Global Options ;
;;;;;;;;;;;;;;;;;;

[global]
; Pid file
; Note: the default prefix is /var
; Default Value: none
pid = run/php-fpm.pid

; Error log file
; If it's set to "syslog", log is sent to syslogd instead of being written
; in a local file.
; Note: the default prefix is /var
; Default Value: log/php-fpm.log
error_log = log/php-fpm.log

; syslog_facility is used to specify what type of program is logging the
; message. This lets syslogd specify that messages from different facilities
; will be handled differently.
; See syslog(3) for possible values (ex daemon equiv LOG_DAEMON)
; Default Value: daemon
;syslog.facility = daemon

; syslog_ident is prepended to every message. If you have multiple FPM
; instances running on the same server, you can change the default value
; which must suit common needs.
; Default Value: php-fpm
;syslog.ident = php-fpm

; Log level
; Possible Values: alert, error, warning, notice, debug
; Default Value: notice
;log_level = notice

; If this number of child processes exit with SIGSEGV or SIGBUS within the time
; interval set by emergency_restart_interval then FPM will restart. A value
; of '0' means 'Off'.
; Default Value: 0
;emergency_restart_threshold = 0

; Interval of time used by emergency_restart_interval to determine when
; a graceful restart will be initiated. This can be useful to work around
; accidental corruptions in an accelerator's shared memory.
; Available Units: s(econds), m(inutes), h(ours), or d(ays)
; Default Unit: seconds
; Default Value: 0
;emergency_restart_interval = 0

; Time limit for child processes to wait for a reaction on signals from master.
; Available units: s(econds), m(inutes), h(ours), or d(ays)
; Default Unit: seconds
; Default Value: 0
;process_control_timeout = 0

; The maximum number of processes FPM will fork. This has been design to control
; the global number of processes when using dynamic PM within a lot of pools.
; Use it with caution.
; Note: A value of 0 indicates no limit
; Default Value: 0
; process.max = 128

; Specify the nice(2) priority to apply to the master process (only if set)
; The value can vary from -19 (highest priority) to 20 (lower priority)
; Note: - It will only work if the FPM master process is launched as root
; - The pool process will inherit the master process priority
; unless it specified otherwise
; Default Value: no set
; process.priority = -19

; Send FPM to background. Set to 'no' to keep FPM in foreground for debugging.
; Default Value: yes
;daemonize = yes

; Set open file descriptor rlimit for the master process.
; Default Value: system defined value
;rlimit_files = 1024

; Set max core size rlimit for the master process.
; Possible Values: 'unlimited' or an integer greater or equal to 0
; Default Value: system defined value
;rlimit_core = 0

; Specify the event mechanism FPM will use. The following is available:
; - select (any POSIX os)
; - poll (any POSIX os)
; - epoll (linux >= 2.5.44)
; - kqueue (FreeBSD >= 4.1, OpenBSD >= 2.9, NetBSD >= 2.0)
; - /dev/poll (Solaris >= 7)
; - port (Solaris >= 10)
; Default Value: not set (auto detection)
;events.mechanism = epoll

; When FPM is build with systemd integration, specify the interval,
; in second, between health report notification to systemd.
; Set to 0 to disable.
; Available Units: s(econds), m(inutes), h(ours)
; Default Unit: seconds
; Default value: 10
;systemd_interval = 10

;;;;;;;;;;;;;;;;;;;;
; Pool Definitions ;
;;;;;;;;;;;;;;;;;;;;

; Multiple pools of child processes may be started with different listening
; ports and different management options. The name of the pool will be
; used in logs and stats. There is no limitation on the number of pools which
; FPM can handle. Your system will tell you anyway :)

; Start a new pool named 'www'.
; the variable $pool can we used in any directive and will be replaced by the
; pool name ('www' here)
[www]

; Per pool prefix
; It only applies on the following directives:
; - 'slowlog'
; - 'listen' (unixsocket)
; - 'chroot'
; - 'chdir'
; - 'php_values'
; - 'php_admin_values'
; When not set, the global prefix (or /usr) applies instead.
; Note: This directive can also be relative to the global prefix.
; Default Value: none
;prefix = /path/to/pools/$pool

; Unix user/group of processes
; Note: The user is mandatory. If the group is not set, the default user's group
; will be used.
user = panchito
group = grupo_panchito

; The address on which to accept FastCGI requests.
; Valid syntaxes are:
; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific address on
; a specific port;
; 'port' - to listen on a TCP socket to all addresses on a
; specific port;
; '/path/to/unix/socket' - to listen on a unix socket.
; Note: This value is mandatory.
listen = 127.0.0.1:9000

; Set listen(2) backlog.
; Default Value: 128 (-1 on FreeBSD and OpenBSD)
;listen.backlog = 128

; Set permissions for unix socket, if one is used. In Linux, read/write
; permissions must be set in order to allow connections from a web server. Many
; BSD-derived systems allow connections regardless of permissions.
; Default Values: user and group are set as the running user
; mode is set to 0666
listen.owner = panchito
listen.group = grupo_panchito
listen.mode = 0666

; List of ipv4 addresses of FastCGI clients which are allowed to connect.
; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original
; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address
; must be separated by a comma. If this value is left blank, connections will be
; accepted from any ip address.
; Default Value: any
;listen.allowed_clients = 127.0.0.1

; Specify the nice(2) priority to apply to the pool processes (only if set)
; The value can vary from -19 (highest priority) to 20 (lower priority)
; Note: - It will only work if the FPM master process is launched as root
; - The pool processes will inherit the master process priority
; unless it specified otherwise
; Default Value: no set
; priority = -19

; Choose how the process manager will control the number of child processes.
; Possible Values:
; static - a fixed number (pm.max_children) of child processes;
; dynamic - the number of child processes are set dynamically based on the
; following directives. With this process management, there will be
; always at least 1 children.
; pm.max_children - the maximum number of children that can
; be alive at the same time.
; pm.start_servers - the number of children created on startup.
; pm.min_spare_servers - the minimum number of children in 'idle'
; state (waiting to process). If the number
; of 'idle' processes is less than this
; number then some children will be created.
; pm.max_spare_servers - the maximum number of children in 'idle'
; state (waiting to process). If the number
; of 'idle' processes is greater than this
; number then some children will be killed.
; ondemand - no children are created at startup. Children will be forked when
; new requests will connect. The following parameter are used:
; pm.max_children - the maximum number of children that
; can be alive at the same time.
; pm.process_idle_timeout - The number of seconds after which
; an idle process will be killed.
; Note: This value is mandatory.
pm = dynamic

; The number of child processes to be created when pm is set to 'static' and the
; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'.
; This value sets the limit on the number of simultaneous requests that will be
; served. Equivalent to the ApacheMaxClients directive with mpm_prefork.
; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP
; CGI. The below defaults are based on a server without much resources. Don't
; forget to tweak pm.* to fit your needs.
; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand'
; Note: This value is mandatory.
pm.max_children = 5

; The number of child processes created on startup.
; Note: Used only when pm is set to 'dynamic'
; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2
pm.start_servers = 2

; The desired minimum number of idle server processes.
; Note: Used only when pm is set to 'dynamic'
; Note: Mandatory when pm is set to 'dynamic'
pm.min_spare_servers = 1

; The desired maximum number of idle server processes.
; Note: Used only when pm is set to 'dynamic'
; Note: Mandatory when pm is set to 'dynamic'
pm.max_spare_servers = 3

; The number of seconds after which an idle process will be killed.
; Note: Used only when pm is set to 'ondemand'
; Default Value: 10s
;pm.process_idle_timeout = 10s;

; The number of requests each child process should execute before respawning.
; This can be useful to work around memory leaks in 3rd party libraries. For
; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
; Default Value: 0
;pm.max_requests = 500

; The URI to view the FPM status page. If this value is not set, no URI will be
; recognized as a status page. It shows the following informations:
; pool - the name of the pool;
; process manager - static, dynamic or ondemand;
; start time - the date and time FPM has started;
; start since - number of seconds since FPM has started;
; accepted conn - the number of request accepted by the pool;
; listen queue - the number of request in the queue of pending
; connections (see backlog in listen(2));
; max listen queue - the maximum number of requests in the queue
; of pending connections since FPM has started;
; listen queue len - the size of the socket queue of pending connections;
; idle processes - the number of idle processes;
; active processes - the number of active processes;
; total processes - the number of idle + active processes;
; max active processes - the maximum number of active processes since FPM
; has started;
; max children reached - number of times, the process limit has been reached,
; when pm tries to start more children (works only for
; pm 'dynamic' and 'ondemand');
; Value are updated in real time.
; Example output:
; pool: www
; process manager: static
; start time: 01/Jul/2011:17:53:49 +0200
; start since: 62636
; accepted conn: 190460
; listen queue: 0
; max listen queue: 1
; listen queue len: 42
; idle processes: 4
; active processes: 11
; total processes: 15
; max active processes: 12
; max children reached: 0
;
; By default the status page output is formatted as text/plain. Passing either
; 'html', 'xml' or 'json' in the query string will return the corresponding
; output syntax. Example:
; http://www.foo.bar/status
; http://www.foo.bar/status?json
; http://www.foo.bar/status?html
; http://www.foo.bar/status?xml
;
; By default the status page only outputs short status. Passing 'full' in the
; query string will also return status for each pool process.
; Example:
; http://www.foo.bar/status?full
; http://www.foo.bar/status?json&full
; http://www.foo.bar/status?html&full
; http://www.foo.bar/status?xml&full
; The Full status returns for each process:
; pid - the PID of the process;
; state - the state of the process (Idle, Running, ...);
; start time - the date and time the process has started;
; start since - the number of seconds since the process has started;
; requests - the number of requests the process has served;
; request duration - the duration in µs of the requests;
; request method - the request method (GET, POST, ...);
; request URI - the request URI with the query string;
; content length - the content length of the request (only with POST);
; user - the user (PHP_AUTH_USER) (or '-' if not set);
; script - the main script called (or '-' if not set);
; last request cpu - the %cpu the last request consumed
; it's always 0 if the process is not in Idle state
; because CPU calculation is done when the request
; processing has terminated;
; last request memory - the max amount of memory the last request consumed
; it's always 0 if the process is not in Idle state
; because memory calculation is done when the request
; processing has terminated;
; If the process is in Idle state, then informations are related to the
; last request the process has served. Otherwise informations are related to
; the current request being served.
; Example output:
; ************************
; pid: 31330
; state: Running
; start time: 01/Jul/2011:17:53:49 +0200
; start since: 63087
; requests: 12808
; request duration: 1250261
; request method: GET
; request URI: /test_mem.php?N=10000
; content length: 0
; user: -
; script: /home/fat/web/docs/php/test_mem.php
; last request cpu: 0.00
; last request memory: 0
;
; Note: There is a real-time FPM status monitoring sample web page available
; It's available in: /usr/share/fpm/status.html
;
; Note: The value must start with a leading slash (/). The value can be
; anything, but it may not be a good idea to use the .php extension or it
; may conflict with a real PHP file.
; Default Value: not set
;pm.status_path = /status

; The ping URI to call the monitoring page of FPM. If this value is not set, no
; URI will be recognized as a ping page. This could be used to test from outside
; that FPM is alive and responding, or to
; - create a graph of FPM availability (rrd or such);
; - remove a server from a group if it is not responding (load balancing);
; - trigger alerts for the operating team (24/7).
; Note: The value must start with a leading slash (/). The value can be
; anything, but it may not be a good idea to use the .php extension or it
; may conflict with a real PHP file.
; Default Value: not set
;ping.path = /ping

; This directive may be used to customize the response of a ping request. The
; response is formatted as text/plain with a 200 response code.
; Default Value: pong
;ping.response = pong

; The access log file
; Default: not set
;access.log = log/$pool.access.log

; The access log format.
; The following syntax is allowed
; %%: the '%' character
; %C: %CPU used by the request
; it can accept the following format:
; - %{user}C for user CPU only
; - %{system}C for system CPU only
; - %{total}C for user + system CPU (default)
; %d: time taken to serve the request
; it can accept the following format:
; - %{seconds}d (default)
; - %{miliseconds}d
; - %{mili}d
; - %{microseconds}d
; - %{micro}d
; %e: an environment variable (same as $_ENV or $_SERVER)
; it must be associated with embraces to specify the name of the env
; variable. Some exemples:
; - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e
; - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e
; %f: script filename
; %l: content-length of the request (for POST request only)
; %m: request method
; %M: peak of memory allocated by PHP
; it can accept the following format:
; - %{bytes}M (default)
; - %{kilobytes}M
; - %{kilo}M
; - %{megabytes}M
; - %{mega}M
; %n: pool name
; %o: output header
; it must be associated with embraces to specify the name of the header:
; - %{Content-Type}o
; - %{X-Powered-By}o
; - %{Transfert-Encoding}o
; - ....
; %p: PID of the child that serviced the request
; %P: PID of the parent of the child that serviced the request
; %q: the query string
; %Q: the '?' character if query string exists
; %r: the request URI (without the query string, see %q and %Q)
; %R: remote IP address
; %s: status (response code)
; %t: server time the request was received
; it can accept a strftime(3) format:
; %d/%b/%Y:%H:%M:%S %z (default)
; %T: time the log has been written (the request has finished)
; it can accept a strftime(3) format:
; %d/%b/%Y:%H:%M:%S %z (default)
; %u: remote user
;
; Default: "%R - %u %t \"%m %r\" %s"
;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%"

; The log file for slow requests
; Default Value: not set
; Note: slowlog is mandatory if request_slowlog_timeout is set
;slowlog = log/$pool.log.slow

; The timeout for serving a single request after which a PHP backtrace will be
; dumped to the 'slowlog' file. A value of '0s' means 'off'.
; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
; Default Value: 0
;request_slowlog_timeout = 0

; The timeout for serving a single request after which the worker process will
; be killed. This option should be used when the 'max_execution_time' ini option
; does not stop script execution for some reason. A value of '0' means 'off'.
; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
; Default Value: 0
;request_terminate_timeout = 0

; Set open file descriptor rlimit.
; Default Value: system defined value
;rlimit_files = 1024

; Set max core size rlimit.
; Possible Values: 'unlimited' or an integer greater or equal to 0
; Default Value: system defined value
;rlimit_core = 0

; Chroot to this directory at the start. This value must be defined as an
; absolute path. When this value is not set, chroot is not used.
; Note: you can prefix with '$prefix' to chroot to the pool prefix or one
; of its subdirectories. If the pool prefix is not set, the global prefix
; will be used instead.
; Note: chrooting is a great security feature and should be used whenever
; possible. However, all PHP paths will be relative to the chroot
; (error_log, sessions.save_path, ...).
; Default Value: not set
;chroot =

; Chdir to this directory at the start.
; Note: relative path can be used.
; Default Value: current directory or / when chroot
;chdir = /var/www

; Redirect worker stdout and stderr into main error log. If not set, stdout and
; stderr will be redirected to /dev/null according to FastCGI specs.
; Note: on highloaded environement, this can cause some delay in the page
; process time (several ms).
; Default Value: no
;catch_workers_output = yes

; Limits the extensions of the main script FPM will allow to parse. This can
; prevent configuration mistakes on the web server side. You should only limit
; FPM to .php extensions to prevent malicious users to use other extensions to
; exectute php code.
; Note: set an empty value to allow all extensions.
; Default Value: .php
;security.limit_extensions = .php .php3 .php4 .php5

; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from
; the current environment.
; Default Value: clean env
;env[HOSTNAME] = $HOSTNAME
;env[PATH] = /usr/local/bin:/usr/bin:/bin
;env[TMP] = /tmp
;env[TMPDIR] = /tmp
;env[TEMP] = /tmp

; Additional php.ini defines, specific to this pool of workers. These settings
; overwrite the values previously defined in the php.ini. The directives are the
; same as the PHP SAPI:
; php_value/php_flag - you can set classic ini defines which can
; be overwritten from PHP call 'ini_set'.
; php_admin_value/php_admin_flag - these directives won't be overwritten by
; PHP call 'ini_set'
; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no.

; Defining 'extension' will load the corresponding shared extension from
; extension_dir. Defining 'disable_functions' or 'disable_classes' will not
; overwrite previously defined php.ini values, but will append the new value
; instead.

; Note: path INI options can be relative and will be expanded with the prefix
; (pool, global or /usr)

; Default Value: nothing is defined by default except the values in php.ini and
; specified at startup with the -d argument
;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com
;php_flag[display_errors] = off
;php_admin_value[error_log] = /var/log/fpm-php.www.log
;php_admin_flag[log_errors] = on
;php_admin_value[memory_limit] = 32M


Thank you very much for your help.
Viewing all 219 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>