When form submission is done between 2 VM's in Application gateway it shows 502 error

Viewed 513

I have hosted a site in two VM's and added it in Application Gateway back end pool. We have a form submit which will do DB update and a confirmation page will be shown.

If both the server is up. The changes are updated properly on DB and confirmation page is shown even if the Form Filled from VM1 and submitted to VM2.

Consider the below case. The user comes into the page from VM1 and filling the details. After the VM1 is unavailable. Now when the user submites the code. The page loads and shows 502 proxy error. But the DB update are properly done through VM2. But the confirmation page is not shown.

502 error

1 Answers

The issue was due to the incorrect timeout value set on Health Probe. When your server is down, the requests will be sent to the backend unhealthy server for 4 minutes as the timeout value is too long. Once the timeout value is reduced, the issue is resolved.

Related