# 502 Bad Gateway (HTTP Status Codes)

Source: https://www.observeone.com/community/errors/http/502-bad-gateway

[ObserveOne](/)[Features](/#features)[Pricing](/#pricing)[Blog](/blog)[CLI](/cli)[Docs](/docs)

[Sign in](https://app.observeone.com/auth?tab=signin)[Start Free](https://app.observeone.com/auth?tab=signup)

[Error Dictionary](/community/errors)/[HTTP Status Codes](/community/errors/http)/502-bad-gatewaycritical

# 502 Bad Gateway

A proxy or gateway received an invalid response from an upstream server.

## Common Causes

- 1Upstream server crashed or is unreachable
- 2Nginx/Apache misconfigured proxy settings
- 3Upstream server timeout
- 4DNS resolution failure for upstream

## How to Fix

### Increase proxy timeout

# Nginx
location / {
 proxy_pass http://backend;
 proxy_connect_timeout 60s;
 proxy_read_timeout 120s;
 proxy_send_timeout 60s;
}Increase proxy timeouts for slow upstream servers.

## How ObserveOne Helps

ObserveOne monitors upstream health and alerts when gateways start returning 502 errors.

[Start Monitoring Free](https://app.observeone.com/auth?tab=signup)

## Related Errors

[500 Internal Server ErrorThe server encountered an unexpected condition that prevented it from fulfilling the request.](/community/errors/http/500-internal-server-error)[503 Service UnavailableThe server is temporarily unable to handle the request, usually due to maintenance or overload.](/community/errors/http/503-service-unavailable)[504 Gateway TimeoutA gateway or proxy did not receive a timely response from the upstream server.](/community/errors/http/504-gateway-timeout)[400 Bad RequestThe server cannot process the request due to malformed syntax, invalid parameters, or bad encoding.](/community/errors/http/400-bad-request)[401 UnauthorizedThe request requires authentication. The client must provide valid credentials.](/community/errors/http/401-unauthorized)

ObserveOne

Agentic QA and synthetic monitoring built for engineering teams. Plan, generate, and run suites from the web UI. Connect to CI for reliable coverage across critical journeys.

### Product

- [Features](/#features)
- [Pricing](/#pricing)
- [QA Coverage](/qa-coverage)
- [API Monitoring](/api-monitoring)
- [Free Website Check](/free-website-check)

### Developers

- [CLI](/cli)
- [Docs](/docs)
- [For Agents](/agents)
- [Self-host (oo-workers)](/workers)
- [Status Pages](/status)
- [Netlify Extension](https://app.netlify.com/extensions/mzs1lgc3-observeone)

### Resources

- [Blog](/blog)
- [Bug Book](/bug-book)
- [Guides](/community/guides)
- [Tools](/community/tools)
- [Error Dictionary](/community/errors)

### Compare

- [Tool Comparisons](/compare)
- [Tool Alternatives](/alternatives)
- [Best by Category](/best)
- [Search](/search)

© 2026 ObserveOne. All rights reserved.

[About](/about)[Privacy Policy](/privacy)[Terms of Service](/terms)[Affiliates](/affiliates)[Become an Affiliate](/affiliate-terms)
