Report this

What is the reason for this report?

Nginx 502 Bad Gateway on some search queries

Posted on December 4, 2017

Hi guys, I have written a dictionary website, it works fine, but on some queries i receive bad gateway, the nginx log is written below:

upstream prematurely closed connection while reading response header from upstream

what is my problem exactly, cause everything is fine and it works for most of the queries, and i get response for those queries on my local server. Is it my server RAM? My server has 512 MB RAM, and 1 CPU.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Why it is happening.Need a solution.I am fed up with this. Alzheimers care Tampa

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.