Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 at 14:25

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.