502 after search

I’m having issues when using search on a repository. The troubleshooting guide is giving information about 502 at startup time, but not at

My unicorn settings are:

  • worker_processes 2
  • timeout 60

During search, I have the following events in unicorn.stderr.log:

I, [2015-01-23T16:58:49.115761 #18418]  INFO -- : worker=0 ready
W, [2015-01-23T16:59:50.903495 #18418]  WARN -- : #<Unicorn::HttpServer:0x007f7ceafd6b50>: worker (pid: 18418) exceeds memory limit (211169280 bytes > 209841188 bytes)
W, [2015-01-23T16:59:50.903597 #18418]  WARN -- : Unicorn::WorkerKiller send SIGQUIT (pid: 18418) alive: 60 sec (trial 1)
I, [2015-01-23T16:59:51.069093 #21376]  INFO -- : reaped #<Process::Status: pid 18418 exit 0> worker=0
I, [2015-01-23T16:59:51.074004 #18746]  INFO -- : worker=0 ready
E, [2015-01-23T17:00:47.099303 #21376] ERROR -- : worker=1 PID:17981 timeout (61s > 60s), killing
E, [2015-01-23T17:00:47.150238 #21376] ERROR -- : reaped #<Process::Status: pid 17981 SIGKILL (signal 9)> worker=1
I, [2015-01-23T17:00:47.710567 #19659]  INFO -- : worker=1 ready
W, [2015-01-23T17:00:50.190472 #18746]  WARN -- : #<Unicorn::HttpServer:0x007f7ceafd6b50>: worker (pid: 18746) exceeds memory limit (262922240 bytes > 253650086 bytes)
W, [2015-01-23T17:00:50.190593 #18746]  WARN -- : Unicorn::WorkerKiller send SIGQUIT (pid: 18746) alive: 59 sec (trial 1)
I, [2015-01-23T17:00:50.420101 #21376]  INFO -- : reaped #<Process::Status: pid 18746 exit 0> worker=0
I, [2015-01-23T17:00:50.424654 #19663]  INFO -- : worker=0 ready
W, [2015-01-23T17:06:43.559112 #19659]  WARN -- : #<Unicorn::HttpServer:0x007f7ceafd6b50>: worker (pid: 19659) exceeds memory limit (255995904 bytes > 225864939 bytes)
W, [2015-01-23T17:06:43.559208 #19659]  WARN -- : Unicorn::WorkerKiller send SIGQUIT (pid: 19659) alive: 351 sec (trial 1)
I, [2015-01-23T17:06:43.690612 #21376]  INFO -- : reaped #<Process::Status: pid 19659 exit 0> worker=1
I, [2015-01-23T17:06:43.695471 #22411]  INFO -- : worker=1 ready

The virtual machine has 2 CPUs and 4 GB of RAM. I will increase the unicorn timeout but should I also increase worker_processes ? other settings (regarding “memory exceeds limit”).

Thanks,
– Laurent.