Welcome! Log In Create A New Profile

Advanced

Upstream service php-fpm is up and running but reports {"errors": {"status_code": 502,"status": "php-fpm server is down"}}

All files from this thread

File Name File Size   Posted by Date  
nginxtest.conf 7.2 KB open | download kaushalshriyan 12/15/2022 Read message
nginxtest.conf 7.2 KB open | download kaushalshriyan 12/16/2022 Read message
nginxtest.conf 7.7 KB open | download kaushalshriyan 01/04/2023 Read message
December 15, 2022 11:24AM
Hi,

I am running the nginx version: nginx/1.22 as a reverse proxy server on
CentOS Linux release 7.9.2009 (Core). When I hit http://mydomain.com/apis I
see the below message on the browser even if the upstream server php-fpm
server is up and running.

*{"errors": {"status_code": 502,"status": "php-fpm server is down"}}*

I have set the below in the nginx.conf file and attached the file for your
reference.

if ($upstream_http_content_type = "") {
add_header 'Content-Type' 'application/json' always;
add_header 'Content-Type-3'
$upstream_http_content_type$isdatatypejson"OK" always;
return 502 '{"errors": {"status_code": 502,"status":
"php-fpm server is down"}}';
}

# systemctl status php-fpm
● php-fpm.service - The PHP FastCGI Process Manager
Loaded: loaded (/usr/lib/systemd/system/php-fpm.service; enabled; vendor
preset: disabled)
Drop-In: /etc/systemd/system/php-fpm.service.d
└─override.conf
Active: active (running) since Thu 2022-12-15 15:53:31 UTC; 10s ago
Main PID: 9185 (php-fpm)
Status: "Processes active: 0, idle: 5, Requests: 0, slow: 0, Traffic:
0req/sec"
CGroup: /system.slice/php-fpm.service
├─9185 php-fpm: master process (/etc/php-fpm.conf)
├─9187 php-fpm: pool www
├─9188 php-fpm: pool www
├─9189 php-fpm: pool www
├─9190 php-fpm: pool www
└─9191 php-fpm: pool www

Dec 15 15:53:31 systemd[1]: Starting The PHP FastCGI Process Manager...
Dec 15 15:53:31 systemd[1]: Started The PHP FastCGI Process Manager.
#

Please guide me.

Best Regards,

Kaushal

{"errors": {"status_code": 502,"status": "php-fpm server is down"}}
_______________________________________________
nginx mailing list
nginx@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Upstream service php-fpm is up and running but reports {"errors": {"status_code": 502,"status": "php-fpm server is down"}}

kaushalshriyan December 15, 2022 11:24AM

Re: Upstream service php-fpm is up and running but reports {"errors": {"status_code": 502,"status": "php-fpm server is down"}} Attachments

kaushalshriyan December 15, 2022 11:28AM

Re: Upstream service php-fpm is up and running but reports {"errors": {"status_code": 502,"status": "php-fpm server is down"}}

Maxim Dounin December 15, 2022 03:10PM

Re: Upstream service php-fpm is up and running but reports {"errors": {"status_code": 502,"status": "php-fpm server is down"}}

kaushalshriyan December 15, 2022 08:54PM

Re: Upstream service php-fpm is up and running but reports {"errors": {"status_code": 502,"status": "php-fpm server is down"}} Attachments

kaushalshriyan December 16, 2022 01:24PM

Re: Upstream service php-fpm is up and running but reports {"errors": {"status_code": 502,"status": "php-fpm server is down"}}

Maxim Dounin December 16, 2022 05:20PM

Re: Upstream service php-fpm is up and running but reports {"errors": {"status_code": 502,"status": "php-fpm server is down"}}

Maxim Dounin December 21, 2022 08:36PM

Re: Upstream service php-fpm is up and running but reports {"errors": {"status_code": 502,"status": "php-fpm server is down"}} Attachments

kaushalshriyan January 04, 2023 12:24PM

Re: Upstream service php-fpm is up and running but reports {"errors": {"status_code": 502,"status": "php-fpm server is down"}}

kaushalshriyan January 05, 2023 11:46AM

Re: Upstream service php-fpm is up and running but reports {"errors": {"status_code": 502,"status": "php-fpm server is down"}}

Francis Daly January 06, 2023 04:26PM

Re: Upstream service php-fpm is up and running but reports {"errors": {"status_code": 502,"status": "php-fpm server is down"}}

kaushalshriyan January 06, 2023 10:00PM

Re: Upstream service php-fpm is up and running but reports {"errors": {"status_code": 502,"status": "php-fpm server is down"}}

Dan Swaney January 07, 2023 12:10PM

Re: Upstream service php-fpm is up and running but reports {"errors": {"status_code": 502,"status": "php-fpm server is down"}}

Francis Daly January 09, 2023 04:24AM

Re: Upstream service php-fpm is up and running but reports {"errors": {"status_code": 502,"status": "php-fpm server is down"}}

Dan Swaney January 05, 2023 01:48PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 95
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready