HTTP 502 - Bad Gateway, only on additional ip-addresses
Hello!
On my Forge server with Ubuntu 16.04.4 LTS I randomly getting HTTP 502 - Bad Gateway errors from Nginx for only the websites that have a additional ip-address. The websites with the default server ip-address are working fine.
It looks like PHP-FPM is crashing. Because after a restart I works just fine. But after a few minutes it's nog working for only the additional ip-addresses.
Does anyone have a solution for fixing this issue?
This is what my etc/network/interfaces file looks like:
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet dhcp
# Website1
auto eth0:1
iface eth0:1 inet static
name website1.com
address xx.xx.xxx.xx
netmask 255.255.255.0
broadcast xx.xx.xxx.255
network xx.xx.xxx.x
iface eth0:1 inet6 static
address xxxx:xxx:xxxx:xx::x
netmask 48
# Website2
auto eth0:2
iface eth0:2 inet static
name website2.com
address xx.xx.xxx.xx
netmask 255.255.255.0
broadcast xx.xx.xxx.255
network xx.xx.xxx.x
iface eth0:2 inet6 static
address xxxx:xxx:xxxx:xx::x
netmask 48
# This is an autoconfigured IPv6 interface
iface eth0 inet6 auto
I prefer glances to monitor process on a linux box. It sounds like you may have to change from using a socket to a port. It's hard to tell without more troubleshooting information. However, glances will give you meaningful data to help with checking for memory or socket problems. You can even run multiple instances per IP.