Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have my backend in France and one of my frontend servers is in Japan. This issue doesn't happen with any other of my frontends, only this Japan server, which already has about 2s latency from most locations.

The latency isn't what's bothering me, it's timeout errors that occur on the frontend. I am certain this is not a backend problem since this only happens with the Japan server, and occurs when fetching static resources such as images, so it's not an issue with php-fpm, which I'm using.

I also get these errors sometimes:

upstream prematurely closed connection while reading response header from upstream

It is not a memory or CPU issue either. nginx on the frontend is using 4 worker processes and proxy_read_timeout is set to 150, even though changing it doesn't make a difference.

Is there any things you recommend I do to fix these errors?

share|improve this question
Have you monitored the network connectivity between these two locations? To me, it looks like the connectivity between backend and frontend is simply too fragile for this to work. If I were you, I would mirror those static resources to the frontend server. That eliminates many possible problems. – Tero Kilkanen Jun 30 '14 at 14:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.