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.
2118 questions
7
votes
3 answers

PHP-FPM service status `stop/waiting` but workers are running?

Starting php5-fpm appears to work, but checking the status immediately shows that it is not running: [root@server ~]# service php5-fpm start php5-fpm start/running, process 4516 [root@server ~]# service php5-fpm status php5-fpm stop/waiting Even…
Nick
  • 4,503
  • 29
  • 69
  • 97
7
votes
1 answer

PHP upgrade always breaks session folder permissions

Every time I upgrade php (via yum upgrade) on my CentOS box, my /var/lib/session folder ownership becomes root:apache with 600 permissions. I use nginx as my web server. This breaks my site and prevents sessions from being stored. The fix is…
Codemonkey
  • 1,086
  • 4
  • 19
  • 41
7
votes
3 answers

How to set umask for php-fpm in Fedora

I cannot find where to set umask (to set proper permissions to files created by php scripts) in Fedora 19. (specifically, I want new files to have the permissions 664)
leonbloy
  • 2,118
  • 17
  • 23
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…
talentedmrjones
  • 235
  • 3
  • 8
7
votes
2 answers

Still confused by Permissions - linux, nginx, php-fpm

I have read the canonical answer at What permissions should my website files/folders have on a Linux webserver? However I'm still stuck. My setup is: A developer user 'ade' who owns the directories and files that comprise a website The server is…
Ade
  • 699
  • 3
  • 10
  • 21
7
votes
1 answer

phpMyAdmin having problems on nginx and php-fpm on RHEL 6

We have a web server setup with nginx and php-fpm on Red Hat Linux 6 (RHEL). This machine already has WordPress installed, and it runs great. We have WordPress set up to go to wptest.domain.local. We then created a new site in sites-enabled called…
jmlumpkin
  • 197
  • 1
  • 2
  • 10
7
votes
1 answer

Setting $PATH for weberver user

I tried to add $PATH for all users including the webserver user (i.e. www-data) with different methods such as editing /etc/profile, /etc/environment, etc. In all cases, it works in terminal, but not with shell commands within PHP. For example echo…
Googlebot
  • 1,047
  • 2
  • 15
  • 30
7
votes
1 answer

NGINX on OSX - Performing terribly slow

I I've been trying to get NGINX up and running on my OSX 10.7 Lion computer. I have it running however simple html pages every few are taking a long time to load; for example: test Same thing happens with…
Petrogad
  • 129
  • 2
  • 12
7
votes
3 answers

Nginx and PHP FPM is slow

My server have 512 MB memory. nginx.conf setting is user www-data; worker_processes 2; pid /var/run/nginx.pid; events { worker_connections 768; # multi_accept on; } http { ## # Basic Settings ## sendfile on; #tcp_nopush on; #tcp_nodelay…
saturngod
  • 837
  • 2
  • 10
  • 12
7
votes
1 answer

Working Nginx fastcgi_cache php-fpm cache and static file caching configuration?

Nginx wiki is very vague with explanation as to how to properly setup nginx with php-fpm with fastcgi_caching for sites which have cookies i.e. wordpress, drupal, vbulletin etc. I downloaded a modified nginx bash shell install script called centmin…
p4guru
  • 963
  • 1
  • 8
  • 16
7
votes
2 answers

Nginx + PHP-FPM = "Random" 502 Bad Gateway

I am running Nginx and proxying php requests via FastCGI to PHP-FPM for processing. I will randomly receive 502 Bad Gateway error pages - I can reproduce this issue by clicking around my PHP websites very rapidly/refreshing a page for a minute or…
user39547
6
votes
0 answers

How can one php-fpm 5.6 site cause an outage across all sites?

I have a real head scratcher with one site on a server affecting others in separate php-fpm pools. I thought the idea was that php-fpm pools gave isolation to stop (reduce) this from happening. We have a typical LEMP server (Ubuntu 16.04 running…
Dogsbody
  • 656
  • 4
  • 15
6
votes
1 answer

FastCGI: Unable to open primary script on NGinx and PHP-FPM

I am apparently not the only one with this problem, but after trying every suggested solution for couple I reached I point where I don't know what to do. I am running Ubuntu 16.04, NGinx and PHP-FPM. The nginx.conf is the default one, I only set a…
n.r.
  • 289
  • 1
  • 2
  • 10
6
votes
1 answer

How to check current pm.max_children setting?

I have modified pm.max_children in /opt/plesk/php/7.0/etc/php-fpm.d/domain.com.conf file. I restarted the php70-fpm service and want to check whether my settings are enabled or not. How can I check this setting?
Theo
  • 153
  • 1
  • 11
6
votes
2 answers

Why is there no php.ini file when I install PHP in a docker container?

I'm using docker-compose to setup a minimal nginx + php-fpm application but for some reason there is no php.ini file on the docker container (I know because phpinfo() says Loaded Configuration File: (none)). Here's my docker-compose.yml file: web: …
skb
  • 93
  • 1
  • 2
  • 7