Skip to content

Instantly share code, notes, and snippets.

@alexbevi
Last active August 29, 2015 14:17
Show Gist options
  • Save alexbevi/55668684206e08f18dcc to your computer and use it in GitHub Desktop.
Save alexbevi/55668684206e08f18dcc to your computer and use it in GitHub Desktop.
Mongoid + Unicorn on Azure

Ever since moving my application from an Ubuntu 14.04 server on EC2 to Azure, I get timeouts from my unicorn workers when running longer queries

I, [2015-03-17T13:51:06.280175 #33828]  INFO -- : worker=0 ready
E, [2015-03-17T13:51:17.924711 #33824] ERROR -- : worker=1 PID:33831 timeout (11s > 10s), killing
E, [2015-03-17T13:51:17.945216 #33824] ERROR -- : reaped #<Process::Status: pid 33831 SIGKILL (signal 9)> worker=1
I, [2015-03-17T13:51:17.947956 #33867]  INFO -- : worker=1 spawned pid=33867
I, [2015-03-17T13:51:17.948471 #33867]  INFO -- : Refreshing Gem list
I, [2015-03-17T13:51:24.800618 #33867]  INFO -- : worker=1 ready

Just wondering:

  • is there a preferred config for unicorn (i have preload_app false right now)
  • is there a preferred config for mongoid
  • I have the unicorn timeout set to 60 now, but for long (unoptimized) queries, the issue would persist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment