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: Eric Wong <e@80x24.org>
Cc: unicorn-public@bogomips.org, Hleb Valoshka <375gnu@gmail.com>
Subject: Re: Why Unicorn master process memory increasing
Date: Sun, 6 May 2018 00:30:19 +0530	[thread overview]
Message-ID: <CAC6mmuHFko=e4Cv5mdZwk1zNnuRv21CNkX0po3xwkFho1LmK_g@mail.gmail.com> (raw)
In-Reply-To: <20180419024548.GA20200@dcvr>

Hi Eric,

Sorry for my late response, somehow missed your mail. Just to update I
managed to fix the issue, it was related to GC. We were using
unciron's oob_gc to control gc execution. Although we had correct
configuration for oob_gc but somehow it was not allowing GC to run. I
checked GC stat and found that major & minor GC count is consistent
over the time. I removed oob_gc and now using gctools gem. With
gctools gem master memory is consistent to ~400MB.

Thanks a lot for your help.

Regards,
Sumit

On Thu, Apr 19, 2018 at 8:15 AM, Eric Wong <e@80x24.org> wrote:
> Hleb: remember to reply-all, we will never require subscription
> to post to this list, so it's likely sumit never saw it.
>
> Hleb Valoshka <375gnu@gmail.com> wrote:
>> I believe it's hard to say something without your unicorn configuration file.
>
> sumit: what Hleb asked...
>
> I suspect "preload_app true" in your config is loading something
> in your app which is using up your memory.  Sometimes there's
> monitoring threads which might fill a queue up or something.
>
> Anything in error logs?  Failing that, strace (on Linux) might
> tell you what's going on at the error level.
>
> But yeah, the master process shouldn't be doing anything besides
> listening to signals and respawning failed workers.
>
> If you want to check if there's monitoring threads on Linux
> systems with /proc mounted, you can see how many threads the
> master has:
>
>         ls /proc/$PID_OF_MASTER/task/
>
> There should be two entries for Ruby 1.9-2.5(*), one being the
> master PID and one for the timer-thread.  If you have more,
> then that's probably some thread doing stuff in the
> background...
>
> (*) _maybe_ we can get rid of timer-thread for 2.6...



-- 
Thanks & Regards
Sumit Nagariya

      reply	other threads:[~2018-05-05 19:00 UTC|newest]

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

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='CAC6mmuHFko=e4Cv5mdZwk1zNnuRv21CNkX0po3xwkFho1LmK_g@mail.gmail.com' \
    --to=sumit.nagariya@gmail.com \
    --cc=375gnu@gmail.com \
    --cc=e@80x24.org \
    --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).