Troubleshooting Server error responses
When encountering the following server error responses—Bad Gateway (502), Service Unavailable (503), and Gateway Timeout (504)—it typically indicates issues with the server hosting the URL.
Troubleshooting
- Review your server's access logs for the 30 minutes before and after the error occurred.
- Look at the response codes of other requests in the access logs. If they’re also failing (e.g., 502, 503, 504), the server might be overloaded or under maintenance.
- Access the URL using a browser, cURL, or Wget from the machine running the applications manager.
- If the response code returned in browser is 502, 503, 504, then check the URL's server for overload.
- If the response returned in browser is 200, suggesting the issue might be elsewhere.
- Proxy Server Configuration: If your environment requires the use of a proxy server to access the URL, configure the proxy in Applications Manager. Click here to learn how to configure the proxy.
- Bypass Proxy for the URL: If you have configured a proxy in Applications Manager but want to bypass it for the server Host/IP, add the Host/IP under the "Do not use proxy for addresses beginning with" section in the "Configure Proxy" page: Navigate to Settings > Product Settings > Proxy Server Settings.
502: Bad Gateway
The server, while acting as a gateway or proxy, received an invalid response from an upstream server. It could be due to following reasons:
- Upstream server is down or unreachable or overloaded and cannot handle the request, leading to a timeout or malformed response.
- A reverse proxy (e.g., Nginx, HAProxy, or a load balancer) is not configured correctly and cannot communicate properly with the backend servers.
- The proxy server cannot resolve the upstream server's domain name due to DNS misconfigurations or DNS server outages.
Solutions
- Ensure that the upstream server is functioning correctly and reachable.
- Admins can check the name server, firewalls, and DNS settings.
- Admins can also check the error log for further clues. It could be a relay between other servers that suffers glitches in transit.
503: Service Unavailable
A 503 error occurs when the server cannot process the request temporarily. It could have several implications including
- Server is under maintenance.
- An overloaded server due to unexpected traffic surges or attacks, or even a client-side DNS configuration error.
- The server is rejecting requests due to too many incoming requests within a short time.
Solutions
- If the server is under heavy load, consider implementing load balancing or auto scaling.
- Verify if there’s any rate limiting or throttling causing the server to reject incoming requests.
- Ensure the server is not mistakenly configured for maintenance mode or temporary downtime.
- Monitor server resource usage (CPU, Memory, etc.) to identify potential overloads.
504: Gateway Timeout
The server, while acting as a gateway or proxy, did not receive a timely response from the upstream server.
- Upstream server is down or unreachable or overloaded and cannot handle the request, leading to a timeout or malformed response.
- High network delays or poor connectivity between the proxy and upstream server.
Solutions
- Check the load on the upstream server to ensure it is not overwhelmed with requests.
- Check if the upstream server is responding within the timeout period.

In URL monitor edit page, check "If monitor detects error, re-try immediately to verify error" option. This will allow Applications Manager to verify the server error before reporting the error thus avoiding false alerts.
Still facing issues?
If the problem persists, contact our support team along with the following details: A screenshot of the "Add Monitor" page.
Reproduce the issue and share the latest Support Information File (SIF) from Applications Manager, with the "Print all logs" option enabled. To do this, go to Settings > Logging, and choose "Print all logs".
New to ADSelfService Plus?