We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on v1 candidate and expect to engage more with the community over the coming months. We are committed to open source, and we encourage contributors to help us build the future of Vesta.
Php-fpm crashes every day at 2:00 PM, 502 bad gateway Topic is solved
Php-fpm crashes every day at 2:00 PM, 502 bad gateway
Hello,
i have an annoying problem: the Php-fpm crashes every day at 2:00 PM.
website and vesta panel: 502 bad gateway, after: service vesta restart and service php-fpm restart everything comes back to normal, until 2:00 PM.
Only vesta default cron jobs are added. I have looked all the logs, many times, found nothing suspicious.
Today i have resowed awstat (yum remove awstats), newer used.
Please give me an advice where to start.
Thank you.
i have an annoying problem: the Php-fpm crashes every day at 2:00 PM.
website and vesta panel: 502 bad gateway, after: service vesta restart and service php-fpm restart everything comes back to normal, until 2:00 PM.
Only vesta default cron jobs are added. I have looked all the logs, many times, found nothing suspicious.
Today i have resowed awstat (yum remove awstats), newer used.
Please give me an advice where to start.
Thank you.
-
- Support team
- Posts: 1096
- Joined: Sat Sep 06, 2014 9:58 pm
- Contact:
- Os: Debian 8x
- Web: apache + nginx
Re: Php-fpm crashes every day at 2:00 PM, 502 bad gateway
check you logs for the specific time... logs are your best friend...
Paste the log entries here for us to review... from FPM and Nginx
Also check if you have any specific crons running near that time, may be it is leading to the crash. This command will list cron jobs from all users, run it as root:
Paste the log entries here for us to review... from FPM and Nginx
Also check if you have any specific crons running near that time, may be it is leading to the crash. This command will list cron jobs from all users, run it as root:
Code: Select all
for user in $(cut -f1 -d: /etc/passwd); do crontab -u $user -l; done
Re: Php-fpm crashes every day at 2:00 PM, 502 bad gateway
Thank you for your quick reply.
[root@nginx]# for user in $(cut -f1 -d: /etc/passwd); do crontab -u $user -l; done
no crontab for root
no crontab for bin
no crontab for daemon
no crontab for adm
no crontab for lp
no crontab for sync
no crontab for shutdown
no crontab for halt
no crontab for mail
no crontab for uucp
no crontab for operator
no crontab for games
no crontab for gopher
no crontab for ftp
no crontab for nobody
no crontab for vcsa
no crontab for saslauth
no crontab for mailnull
no crontab for smmsp
no crontab for named
no crontab for apache
no crontab for sshd
no crontab for tcpdump
no crontab for rpc
no crontab for nscd
no crontab for dbus
no crontab for ntp
no crontab for mysql
no crontab for webalizer
no crontab for nginx
no crontab for backup
MAILTO=[email protected]
CONTENT_TYPE="text/plain; charset=utf-8"
15 02 * * * sudo /usr/local/vesta/bin/v-update-sys-queue disk
10 00 * * * sudo /usr/local/vesta/bin/v-update-sys-queue traffic
30 03 * * * sudo /usr/local/vesta/bin/v-update-sys-queue webstats
*/5 * * * * sudo /usr/local/vesta/bin/v-update-sys-queue backup
10 05 * * * sudo /usr/local/vesta/bin/v-backup-users
20 00 * * * sudo /usr/local/vesta/bin/v-update-user-stats
*/5 * * * * sudo /usr/local/vesta/bin/v-update-sys-rrd
41 2 * * * sudo /usr/local/vesta/bin/v-update-letsencrypt-ssl
no crontab for redis
The logs files
/var/log/nginx/error.log empty.
/domain/xxxxx.error.log -
2018/02/23 02:10:18 [error] 10025#10025: *40885 connect() failed (111: Connection refused) while connecting to upstream, client: XXX.XXX
server: XXX.com, request: "GET /
and
/var/log/php-fpm/error.log
[23-Feb-2018 02:13:43] NOTICE: fpm is running, pid 11724
[23-Feb-2018 02:13:43] NOTICE: ready to handle connections
Here i have restartdet the php-fpm and vesta service.
Thank you.
BEst regards.
[root@nginx]# for user in $(cut -f1 -d: /etc/passwd); do crontab -u $user -l; done
no crontab for root
no crontab for bin
no crontab for daemon
no crontab for adm
no crontab for lp
no crontab for sync
no crontab for shutdown
no crontab for halt
no crontab for mail
no crontab for uucp
no crontab for operator
no crontab for games
no crontab for gopher
no crontab for ftp
no crontab for nobody
no crontab for vcsa
no crontab for saslauth
no crontab for mailnull
no crontab for smmsp
no crontab for named
no crontab for apache
no crontab for sshd
no crontab for tcpdump
no crontab for rpc
no crontab for nscd
no crontab for dbus
no crontab for ntp
no crontab for mysql
no crontab for webalizer
no crontab for nginx
no crontab for backup
MAILTO=[email protected]
CONTENT_TYPE="text/plain; charset=utf-8"
15 02 * * * sudo /usr/local/vesta/bin/v-update-sys-queue disk
10 00 * * * sudo /usr/local/vesta/bin/v-update-sys-queue traffic
30 03 * * * sudo /usr/local/vesta/bin/v-update-sys-queue webstats
*/5 * * * * sudo /usr/local/vesta/bin/v-update-sys-queue backup
10 05 * * * sudo /usr/local/vesta/bin/v-backup-users
20 00 * * * sudo /usr/local/vesta/bin/v-update-user-stats
*/5 * * * * sudo /usr/local/vesta/bin/v-update-sys-rrd
41 2 * * * sudo /usr/local/vesta/bin/v-update-letsencrypt-ssl
no crontab for redis
The logs files
/var/log/nginx/error.log empty.
/domain/xxxxx.error.log -
2018/02/23 02:10:18 [error] 10025#10025: *40885 connect() failed (111: Connection refused) while connecting to upstream, client: XXX.XXX
server: XXX.com, request: "GET /
and
/var/log/php-fpm/error.log
[23-Feb-2018 02:13:43] NOTICE: fpm is running, pid 11724
[23-Feb-2018 02:13:43] NOTICE: ready to handle connections
Here i have restartdet the php-fpm and vesta service.
Thank you.
BEst regards.
-
- Support team
- Posts: 1096
- Joined: Sat Sep 06, 2014 9:58 pm
- Contact:
- Os: Debian 8x
- Web: apache + nginx
Re: Php-fpm crashes every day at 2:00 PM, 502 bad gateway
how many sites you have on this server?
If you know the exact time, login to your server 5 mins before through SSH and
clean log to start fresh
Then tail both of them in two separate sessions
Watch and observe when they error out.
If you know the exact time, login to your server 5 mins before through SSH and
clean log to start fresh
Code: Select all
> /var/log/php-fpm/error.log
> /domain/xxxxx.error.log
Code: Select all
tail -f /var/log/php-fpm/error.log
tail -f /domain/xxxxx.error.log
Re: Php-fpm crashes every day at 2:00 PM, 502 bad gateway
Hello,
first of all thank you for helping me, i really appreciate it.
The problem is related to Version 0.9.8-19, i have installed on a fresh one on a new droplet. Te problem exist, 502 bad gateway at 2:00 PM.
[root@XXX bin]# service php-fpm restart
Stopping php-fpm: [FAILED]
Starting php-fpm: [ OK ]
[root@XXX bin]# service vesta restart
Stopping vesta-nginx: [ OK ]
Stopping vesta-php: [FAILED]
Starting vesta-nginx:
Starting vesta-php: [ OK ]
Log files are empty.
Today i fill suspend all vesta crom job, i will come back tomorrow morning :-))
The problem start when upgraded Vesta from Version 0.9.8-17 to Version 0.9.8-18, to day later i have upgraded to Version 0.9.8-19. Backup ware disable from the beginning.
I there a way to come back to Version 0.9.8-17 on a production server?
Thank you again for your time and support.
Best regards.
first of all thank you for helping me, i really appreciate it.
The problem is related to Version 0.9.8-19, i have installed on a fresh one on a new droplet. Te problem exist, 502 bad gateway at 2:00 PM.
[root@XXX bin]# service php-fpm restart
Stopping php-fpm: [FAILED]
Starting php-fpm: [ OK ]
[root@XXX bin]# service vesta restart
Stopping vesta-nginx: [ OK ]
Stopping vesta-php: [FAILED]
Starting vesta-nginx:
Starting vesta-php: [ OK ]
Log files are empty.
Today i fill suspend all vesta crom job, i will come back tomorrow morning :-))
The problem start when upgraded Vesta from Version 0.9.8-17 to Version 0.9.8-18, to day later i have upgraded to Version 0.9.8-19. Backup ware disable from the beginning.
I there a way to come back to Version 0.9.8-17 on a production server?
Thank you again for your time and support.
Best regards.
-
- Support team
- Posts: 1096
- Joined: Sat Sep 06, 2014 9:58 pm
- Contact:
- Os: Debian 8x
- Web: apache + nginx
Re: Php-fpm crashes every day at 2:00 PM, 502 bad gateway
looks like a very strange bug... but I'm glad you managed to fix it.
Re: Php-fpm crashes every day at 2:00 PM, 502 bad gateway
Hello,
the problem stile exist. I have stopped the v-update-sys-rrd Chron job, now the server isen`t crashing.
Iths Ok to disable the v-update-sys-rrd?
Thank you.
the problem stile exist. I have stopped the v-update-sys-rrd Chron job, now the server isen`t crashing.
Iths Ok to disable the v-update-sys-rrd?
Thank you.