• Hi, Pleskians! We are running a UX testing of our upcoming product intended for server management and monitoring.
    We would like to invite you to have a call with us and have some fun checking our prototype. The agenda is pretty simple - we bring new design and some scenarios that you need to walk through and succeed. We will be watching and taking insights for further development of the design.
    If you would like to participate, please use this link to book a meeting. We will sent the link to the clickable prototype at the meeting.
  • Our UX team believes in the in the power of direct feedback and would like to invite you to participate in interviews, tests, and surveys.
    To stay in the loop and never miss an opportunity to share your thoughts, please subscribe to our UX research program. If you were previously part of the Plesk UX research program, please re-subscribe to continue receiving our invitations.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

Resolved 502 Bad Gateway on All domains

I've said that ModSecurity was installed but never enabled ^^

I still think this is a plesk issue but they will say it's not that i should look for a system admin. i setup a plesk server on ubuntu for a friend 502 error after a day of running no modsecurity or fail2ban.

i suggest you try centos and see
 
I've installed a new plesk server and the bug still present, when will you fix this critical bug ?
 
I've installed a new plesk server and the bug still present, when will you fix this critical bug ?

Still Ubuntu?

I use centos which is kinda good as the Sites was down for over 6 hours in the Last 20 days.

Try Centos 7.

This is a Bug, if they have taken me serious when i reported this in 12.5 Last year a solution would be available now
 
Yes, it's still an ubuntu server :/

I don't like Centos-Redhat-Fedora :(

And of course, I can't open a ticket because my licence come from a provider..
Very disappointed to pay for a partially functional software :(
 
Yes, it's still an ubuntu server :/

I don't like Centos-Redhat-Fedora :(

And of course, I can't open a ticket because my licence come from a provider..
Very disappointed to pay for a partially functional software :(

You can contact support, i was able to contact them with a trial license.

I don't like centos either but so long as the site is online that is fine.

My friend's Ubuntu server is yet to shut down with 502 error.

I increased the restart interval, and then change the logrotate file but with Mpm_Event
 
Even that you both resist on stating, that this is a Plesk-related bug, you really should consider to investigate your issue a bit better:

To make this clear:

Investigating your provided informations at this thread, it is obvious, that the daily logrotation configurations still contain an apache - RELOAD - process, instead of an suggested apache - RESTART - process.

=> https://talk.plesk.com/search/search?&keywords="apache"+"logrotate"

... leads us for example to: => #4 / => #5 / => #17 / ...
AND the already mentioned KB - article can be found at:

=> Apache crashes on reload: seg fault or similar nasty error detected in the parent process ( KB - article 128431 )



With all these informations, you should as well be able to notice, that "apache" itself is not at all a Plesk component and the mentioned apache - bug with the result of possible segfaults are as well not Plesk-related. Pls. see as well the mentioned links at => #17 for example!



The recommendation to solve your issue is still the same:
  1. Pls. change your apache version from "mpm_event" to "mpm_prefork". ( Home > Tools & Settings > Apache Web Server )
  2. Pls. set the "Apache restart interval" to a higher value, than the standard "0" seconds. ( Home > Tools & Settings > Apache Web Server )
  3. Pls. change EVERY "apache2 reload" - setting to a "apache2 restart" - setting at your depending logrotation definitions under "/etc/logrotate.d/".
    Code:
    EXAMPLE ( old ):
    
    ...
        postrotate
                    if /etc/init.d/apache2 status > /dev/null ; then \
                        /etc/init.d/apache2 reload > /dev/null; \
                    fi;
    ...
    
    
    EXAMPLE ( new ):
    
    ...
        postrotate
                    if /etc/init.d/apache2 status > /dev/null ; then \
                        /etc/init.d/apache2 restart > /dev/null; \
                    fi;
    ...


If you still experience issues/errors/problems, after you followed the recommendations, it is essential, that you provide ACTUAL informations from your log - files and don't forget your current operating system, your used Plesk version ( incl. MU ) and consider to include as well informations about your changes, that you have done to solve the issue! It will help no one ( especially not yourself! ), if you waste time with "chatting" about your issue and it will help no one as well, if you try for the umpteenth time, to make Plesk responsible for the issue. ;)
 
Even that you both resist on stating, that this is a Plesk-related bug, you really should consider to investigate your issue a bit better:

To make this clear:

Investigating your provided informations at this thread, it is obvious, that the daily logrotation configurations still contain an apache - RELOAD - process, instead of an suggested apache - RESTART - process.

=> https://talk.plesk.com/search/search?&keywords="apache"+"logrotate"

... leads us for example to: => #4 / => #5 / => #17 / ...
AND the already mentioned KB - article can be found at:

=> Apache crashes on reload: seg fault or similar nasty error detected in the parent process ( KB - article 128431 )


With all these informations, you should as well be able to notice, that "apache" itself is not at all a Plesk component and the mentioned apache - bug with the result of possible segfaults are as well not Plesk-related. Pls. see as well the mentioned links at => #17 for example!



The recommendation to solve your issue is still the same:
  1. Pls. change your apache version from "mpm_event" to "mpm_prefork". ( Home > Tools & Settings > Apache Web Server )
  2. Pls. set the "Apache restart interval" to a higher value, than the standard "0" seconds. ( Home > Tools & Settings > Apache Web Server )
  3. Pls. change EVERY "apache2 reload" - setting to a "apache2 restart" - setting at your depending logrotation definitions under "/etc/logrotate.d/".
    Code:
    EXAMPLE ( old ):
    
    ...
        postrotate
                    if /etc/init.d/apache2 status > /dev/null ; then \
                        /etc/init.d/apache2 reload > /dev/null; \
                    fi;
    ...
    
    
    EXAMPLE ( new ):
    
    ...
        postrotate
                    if /etc/init.d/apache2 status > /dev/null ; then \
                        /etc/init.d/apache2 restart > /dev/null; \
                    fi;
    ...


If you still experience issues/errors/problems, after you followed the recommendations, it is essential, that you provide ACTUAL informations from your log - files and don't forget your current operating system, your used Plesk version ( incl. MU ) and consider to include as well informations about your changes, that you have done to solve the issue! It will help no one ( especially not yourself! ), if you waste time with "chatting" about your issue and it will help no one as well, if you try for the umpteenth time, to make Plesk responsible for the issue. ;)

hi I am using a Plesk Onyx panel as a trial version and trying to make a decision to buy Plesk Onyx.

I was having the 502 Bad Gateway issues exactly in the mornings and restart the server and next morning again... and so on...

I have implemented the suggestions in the article you recommended. this one ---> https://kb.plesk.com/128431
a. change event to prefork
b. set apache interval to 50
c. change reload to restart

and sites begin to work without a server restart etc... now I am waiting for the next morning! :)))))))))))))

sorry for my english but according this article it is not recommended to use mpm_event and "WE MUST USE mpm_prefork". Is it right? I mean --> do I missing something?

if so when can we begin to use mpm_event?

thanks
 
Hi Burak Özdemir,


Could you pls. state, what advantages do you expect when using "mpm_event" ? Are you aware, that some apache - modules ( for example "mod_php" ) are not working with "mpm_event"?

Hi, in fact may main focus is not the time we will be able to use mpm_event... :) so to go clear, my main question is:

using mpm_prefork (with other 2 more recommended settings) will resolve the issue, right?

thanks.
 

I had been encountering the issue for a week (I guess). Every morning I was waking up to 502 bad gateway for all domains and their subdomains. I was disabling and and then enabling the domains/subdomains for them to work again.

I am using Plesk Onyx as a trial on two identical servers (for testing purposes). Both have Plesk Firewall, mod_security (with comodo rules) and fail2ban enabled + one has mod_evasive enabled.

the suggestions in the https://talk.plesk.com/threads/502-bad-gateway-on-all-domains.339677/page-3#post-812512 resolved the issue for me. (I also added servers' own IPs to whitelist of fail2ban, additionally. Not sure if this is also a configuration for the issue to be solved.

thanks.
 
Back
Top