Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

NGINX 502 Error Resolves by Restarting CSF?

Discussion in 'General Discussion' started by 1Engineer, May 29, 2017.

Tags:
  1. 1Engineer

    1Engineer Registered

    Joined:
    May 29, 2017
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Russia
    cPanel Access Level:
    Root Administrator
    Hi everyone,

    I have this odd problem I hope someone can help me with [​IMG]

    I recently installed CPNGINX on my server. The problem that I have is every 5-10 minutes or so, some of the websites start to throw 502 error.
    Oddly, the problem resolves as soon as I restart CSF!
    For now, I had to set a cronjob to restart CSF every 2 minutes to avoid this problem. But I know this is an ugly way to get around it.
    I have to mention that the firewall features are all disabled on CPNGINX.
    I'd be happy to know your opinion on the matter.

    Thanks in advance
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,659
    Likes Received:
    1,428
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    I recommend reporting this issue to the developer of the Nginx plugin you are using to determine if it's a known issue and if there's a recommended solution.

    That said, you may want to review /usr/local/apache/logs/error_log when you reproduce the error message to see if you notice any particular output.

    Thank you.
     
  3. 1Engineer

    1Engineer Registered

    Joined:
    May 29, 2017
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Russia
    cPanel Access Level:
    Root Administrator
    Hello,

    Thanks for your reply.
    I have reported this problem to the developer and they tweaked the nginx configuration to solve it but it didn't work. The only thing that seems to fix the problem is restarting CSF (I have to mention that oddly enough, the problem happens even if CSF is not active but anyway, doing a restart on CSF always fixes this)

    Here are some of the errors that i see in my apache error log around that time (To make it more readable, IPs and domains are removed from the log) :

    [proxy_fcgi:error] [pid 663174] [client IP:51373] AH01067: Failed to read FastCGI header, referer:
    [proxy_fcgi:error] [pid 663174] (104)Connection reset by peer: [client IP:51373] AH01075: Error dispatching request to : , referer:
    [proxy_fcgi:error] [pid 663152] [client IP:56844] AH01067: Failed to read FastCGI header, referer:
    [proxy_fcgi:error] [pid 663152] (104)Connection reset by peer: [client IP:56844] AH01075: Error dispatching request to : ,
    [proxy_fcgi:error] [pid 663176] [client IP:52425] AH01067: Failed to read FastCGI header, referer:
    [proxy_fcgi:error] [pid 663176] (104)Connection reset by peer: [client IP:52425] AH01075: Error dispatching request to : , referer:
    [proxy_fcgi:error] [pid 663174] [client IP:51373] AH01067: Failed to read FastCGI header, referer:
    [proxy_fcgi:error] [pid 663152] [client IP6:56844] AH01067: Failed to read FastCGI header, referer:
    [proxy_fcgi:error] [pid 663174] (104)Connection reset by peer: [client IP:51373] AH01075: Error dispatching request to : , referer:
    [proxy_fcgi:error] [pid 663152] (104)Connection reset by peer: [client IP:56844] AH01075: Error dispatching request to : , referer:
    [proxy:error] [pid 663142] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /opt/cpanel/ea-php56/root/usr/var/run/php-fpm/7dd95bd189b1408f3de1411e60838d06a653c126.sock (*) failed
    [proxy_fcgi:error] [pid 663142] [client IP:50122] AH01079: failed to make connection to backend: httpd-UDS, referer:
    [proxy:error] [pid 663142] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /opt/cpanel/ea-php56/root/usr/var/run/php-fpm/7dd95bd189b1408f3de1411e60838d06a653c126.sock (*) failed
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,659
    Likes Received:
    1,428
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Feel free to open a support ticket using the link in my signature if you'd like us to take a closer look. You can post the ticket number here and we will update this thread with the outcome.

    Thank you.
     
Loading...

Share This Page