using unicorn with logging-rails gem

Yoav Aner yoav at
Fri Nov 30 19:59:24 UTC 2012

Hi Eric,

Thanks a bunch for getting back so quickly on this.

I followed your suggestion and tried with `preload_app = false` and
looks like this seems to fix this problem! Any idea what can go wrong
when it's set to true or how I can try go about fixing this??

I haven't yet contacted the logging / logging-rails project. Perhaps
that's a good idea. Considering the gem did/does work fine on my dev
environment and with phusion passenger (and now it seems also with
Unicorn, albeit with preload_app = false), I wasn't sure whether the
problem is with this gem or elsewhere.

Any tips on how to investigate this further or resolve this, or what
information I can give the gem maintainer(s) would be much


On 30 November 2012 20:15, Eric Wong <normalperson at> wrote:
> Yoav Aner <yoav at> wrote:
> > Hope this is the right place to ask questions about unicorn. I'm not
> > on the mailing list though, so please CC my email address.
> No problem!
> > Since moving from phusion passenger to Unicorn, it seems like one
> > functionality of the logging-rails gem
> > ( is (half) broken.
> >
> > Logging-rails supports an email appender, which aggregates log
> > messages (typically ERROR and above) and then emails them. However,
> > since moving to Unicorn we stopped getting those emails.
> >
> > The interesting thing however, is that when we USR2 signal our unicorn
> > and it restarts itself, then those emails somehow get flushed out and
> > get sent all at once... I tried sending USR1 signal to see if it has
> > something to do with log flushing, but this does not seem to make any
> > difference.
> USR1 only affects logging to regular files, so is unlikely to help
> in your case.
> Are you using preload_app true or false?  If true, perhaps some shared
> resource (socket or temporary file) isn't being handled correctly?
> > Any ideas how to investigate this / make it work again??
> I'm not familiar with the "logging" or "logging-rails" gems.
> I took a brief look at them but couldn't figure anything out,
> can you ask the author of those gems?
> If you do figure something out, please let the list know so it can
> possibly help others in the future.

More information about the mongrel-unicorn mailing list