Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Web Server
  • Search

Php-fpm crashes every day at 2:00 PM, 502 bad gateway Topic is solved

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
8 posts • Page 1 of 1
2des
Posts: 5
Joined: Fri Feb 23, 2018 1:22 am

Os: CentOS 5x
Web: nginx + php-fpm
Php-fpm crashes every day at 2:00 PM, 502 bad gateway
  • Quote

Post by 2des » Fri Feb 23, 2018 1:35 am

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.
Top

mehargags
Support team
Posts: 1096
Joined: Sat Sep 06, 2014 9:58 pm
Contact:
Contact mehargags
Website Skype

Os: Debian 8x
Web: apache + nginx
Re: Php-fpm crashes every day at 2:00 PM, 502 bad gateway
  • Quote

Post by mehargags » Fri Feb 23, 2018 9:49 am

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:

Code: Select all

for user in $(cut -f1 -d: /etc/passwd); do crontab -u $user -l; done
Top

2des
Posts: 5
Joined: Fri Feb 23, 2018 1:22 am

Os: CentOS 5x
Web: nginx + php-fpm
Re: Php-fpm crashes every day at 2:00 PM, 502 bad gateway
  • Quote

Post by 2des » Fri Feb 23, 2018 3:12 pm

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.
Top

mehargags
Support team
Posts: 1096
Joined: Sat Sep 06, 2014 9:58 pm
Contact:
Contact mehargags
Website Skype

Os: Debian 8x
Web: apache + nginx
Re: Php-fpm crashes every day at 2:00 PM, 502 bad gateway
  • Quote

Post by mehargags » Sat Feb 24, 2018 8:01 am

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

Code: Select all

> /var/log/php-fpm/error.log
> /domain/xxxxx.error.log 
Then tail both of them in two separate sessions

Code: Select all

tail -f /var/log/php-fpm/error.log
tail -f  /domain/xxxxx.error.log 
Watch and observe when they error out.
Top

2des
Posts: 5
Joined: Fri Feb 23, 2018 1:22 am

Os: CentOS 5x
Web: nginx + php-fpm
Re: Php-fpm crashes every day at 2:00 PM, 502 bad gateway
  • Quote

Post by 2des » Sat Feb 24, 2018 9:12 am

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.
Top

2des
Posts: 5
Joined: Fri Feb 23, 2018 1:22 am

Os: CentOS 5x
Web: nginx + php-fpm
Re: Php-fpm crashes every day at 2:00 PM, 502 bad gateway
  • Quote

Post by 2des » Sun Feb 25, 2018 3:52 pm

Hello,

i have updated the bin folder from
https://github.com/serghey-rodin/vesta

So far so good.
Top

mehargags
Support team
Posts: 1096
Joined: Sat Sep 06, 2014 9:58 pm
Contact:
Contact mehargags
Website Skype

Os: Debian 8x
Web: apache + nginx
Re: Php-fpm crashes every day at 2:00 PM, 502 bad gateway
  • Quote

Post by mehargags » Sun Feb 25, 2018 4:32 pm

looks like a very strange bug... but I'm glad you managed to fix it.
Top

2des
Posts: 5
Joined: Fri Feb 23, 2018 1:22 am

Os: CentOS 5x
Web: nginx + php-fpm
Re: Php-fpm crashes every day at 2:00 PM, 502 bad gateway
  • Quote

Post by 2des » Tue Feb 27, 2018 8:09 am

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.
Top


Post Reply
  • Print view

8 posts • Page 1 of 1

Return to “Web Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password