unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / Atom feed
From: Aakash Gupta <aakash.gupta96@outlook.com>
To: "unicorn-public@bogomips.org" <unicorn-public@bogomips.org>
Subject: Master Process Reaping Worker with No message
Date: Tue, 23 May 2017 13:20:29 +0000
Message-ID: <BN6PR20MB12816B4DEA41A7389ACF5D3B9BF90@BN6PR20MB1281.namprd20.prod.outlook.com> (raw)

I am using unicorn server with Nginx for running my Rails app. I don't know why but my master server is reaping workers continously while file uploads. I have raised the timeout limit of unicorn to 20 minutes for giving sufficient time for uploading file. This happends mostly during file uploads on server. For file uploads, I am using Carrierwave gem with Fog to upload the files to S3. Server is running on AWS EC2 instance of 1GB RAM with 2GB Swap space. 
 Master process kills worker with message "ERROR : reaped ... SIGKILL (signal 9)> worker=1 " without any reason or message such as timeout or memory overflow.

Whenever a worker is reaped, Nginx also logs an error for each reaping instance with message:
" upstream prematurely closed connection while reading response header from upstream ..."

I need help to figure out the problem and the reason why this is happening. I don't think this is happening because of timeout issue because whenever I try to test my server by uploading a file, this error appears even before 20 minutes which is the timeout limit. Any help regarding this would be appreciated. 

             reply index

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-23 13:20 Aakash Gupta [this message]
2017-05-23 16:22 ` Eric Wong
2017-05-23 19:29 Aakash Gupta
2017-05-23 20:40 ` Eric Wong

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://bogomips.org/unicorn/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BN6PR20MB12816B4DEA41A7389ACF5D3B9BF90@BN6PR20MB1281.namprd20.prod.outlook.com \
    --to=aakash.gupta96@outlook.com \
    --cc=unicorn-public@bogomips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help

Archives are clonable:
	git clone --mirror https://bogomips.org/unicorn-public
	git clone --mirror http://ou63pmih66umazou.onion/unicorn-public

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.lang.ruby.unicorn
	nntp://ou63pmih66umazou.onion/inbox.comp.lang.ruby.unicorn

 note: .onion URLs require Tor: https://www.torproject.org/

AGPL code for this site: git clone https://public-inbox.org/ public-inbox