Website experiencing 503 errors (Ubuntu + nginx)

Hello,

my website is going into 503 errors from time to time with no reasons. When I check error logs it says cannot connect to upstream but before there are no errors + when I check access logs everything is OK doesnt look like ddos or anything.

When I change php versions to 7.1 and back to 7.0 the web is running ok.

Status: 
Active

Comments

It also wanted to restart itself but failed: Can't exec "/usr/bin/php5-cgi": No such file or directory at /usr/bin/php-loop.pl line 24.

I also found this: https://stackoverflow.com/questions/25098029/connect-to-unix-var-run-php...

What do you think about that solution to change sockets to IP ?

I am really out of ideas for this problem. It happens only on this one web, other websites were running ok and on that hour there were only 60 people there so it really happened out of the blue.

I could give you ssh keys if you need them but I really need to do something about it cos we are losing customers and therefor lot of money.

Regarding that error about php5-cgi .. are the PHP 5 packages missing on your system?

Shouldnt be, well tbh we were playing with the php on the system cos we wanted to run php by fpm on version 7 but it would only run with version 5.5. Also is there any way of turning on error logs of phpfpm to see what caused the problem? Cos now we are just blind and we dont know what caused it. The server was running 1 month w/o problems. Even during black friday where there were 3k visitors everything was ok. Then I updated the packages which you released and within few days all websites crashed.

Rly dont know whats going on