Gateway Timeout

Nikhil Pant 0 Reputation points
2024-12-29T12:42:30+00:00

Hi Community,

I have two vms one is hosting my application instance and other vm is hosting my database postgresql, once I deploy the application I do get the response for upto 3-4 minutes after that I keep getting gateway timeout even though my application and db are up and running, the application seems to be working fine when I have connected localhost to the azure vm which hosts the db, there is no issue over there.

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
8,276 questions
{count} votes

1 answer

Sort by: Most helpful
  1. anashetty 1,955 Reputation points Microsoft Vendor
    2024-12-30T07:31:53.9566667+00:00

    Hi Nikhil Pant,

    Welcome to the Microsoft Q&A Platform! Thank you for asking your question here.

    Is your PostgreSQL, single server or flexible server?
    Since the application is working locally on the Azure VM hosting the database, I think the issue might be the network or connectivity problem.
    Can you check the PostgreSQL logs for errors related to connections or performance issues.
    Run a ping command from the application VM to the database VM to check network connectivity.
    Please check this Are you running into Postgres connection issues on Azure?
    Connection timeout issue on Azure PostgreSQL Single Server
    For more trouble shooting steps, please check Troubleshoot connection issues to Azure Database for PostgreSQL - Single Server
    Troubleshoot connection issues to Azure Database for PostgreSQL - Flexible Server

    If you have any further queries, please do let us know.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.