R
R
Rockman2015-05-17 19:22:25
PHP
Rockman, 2015-05-17 19:22:25

Why does the server crash when accessing another server?

The nginx + php5-fpm server works great.
Until recently, there were no problems until it became necessary to contact another service via api. While the other server was working, there were no problems, the third-party server crashed and my server crashes when I access it, or rather php5-fpm crashes.
I can't figure out what the problem is, please help me.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vlad Zhivotnev, 2015-05-17
@1Rockman

In the code there is a synchronous call to someone else's service. Someone else's service is not available - your code "works" (or rather waits) for 60 seconds (if the settings have not been changed). The timeout is triggered, nginx nails the request, because it's not fucking.
Make an asynchronous call, cache the result (if possible). If not possible, use timeouts when making requests to an external service and handle the timeout as an error inside the code.

I
index0h, 2015-05-17
@index0h

Religion does not allow to look at the logs?))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question