Answer the question
In order to leave comments, you need to log in
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
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.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question