• 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 Nginx error 504 Gateway Time-out

WhiteTiger

Basic Pleskian
I have installed OSTickets and am configuring the mail settings.
If I save them with SMTP disable, I have no errors.
If instead I save them with SMTP enabled and its settings, then I get the error "504 Gateway Time-out"
In the SMTP settings I just put the mail domain (domain.tld), port 465, username and password.
In the log I find this messages
Code:
2021-02-02 18:40:18    Access    MyIP    200    GET /support/scp/emails.php HTTP/2.0    https://mydomain.tld/support/scp/emails.php    Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.104 Safari/537.36    3.16 K    nginx SSL/TLS access
2021-02-02 18:40:23    Access    MyIP   200    GET /support/scp/emails.php?id=1&_pjax=%23pjax-container HTTP/2.0    https://mydomain.tld/support/scp/emails.php    Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.104 Safari/537.36    2.69 K    nginx SSL/TLS access
2021-02-02 18:41:43    Error    MyIP    504    POST /support/scp/emails.php?id=1 HTTP/2.0    https://mydomain.tld/support/scp/emails.php?id=1    Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.104 Safari/537.36    562    nginx SSL/TLS access
2021-02-02 18:41:43    Error    MyIP        38686#0: *3853 upstream timed out (110: Connection timed out) while reading response header from upstream                nginx error
38686#0: *3853 upstream timed out (110: Connection timed out) while reading response header from upstream

==== UPDATE
I replaced the SMTP settings.
Instead of using the domain SMTP on Plesk I used that of a GMail account.
The configuration did not generate the TimeOut and then the mail was delivered without problems.
So, the problem is only when I refer to the SMTP configuration of the account on Plesk
 
Last edited:
Maybe the SMTP access credentials that you have supplied are incorrect so that a script is waiting too long for a response from the SMTP server?
 
No, it is certainly not a problem of incorrect credentials because the Webmail works.
I tried to install osTicket on another server without Nginx and only Apache2, but always to read the folders managed by Plesk.
Now I no longer have the 504 error, but it still doesn't accept the credentials.
 
Last edited:
Back
Top