• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • 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.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Question 502 Bad Gateway nginx error for all the domains everytime a domain change

Most common reasons for 502 are;
1.Low limits inside PHP configuration or other PHP misconfiguration
2.Low limits inside Nginx configuration(http block)
3.APC can couse issue also
4.I had issue with php5-fpm.sock once
 
Hi,

Thank you for your reply.

This happens when creating/modifying the subscriptions and only last for 1 sec. I'm trying to find a solution for this issue.
 
Hi,

Thank you for your reply.

This happens when creating/modifying the subscriptions and only last for 1 sec. I'm trying to find a solution for this issue.
If your site is on same plesk server where your create/modify subscription try to to change server restart interval...because when new account/subscription is created plesk restart service and your site can't finish request,set it +few seconds.This is the case for example if Blesta(and probably many other but I know for Blesta since one client had this case) is installed on same server where accounts are created.
 
Last edited:
Thank you!.

I have set Apache Restart Intervals for 60sec.

also followed,

https://kb.plesk.com/en/112020

Is there any other solution i can try?

Can we change the

Apache Gracefully Restart

to

Apache Reload?

is the the same thing?
Well in your case problem was probably same as my client had with Blesta...every time you add new account/subscription Plesk restart web server immediately and since your script depend on web server request is not finished....in Blesta case it happen in same time blesta recive response from Plesk,as result on Plesk side everything was finished successfully but account is not created in Blesta .Solution was to just move restart interval few seconds in advance.So I think for you it is not important how Apache is restarted because gracefull restart/start/stop/graceful stop is related to which signals to the running processes are sent and to whom..in your case it is only important that you make sure it doesn't happen till request is finished.
And I'm not sure is 60 second is good number,you still want apache is restarted as soon as posible ...5-6 seconds is just fine but if you want 60 you can keep it but changes you made will not apply till apache is restarted
 
Last edited:
Thank you @sanel.

I asked my provider as well.

Since I have done everything we can do for this, their recommendation was perform domain update task in off-peak time.

Wish we had a better solution for this.
 
Back
Top