• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

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