M
M
Mark Rosenthal2014-10-29 19:23:56
PHP
Mark Rosenthal, 2014-10-29 19:23:56

How to check the causes of 502 errors?

Hey!
From time to time the server crashes with a 502 error
. How can I understand why?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
K
Konstantin Andreevich, 2014-10-29
@reffy

View log. Or too much load on the server. At least look where the last user accessed, from here you can already think where the load is coming from.

I
Igor, 2014-10-29
@merryjane

And what is a backend?
This means problems with the backend. If it is apache\php-fpm, then you need to look at the logs, the process may have crashed, the database was blunt or was inaccessible, there was not enough RAM or time to execute.

K
Konstantin, 2014-10-31
@unity_ultra_hardcore

By the way, the php-fpm worker's segfault may also be to blame. For example, in the case of infinite recursion. In this case, in the logs of neither php-fpm nor your web server, you will not be able to find anything indicating an error, it will be something like:
You will have to look for the details of such an error in the core-dump (if their saving is provided and configured in advance in the OS), but this process is not very simple and requires some preparation.
Probably, it is easier to reproduce this error on the stand and try to localize it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question