503 Service Unavailable

Started by RadOD, February 15, 2021, 06:08:39 AM

Previous topic - Next topic
For a while I have been getting a 503 Service Unavailable page after a reboot.  A GUI restart with /usr/local/etc/rc.restart_webgui fixed it.  Since it only occurred after a reboot and those didn't happen that often, I didn't put much effort into figuring out what was wrong.  However now I get them all the time.  GUI restart doesn't help.  Restarting all services doesn't help.  Network traffic seems unaffected and SSH still works.  It is only the web GUI than does not work.

I can see a lot of these in lighttpd.log:
Feb 14 22:21:55 home lighttpd[81368]: (gw_backend.c.315) gw-server re-enabled: unix:/tmp/php-fastcgi.socket-1  0 /tmp/php-fastcgi.socket
Feb 14 22:21:55 home lighttpd[81368]: (gw_backend.c.315) gw-server re-enabled: unix:/tmp/php-fastcgi.socket-0  0 /tmp/php-fastcgi.socket
Feb 14 22:21:56 home lighttpd[81368]: (gw_backend.c.238) establishing connection failed: socket: unix:/tmp/php-fastcgi.socket-1: Connection refused
Feb 14 22:21:56 home lighttpd[81368]: (gw_backend.c.238) establishing connection failed: socket: unix:/tmp/php-fastcgi.socket-0: Connection refused
Feb 14 22:21:56 home lighttpd[81368]: (gw_backend.c.970) all handlers for /widgets/widgets/ntp_status.widget.php?updateme=yes on .php are down.


Feb 14 22:21:52 home lighttpd[81368]: (gw_backend.c.315) gw-server re-enabled: unix:/tmp/php-fastcgi.socket-1  0 /tmp/php-fastcgi.socket
Feb 14 22:21:52 home lighttpd[81368]: (gw_backend.c.315) gw-server re-enabled: unix:/tmp/php-fastcgi.socket-0  0 /tmp/php-fastcgi.socket
Feb 14 22:21:53 home lighttpd[81368]: (gw_backend.c.238) establishing connection failed: socket: unix:/tmp/php-fastcgi.socket-1: Connection refused
Feb 14 22:21:53 home lighttpd[81368]: (gw_backend.c.238) establishing connection failed: socket: unix:/tmp/php-fastcgi.socket-0: Connection refused
Feb 14 22:21:53 home lighttpd[81368]: (gw_backend.c.970) all handlers for /api/api.php?limit=100 on .php are down.


php-fpm.log says only:
[14-Feb-2021 22:01:30] NOTICE: fpm is running, pid 41964
[14-Feb-2021 22:01:30] NOTICE: ready to handle connections


Something isn't configured right, but where can I look for the problem?

If using PHP-FPM, the PHP-FPM service is started independently from lighttpd.

Check that your lighttpd config is not trying to start the PHP backends, too.  The lighttpd.conf (or include file) should not include a "bin-path" in the configuration for the PHP-FPM sockets, since on your system you want to configure lighttpd to connect to the PHP-FPM sockets, but you do not want lighttpd to attempt to create those sockets.

Another thing to check is that the user account under which lighttpd is running has permission to access the paths to the unix domain socket.