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
1 answer

Update from PHP 5.6 to PHP 7.3

I am trying to update from PHP 5.6 to PHP 7.3 I installed: php7.0-fpm php7.0-mysql and I have the 2 services raised but Nginx only recognizes PHP 5.6. If I stop the service, I get the error 502 Bad Gateway. I have changed in…
Isaac Palacio
  • 149
  • 4
  • 12
0
votes
0 answers

Nginx pass my request to default or local address

There is two issue with NGINX configurations. I tried to setup prestashop on CentOS 7 with Nginx according to this instrument that I found similar this in Prestashop forums . the nginx.config file is as below: user nginx; …
0
votes
1 answer

PHP 7 FPM checkconf is throwing invalid user: ‘www-data:www-data’, but I'm not using a www-data user

I'm using a different user for my web services. Screw convention. I don't have www-data set in any php config files: $ grep -rnw /etc -e 'www-data' $ But I'm still getting this error: $ journalctl -u php7.0-fpm php7.0-fpm-checkconf[19642]:…
ki9
  • 1,243
  • 1
  • 13
  • 19
0
votes
1 answer

What does the following statement on nginx config mean?

I am seeing a statement on nginx config but can't figure out what it does. this works when I am at the main directory under path; however, when I try to access files in subdirectories, it doesn't work. What does this mean and how would I change it…
Jorjani
  • 133
  • 3
  • 12
0
votes
1 answer

nginx/php/fastcgi: php files from secondary directories not evaluated as php

I'm running nginx-1.14.0 with php-fpm7.2. When I access php files that are resident in the root, they are properly sent through fastcgi and their php gets properly evaluated. However, when I access php files -- even with the same contents -- from…
HippoMan
  • 222
  • 1
  • 10
0
votes
1 answer

Location block passing through to a different php-fpm sock

There are two hosts with a PHP-FPM pool each - one.com and two.com. I would like one.com/two to pass through and show two.com using two's pool, but I seem to be having difficulty. Through alias and try_files, I've managed to get static assets from…
Sean
  • 101
  • 3
0
votes
1 answer

PHP-FPM Not loading Environment Variables from /etc/environment

I have environment variables set in /etc/environment. printenv shows them. However, php-fpm isn't seeing them. I have uncommented clear_env = no in /etc/php-fpm.d/www.conf - this exposes SOME env vars to php-fpm (such as PATH), but none of those set…
0
votes
1 answer

NGINX + PHP-FPM issues with burst requests

I have NGINX setup with PHP7.2-FPM and am having issues with burst requests. The average amount of active processes (fpm children) is 15. I have these settings (48 core server): listen.backlog = 1024 pm.max_children = 1024 pm.start_servers =…
user2693017
  • 203
  • 3
  • 12
0
votes
2 answers

Start command only works when run manually

I get the following error when installing PHP FPM: Creating config file /etc/php/7.0/fpm/php.ini with new version invoke-rc.d: could not determine current runlevel invoke-rc.d: policy-rc.d denied execution of start. I tried the following tweaks in…
Jimmy
  • 269
  • 4
  • 7
  • 23
0
votes
1 answer

Why does WordPress on 3 load balanced EC2 servers run out of memory/fpm child processes and crash?

The problem: 30-40 minutes after pointing the DNS from our old server towards our new server, all available memory gets used up and our (3) load balanced EC2 instances crash. To make matters worse, it doesn't appear that Elastic Beanstalk is…
rugbert
  • 83
  • 2
  • 10
0
votes
1 answer

NGINX + php7.0-fpm + phpmyadmin

Disclaimer: I've tried tips listed in probably every google result on the first 2 pages. None of them worked for me. This is not a duplicate. I'm running Debian 9 in LXC container that had LAMP installed, today I wanted to replace apache2 with…
Kristi
  • 91
  • 2
  • 10
0
votes
3 answers

nginx downloads php files instead of rendering them

I found a similar question here: https://stackoverflow.com/questions/25591040/nginx-serves-php-files-as-downloads-instead-of-executing-them But unfortunately the answer there doesn't help me. So here goes my story. What Works When I navigate to…
dot
  • 187
  • 2
  • 5
  • 11
0
votes
1 answer

Run php script artisan opcache:optimize after php7.2-fpm start or restart

I want to run php /path/to/artisan opcache:optimize to build laravel cache after php7.2-fpm start or after restart. I have tried to insert it on /etc/init.d/php7.2-fpm in do_start() method but failed the code didn't execute. please any idea? thanks
Hernawan
  • 61
  • 8
0
votes
2 answers

Error while compiling/installing PHP with FPM for RPM on Centos 5.4 x64

I'm trying to make an RPM with PHP 5.3.1 and PHP-FPM 0.6 for CentOS 5.4. So far it goes quite well, but when rpmbuild gets to the installation phase it fails with the following error: Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.63379 + umask…
Raymond
0
votes
1 answer

php threads (not processes) keep mounting up until server crashes

I've been struggling with the following problem for a while now and would very much appreciate your help. My webserver completely crashes on a regular basis due to too many php threads. The number of php processes is stable within a normal range…
Steve
  • 1
  • 1