Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nginx crashing regularly #495

Closed
ryus666 opened this issue Mar 23, 2017 · 10 comments
Closed

Nginx crashing regularly #495

ryus666 opened this issue Mar 23, 2017 · 10 comments

Comments

@ryus666
Copy link

ryus666 commented Mar 23, 2017

Hi,

I am running Engintron on a cpanel server with just 1 website. For some reason, nginx keeps crashing every other day and the site becomes unreachable till I go and restart nginx. When restarting, I get :
Sropping Nginx : (Failed)
Starting Nginx : OK

This is happening way too often now. I am using all default settings for Engintron + with FCGI handler (EA4). Latest version of WHM and Engintron. What could be the reason ? Here are some error log entries :

2017/03/23 09:20:35 [error] 28314#28314: *223036 upstream prematurely closed connection while reading upstream, client: CLIENT_IP, server: localhost, request: "GET /url-to-a-site-article/ HTTP/1.1", upstream: "http://SERVER_IP:8080/url-to-a-site-article/", host: "WEBSITE NAME"

Any ideas what is going on ?

@KayCaesar
Copy link

Same here!

@jcatello
Copy link

jcatello commented Mar 23, 2017

Its from cPanel updates, after it installs all the new RPM's it restarts Apache but not Nginx, not sure why chkservd takes so long to restart Nginx, but you may want to go into Tweak Settings and set the interval that chksrvd checks from 300 to 60

But in the long run, I think there needs to be some kind of hook or something we can use to restart Nginx everytime cPanel restarts Apache after the updates?

To add, every site that goes down, it lasts roughly 15 - 20 minutes each time.

@ryus666
Copy link
Author

ryus666 commented Mar 23, 2017

Exactly. It used to get started on its own before. But not happening now for some reason. Probably the last couple of updates to the plugin changed something ?

@jcatello
Copy link

jcatello commented Mar 23, 2017

Its weird that cPanel knows to kill off nginx:

[2017-03-23 02:57:19 -0500]      [8074] Aligning modsec config to Whostmgr
[2017-03-23 02:57:19 -0500]      [8074] Waiting for “httpd” to stop ……
**[2017-03-23 02:57:19 -0500]      [8074] Gracefully Terminating processes: nginx           with pids 9852 and owner root....**
[2017-03-23 02:57:19 -0500]      [8074] ...waited 1 second(s) for 1 process(es) to terminate....Done
[2017-03-23 02:57:19 -0500]      [8074] …finished.
[2017-03-23 02:57:19 -0500]      [8074] Waiting for “httpd” to start …
[2017-03-23 02:57:19 -0500]      [8074] …
[2017-03-23 02:57:19 -0500]      [8074] waiting for “httpd” to initialize ………finished.

@johnknossis
Copy link

I have the same issues. I'd greatly appreciate if someone could share a possible solution for this problem. The only thing we've done so far is changing the way chkservd checks for nginx and force an update every 5 minutes if it detects that it's down. But that's clearly not a fix for the actual problem.

@fevangelou
Copy link
Member

@jcatello It's probably identifying which service is hooked on port 80 and then it kills Nginx as you mentioned.

@ALL I don't know why this happens to a few folks. To be honest, I manage several cPanel servers with external monitoring on specific domains and I've never had such an issue. Maybe this occurs on cPanel servers with a specific setup (I notice Mod Security on @jcatello 's log above which I don't use on the setups I do). Since I can't verify on my end, I'd appreciate it if you can provide additional evidence that could help troubleshoot this issue you're facing.

@ryus666
Copy link
Author

ryus666 commented Mar 28, 2017

I am using a normal setup. WHM + CSF + Engintron (no mod security or anything else).

@fevangelou
Copy link
Member

@ryus666 Seems like a cPanel bug with EA4's auto-updater. See here: #496

@jcatello
Copy link

jcatello commented Apr 7, 2017

They ever say anything about the bug, just had it happen on 2 servers within the past couple hours.

@fevangelou
Copy link
Member

Same here, however it only occurs at night when cPanel update runs and for a couple of mins only until tailwatchd restarts Nginx & Apache.

No word from cPanel though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants