Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Solved: nginx Bad Gateway after idle
#11
(08-23-2023, 09:01 AM)demian.smith Wrote: ...

@TheOldPresbyope
Thanks for the pointer to the nginx log, i get a lot of this:

Code:
2023/08/23 09:51:34 [error] 546#546: *84994 connect() to unix:/run/php/php7.4-fpm.sock failed (11: Resource temporarily unavailable) while connecting to upstream, client: 192.168.0.207, server: , request: "GET /engine-mpd.php?state=reconnect&_=1692777094581 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.4-fpm.sock:", host: "192.168.0.123", referrer: "http://192.168.0.123/"

Not sure what could be using up resources, this pi is doing nothing but moode ¯\_(ツ)_/¯
I'll google around for that error a bit, but maybe someone has experienced something similar already.

This is not inconsistent with my conjecture. This is the overarching "FastCGI Process Manager". Looking at your original post, I see

Code:
  ~                                      ✘ INT  23s rpi@rpi  10:45:42 AM
╰─❯ systemctl status php7.4-fpm
● php7.4-fpm.service - The PHP 7.4 FastCGI Process Manager
   Loaded: loaded (/lib/systemd/system/php7.4-fpm.service; enabled; vendor pr>
   Active: active (running) since Wed 2023-08-09 10:06:34 CEST; 24h ago
     Docs: man:php-fpm7.4(8)
 Main PID: 497 (php-fpm7.4)
   Status: "Processes active: 64, idle: 0, Requests: 1852, slow: 0, Traffic: >
    Tasks: 65 (limit: 2137)
      CPU: 4min 4.210s
   CGroup: /system.slice/php7.4-fpm.service
           ├─  423 php-fpm: pool www
           ├─  437 php-fpm: pool www
           ├─  497 php-fpm: master process (/etc/php/7.4/fpm/php-fpm.conf)
           ├─  568 php-fpm: pool www
    ...


When I look at moOde 8.3.5 running on an RPi4B here, I see this service is managing far fewer processes


Code:
● php7.4-fpm.service - The PHP 7.4 FastCGI Process Manager
    Loaded: loaded (/lib/systemd/system/php7.4-fpm.service; enabled; vendor pr>
    Active: active (running) since Tue 2023-08-22 17:32:21 EDT; 21h ago
      Docs: man:php-fpm7.4(8)
  Main PID: 467 (php-fpm7.4)
    Status: "Processes active: 13, idle: 3, Requests: 250, slow: 0, Traffic: 0>
     Tasks: 17 (limit: 2137)
       CPU: 6.209s
    CGroup: /system.slice/php7.4-fpm.service
            ├─   467 php-fpm: master process (/etc/php/7.4/fpm/php-fpm.conf)
            ├─   546 php-fpm: pool www
            ├─   547 php-fpm: pool www
            ├─  3999 php-fpm: pool www
    ...

I wonder why you have 5 times as many processes running (even if this is well below the 2137 limit)?

Regards,
Kent
Reply


Messages In This Thread
nginx Bad Gateway after idle - by demian.smith - 08-10-2023, 08:53 AM
RE: nginx Bad Gateway after idle - by Tim Curtis - 08-10-2023, 12:55 PM
RE: nginx Bad Gateway after idle - by Tim Curtis - 08-16-2023, 10:42 AM
RE: nginx Bad Gateway after idle - by TheOldPresbyope - 08-23-2023, 07:19 PM
RE: nginx Bad Gateway after idle - by the_bertrum - 08-16-2023, 03:52 PM
RE: nginx Bad Gateway after idle - by DRONE7 - 08-16-2023, 08:55 PM
RE: nginx Bad Gateway after idle - by the_bertrum - 08-23-2023, 01:24 PM
RE: nginx Bad Gateway after idle - by Nutul - 11-23-2023, 10:05 AM
RE: nginx Bad Gateway after idle - by Nutul - 11-23-2023, 06:12 PM
RE: nginx Bad Gateway after idle - by the_bertrum - 11-24-2023, 10:45 AM
RE: nginx Bad Gateway after idle - by fdealexa - 11-25-2023, 12:04 AM
ginx Bad Gateway after idle - by demian.smith - 12-07-2023, 12:32 PM

Forum Jump: