From: Eric Wong <normalperson@yhbt.net>
To: unicorn list <mongrel-unicorn@rubyforge.org>
Cc: Ilya Bazylchuk <ilya.bazylchuk@gmail.com>
Subject: Re: Stucks DB connections
Date: Mon, 24 Feb 2014 18:25:53 +0000 [thread overview]
Message-ID: <20140224182553.GA19993@dcvr.yhbt.net> (raw)
In-Reply-To: <1EC1C721-9404-4230-9623-F9E713EB46C8@gmail.com>
Ilya Bazylchuk <ilya.bazylchuk@gmail.com> wrote:
> Hey Guys,
>
> We have problems with DB connection in unicorn. When workers work some
> hours we see in Postgres activity stucks connections with query
> "COMMIT". After restart unicorn it work fine some time, then
> connections stucks again.
>
> database.yml
>
> adapter: postgis
> postgis_extension: true
> schema_search_path: public,postgis
> encoding: utf8
> pool: 5
> checkout_timeout: 10
>
> unicorn 4.8.2
> pg 0.17.1
> rails 3.2.17
I'm not familiar with postgis. Is there any sort of idle timeout on the
database side? Is this high or low traffic when things get stuck?
I think the postgis/pg adapter guys might be able to help, too, since
unicorn doesn't do anything with the DB connections itself.
Some generic, DB-independent thoughts/questions:
Sometimes, tiny socket buffer sizes with the DB connection might hit this.
Any non-standard kernel/socket knobs or tuning?
Also, if running Linux, which kernel version are you running? If it's
3.7, make sure commit 8fb74b9fb2b182d54beee592350d9ea1f325917a
(mm: compaction: partially revert capture of suitable high-order page)
got backported.
_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying
next prev parent reply other threads:[~2014-02-24 18:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-24 12:33 Stucks DB connections Ilya Bazylchuk
2014-02-24 18:25 ` Eric Wong [this message]
[not found] ` <17CD6ADE-9BBE-4989-B846-C9568F2D2973@gmail.com>
2014-02-24 19:01 ` Eric Wong
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=20140224182553.GA19993@dcvr.yhbt.net \
--to=normalperson@yhbt.net \
--cc=ilya.bazylchuk@gmail.com \
--cc=mongrel-unicorn@rubyforge.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).