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
0
votes
0 answers

PHP-FPM timing out and backend connection failure

I have a server with PHP7 FPM and Apache 2.4. I've set it up to running user pools. I have several PHP-FPM pools on the server. Only one is timing out and experiencing connection failures. This is the pool configuration for that user pool:…
Thomas
  • 135
  • 1
  • 3
0
votes
1 answer

Nginx: How to use a different php-fpm pool depending on url

I have a site using the standard nginx approach for directing traffic via /index.php regardless of url: location / { try_files $uri $uri/ /index.php?$args; } location ~ \.php$ { fastcgi_pass unix:/run/php/php7.0-fpm.sock; …
Peter Howe
  • 203
  • 2
  • 9
0
votes
1 answer

How to setup a different root for an Nginx location?

I'm setting up my local web dev server using NGINX and PHP-FPM on OS X. I've installed both services and set up a virtual for localhost domain. So far everything works: nginx is running correctly it's able to read files from the custom root…
sebi
  • 101
  • 2
0
votes
1 answer

Fine tune Nginx & PHP FPM

I have an Ubuntu droplet with the following: 16GB RAM 8 CPUs I'm running nginx and PHP FPM, but I don't seem to be getting the most out of my server. Both my CPU usage and my memory usage are at around 10%, even though the server hangs when…
Wayne
  • 73
  • 1
  • 11
0
votes
0 answers

Access PHP file outside root

This is my nginx conf: server { root /var/www/html/public; location / { rewrite ^(.*)$ /index.php last; try_files $uri $uri/ /index.php?$query_string =404; } location = /path/file.php { root /var/www/html; …
Gerardo
  • 111
  • 3
0
votes
2 answers

What total process, max active process and max children process?

pool: www process manager: dynamic start time: 22/Oct/2017:15:32:05 -0400 start since: 60605 accepted conn: 5169879 listen queue: 0 max listen queue: 0 listen queue len: 0 idle…
Mahesh
  • 247
  • 1
  • 4
  • 16
0
votes
0 answers

Execute PHP in subdirectory location Nginx

I have the problem that when I want to run the PHP script it does not run File Structure /home/myapp/landing * contact.php * index.html NGINX Conf location / { alias /home/myapp/main; } location /landing-page { alias…
Mr SC
  • 1
0
votes
1 answer

How to optimize Nginx and PHP-FPM?

Server is E3-1240v3 32GB Ram If i try to change the values on those files, they limit the visitors to 3k to 5k. This setting however handles upto 9k But the server resources are almost free. I am struggling to handle a traffic of 10K+ It will…
Mahesh
  • 247
  • 1
  • 4
  • 16
0
votes
0 answers

Nginx proxy_pass and proxy_set_header causes too many open files

I have the following .conf in nginx to balance between server a and b: upstream myapp { server a.myapp.com; server b.myapp.com; } server { listen 80; server_name myapp.com; location / { proxy_pass http://myapp; …
Ian
  • 101
  • 1
0
votes
1 answer

Unable to run PHP 7.1 on ubuntu 14.04

I have php 5.6.30 installed and running alongside nginx 1.12.1 on ubuntu 14.04.5 I want to run laravel 5.5 so I need to get php7+ and several php extensions. Here is how I try to install them $ sudo apt-get install php7.1 php7.1-cli php7.1-curl…
Timothy
  • 101
  • 2
0
votes
1 answer

Why can't I get PHP-FPM to work with nginx on CentOS?

I feel like I must be missing something that's right in front of me, but here's the situation. My nginx server continues to return a 502 Bad Gateway error every time I attempt to access a .php file from the browser (for example,…
jerdiggity
  • 101
  • 2
0
votes
1 answer

what's the best solution for privilege separation in Apache for content manager in PHP

I have several VirtualHost, and several web in the same VirtualHost: web1.example.org web2.example.org www.example.org/web3 www.example.org/web4 I tried use mod_proxy, mod_proxy_fcgi + PHP-FPM: Alias /myfoo /web/other/myfoo ProxyPassMatch…
0
votes
0 answers

Unknown commands running and eating up all the CPU

Here are a few unknown commands eating up all the CPU resources on Amazon ec2. This is since 10 hours. Command names are unrecognizable and read as phpxxxxx_xxxx. Can any one guess what is going on here? How to stop it? PID USER PR NI …
Shoaib Nawaz
  • 101
  • 2
0
votes
6 answers

Configuring Nginx + PHP-FPM For High Traffic Load

My nginx keep crashing and reporting "bad gateway" errors in the browser. Nginx and PHP-FPM don't come preconfigured to handle large traffic loads. I had to put a systemctl restart php7.0-fpm cron job in place each hour just to make sure my sites…
xendi
  • 414
  • 5
  • 10
  • 22
0
votes
1 answer

Error 404 with Wordpress subdomain using nginx

I'm in the process of setting up a subdomain with wordpress on it. I'm getting a 404 error with my nginx configuration. Currently using PHP Version: 7.0.22, not getting any errors in the php logs, but I am in nginx /var/log/nginx/error.log *1…
KingPen2
  • 3
  • 2