Questions tagged [php-fpm]

PHP-FPM (FastCGI Process Manager) is an alternative PHP FastCGI implementation with some additional features useful for sites of any size, especially busier sites.

PHP-FPM provides a number of useful features over the traditional FastCGI php implementation. It is implemented as a daemon that controls one or more PHP process 'pools' which can be independently configured. Main configuration options for each pool include:

  • Socket on which requests are received (either local or TCP)
  • Separate php.ini settings for specific application requirements
  • Dynamic process control. FPM can dynamically change the number of worker processes depending on pool load.
  • Uid/gid for the pool workers
  • In-flight configuration updates - a change to the pool configuration will be rolled out gracefully across all pool workers without losing connections.
2156 questions
80
votes
3 answers

php5-fpm: server reached pm.max_children

I have Nginx + php5-fpm. Several times per hour my website stucks and in logfile I see the following: WARNING: [pool www] server reached pm.max_children setting (5), consider raising it. /etc/php5/fpm/pool.d/www.conf file contains the following…
user1821484
  • 1,189
13
votes
2 answers

php-fpm: hundreds of seconds in the log

I have nginx+php-fpm web server So I've noticed in php5-fpm.log many strange lines: [03-Sep-2013 09:25:23] NOTICE: [pool www] child 23999 exited with code 0 after 321.832329 seconds from start [03-Sep-2013 09:25:23] NOTICE: [pool www] child 24082…
Lari13
  • 285
13
votes
2 answers

How to set 644 permission on php-fpm log file?

The FPM log file located in /var/log/php-fpm.log has permissions rw------- (600). Other log files have rw-r--r--. How can I configure the file permission to 644?
Rohit
  • 310
9
votes
7 answers

Php-fpm status page is not displayed

I've try to get php-fpm status page. When i open /status page in a web browser or directly to fcgi - it says File not found. Could you help - how to fix this. # grep -ER "status|ping" /etc/php5/* | grep -v…
BaZZiliO
  • 320
8
votes
2 answers

PHP FPM keeps hanging

I have tried all sorts of options but every couple days (mostly every day) FPM stops serving pages and I get a 502 (from cherokee webserver) The logs are filled with the following: [15-Sep-2014 10:17:46] WARNING: [pool www] child 10135 exited on…
dogmatic69
  • 350
  • 1
  • 7
  • 18
7
votes
1 answer

listen.owner & listen.group not taken into account

I'm trying to change the owner/group of the PHP-FPM socket file. My www.conf contains: [www] ... listen = /run/php-fpm/www.sock listen.owner = ben listen.group = ben listen.mode = 0660 Upon restarting php-fpm, www.sock is still owned by…
BenMorel
  • 4,607
7
votes
1 answer

Why does static vs dynamic process management affect memory usage so much for php-fpm?

I recently migrated a client to an EC2 instance running Nginx + PHP-FPM. When I first setup the server I had set pm=static with 40 worker processes. After a week or so I decided to experiment with pm=dynamic with a max of 200 and a min of 30…
5
votes
1 answer

php-fpm status page: what are the "queue" items in this report?

So I have a working nginx+php-fpm installation. The php-fpm status report page is activated and I get something like that (do not care about settings, it's a test server under stress tests): pool: foobar process manager: …
regilero
  • 1,490
4
votes
1 answer

What does "graceful reload" actually mean with php fpm?

The php-fpm man page states the response to a USR2 signal is: "graceful reload of all workers + reload of fpm conf/binary". However, in testing I find that a reload actually kills workers processing requests. I was expecting requests to be allowed…
virullius
  • 1,058
4
votes
1 answer

chroot php-fpm process to user's home

I'm in the process of moving each of my websites that are on a single server from a single PHP instance (whereby all of the files in all websites were owned by apache, and just the default php library was installed without php-fpm) ... and I'm…
David W
  • 3,469
  • 6
  • 38
  • 63
3
votes
0 answers

What is PHP-FPM doing actually?

I followed the steps to install PHP5.6 and PHP7.1 side by side on an Apache server, using FastCGI. One of the steps is to install and start php-fpm. However, when I stop this service, the PHP systems still work. So, what is php-fpm actually doing if…
3
votes
1 answer

php7.0-fpm emergency_restart_threshold option

I'm setting up nginx and php7.0-fpm on Ubuntu 16.0.4. I haven't used nginx and php7.0-fpm combo before so I was following a number of guides. The guides I found all recommended adding the following config option to the www.conf file for…
Flatlyn
  • 165
3
votes
1 answer

php-fpm stuck at state: Finishing

The site use nginx+php-fpm. Today, accessing some pages returns 502 state in a few seconds (different from 502 caused by php script timeout), while other pages stay in service. Status page of php-fpm shows all processes are active, but they're all…
Haocheng
  • 141
3
votes
2 answers

Debugging strategy for PHP-FPM

So I'm just setting up nginx and php5-fpm on my VPS, having moved over from Apache. I'm running Debian Squeeze, with the latest PHP from the dotdeb.org repo (that means PHP 5.4.13-1~dotdeb.1). I am having trouble getting php5-fpm going. When run…
penguin
  • 177
2
votes
1 answer

how to know how many children and servers set on PHP-FPM

I realised a big problem today, too much traffic made my website totally down but i have a big server to host it. Here's what i got : [20-May-2019 14:23:02] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or…
Metra
  • 123
1
2 3