unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: sumit nagariya <sumit.nagariya@gmail.com>
To: unicorn-public@bogomips.org
Subject: Why Unicorn master process memory increasing
Date: Wed, 11 Apr 2018 20:37:27 +0530	[thread overview]
Message-ID: <CAC6mmuEhH334EmKof8x4h4wwkiar3Ab7aDaq2FMn_-36C1aU9Q@mail.gmail.com> (raw)

Hi,

I have a ruby service running with unicorn which spawns 20 child
worker. When I start my service, unicorn master starts with approx 520
MB of memory and then master spawn 20 child worker. My service runs
perfectly for 7-8 day, but gradually unicorn master memory is kept
increasing and goes up to 1.3 GB, which apparently is causing OOM
error when unicorn master trying to fork a new child (which now need
1.3 GB of memory to fork new child)and due to increased memory
footprint, memory was not available.

So my concern here is,

As per my understanding, Unicorn master doesn't serve any request, its
sole purpose is to spawn missing child then why master process memory
is increasing?
If there is any memory leak in my app then it should impact only child
workers processes, not master process. I am not able to understand why
my master process memory is increasing?

Here is my server config:

Ruby: 2.1.2

Unicorn: 4.6.3

Unicorn worker count: 20

OS: Debian GNU/Linux 8, Jessie

RAM: 24 GB


-- 
Thanks & Regards
Sumit Nagariya

             reply	other threads:[~2018-04-11 15:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-11 15:07 sumit nagariya [this message]
2018-04-12 10:22 ` Why Unicorn master process memory increasing Hleb Valoshka
2018-04-19  2:45   ` Eric Wong
2018-05-05 19:00     ` sumit nagariya

Reply instructions:

You may reply publicly 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://yhbt.net/unicorn/

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

  git send-email \
    --in-reply-to=CAC6mmuEhH334EmKof8x4h4wwkiar3Ab7aDaq2FMn_-36C1aU9Q@mail.gmail.com \
    --to=sumit.nagariya@gmail.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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhbt.net/unicorn.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).