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

Issue 502 Bad Gateway on Git fetch/deploy via Plesk API

decodernt

New Pleskian
Hello, i am facing a problem with Plesk API when i fetch and deploy from Git on multiple domains. The request is being made from another server (used to do it from the same, but thought that that was causing the 502), i also tried to put inside a single API call multiple fetch/deploy (domains) and single fetch/deploy (domain), but whatever i do, there is always a chance of a mostly one but other times could be more (live) sites (which were updated by the git deploy) showing 502 bad Gateway, so i need to "Apply PHP Settings" in order to recover the sites back to normal.

Also, no matter how much time later you try to visit the site, if you wont reset the php settings (just press apply, to reload), the site wont come back online. So it's not a peek on visitors, or network traffic...

Is this a problem of the API, server, php, nginx...i do not know..anyone could help?

Thank you

The requet for git update is this:

$request = '
<packet>
<extension>';
foreach ($packages as $domain => $domainkey){
$request .= '
<call>
<git>
<fetch>
<domain>'.$domain.'</domain>
<name>'.$domainkey.'</name>
</fetch>
</git>
</call>
<call>
<git>
<deploy>
<domain>'.$domain.'</domain>
<name>'.$domainkey.'</name>
</deploy>
</git>
</call>';
}
$request .= '</extension>
</packet>
';

$response = $this->request($request);
 
Do you happen to have the "Apache graceful restart" option enable in the Apache Web Server Settings of Plesk? If not, enable it and see if it makes any difference.
 
An 502 error means that Nginx cannot communicate with Apache. So you're most likely using Nginx as a reverse proxy, and Apache is still being used a downstream server.

You'll have to look in your domains error log to get the exact error that causes this issue.
 
Back
Top