A
A
Alexander Savenko2015-12-23 09:59:29
PHP
Alexander Savenko, 2015-12-23 09:59:29

How to fix 502 Bad Gateway error?

Hello!
Sites stop working once a week. In the browser, Nginx displays 502 Bad Gateway, in the logs:
948#0: *398833 connect() failed (111: Connection refused) while connecting to upstream, client: 111.11.11.11, server: site.ru, request: "GET /private /auction_view/?id=55b8d3cc7d6ece71608b456b HTTP/1.1", upstream: " https://111.1.111.11:7081/private/auction_view/?id... ", host: "site.ru"
Does not help restart nginx, apache2, php5-fpm. Just reboot the server

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexey Romanenko, 2015-12-23
@slimus

Check apache+php-fpm logs

A
Alexey Timofeev, 2015-12-23
@alextimofeyev7

nginx waits for a response from upstream and does not receive it, falls off by timeout as a result. If you have an Apache upstream, see what hangs it.

A
alegzz, 2015-12-23
@alegzz

what about nginx? do you really need to access the backend at an external address and use https?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question