Score:0

How do i fix upstream prematurely closed connection error?

bg flag

I have deployed a django web application to AWS EBS, and one endpoint got a script running for some word processing it takes few seconds(max 10-15 seconds).

I have seen questions and answers for this issue and tried everything, and even changed the django.config file inside .ebextension to following

ption_settings:
  aws:elasticbeanstalk:container:python:
    WSGIPath: alteducation_web.wsgi:application
files:
  "/etc/nginx/conf.d/01-timeout.conf":
     mode: "000644"
     owner: root
     group: root
     content: |
       keepalive_timeout 500s;
       proxy_connect_timeout 500s;
       proxy_send_timeout 500s;
       proxy_read_timeout 500s;
       send_timeout 500s;
       fastcgi_send_timeout 500s;
       fastcgi_read_timeout 500s;
container_commands:
  nginx_reload:
     command: "sudo service nginx reload"

But still the endpoint returns 502 Bad Gateway error,

And logs show the upstream prematurely closed connection error.

how do i get this fix ?

Thanks in advance.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.