Gunicorn timeout time?

382 views
Skip to first unread message

nico.e...@gmail.com

unread,
Oct 12, 2014, 3:12:08 AM10/12/14
to psi...@googlegroups.com
Hi,

I am getting this error which seems to prevent the turkers from completing the Hit:
[CRITICAL] WORKER TIMEOUT

This log message seems to be related to gunicorn. I sort of want to modify the following file, adding 'timeout': 24*3600 to the user options, but I am not sure of the consequences of this.
https://github.com/NYUCCL/psiTurk/blob/master/psiturk/experiment_server.py

Context:
========

Since the experiment that we are working on records a lot of events and is supposed to work without psiturk, we process our experiment events through a different library than psiturk. Hence, we use psiturk as a Mechanical Turk wrapper that allows us to redirect user to our app, which they play during an hour, and then complete the Hit with psiturk.

So, psiTurk sees no events, just a start time and terms consent for the task and a completeHIT event at the end of the experiment (around an hour after the beginning of the experiment).

When we truncate the experiment to 15min it seems to work fine, but after an hour, most of the Turkers cannot complete the HIT, receiving a 1015 error (API server not responding). I suspect that this is related to the guicorn worker timeout error that I see in the log.

Should I just override the gunicorn timeout?

Thanks for your help!

Todd Gureckis

unread,
Oct 13, 2014, 8:51:35 PM10/13/14
to nico.e...@gmail.com, psi...@googlegroups.com
this is getting into the limits of my understanding...

On Oct 12, 2014, at 3:12 AM, nico.e...@gmail.com wrote:

> Hi,
>
> I am getting this error which seems to prevent the turkers from completing the Hit:
> [CRITICAL] WORKER TIMEOUT
>
> This log message seems to be related to gunicorn. I sort of want to modify the following file, adding 'timeout': 24*3600 to the user options, but I am not sure of the consequences of this.
> https://github.com/NYUCCL/psiTurk/blob/master/psiturk/experiment_server.py


I think the worker timeout happens if a browser client opens a socket (which spawns a thread
on the gunicorn server) but hangs onto it too long without closing/passing data. the server
has to assume at some point that the client has gone away and give up on waiting for
communication.

now, completeHIT() is actually a simple http request. there are no long-running socket
connections in psiTurk unless your browser or internet connection is running really slow
for some reason.

thus, I don't think it should matter at all that you are using psiTurk this way. the timeout
issue may be due to something else entirely, possibly in your javascript and it's connection
to the psiturk server...


> Context:
> ========
>
> Since the experiment that we are working on records a lot of events and is supposed to work without psiturk, we process our experiment events through a different library than psiturk. Hence, we use psiturk as a Mechanical Turk wrapper that allows us to redirect user to our app, which they play during an hour, and then complete the Hit with psiturk.


>
> So, psiTurk sees no events, just a start time and terms consent for the task and a completeHIT event at the end of the experiment (around an hour after the beginning of the experiment).
>
> When we truncate the experiment to 15min it seems to work fine, but after an hour, most of the Turkers cannot complete the HIT, receiving a 1015 error (API server not responding). I suspect that this is related to the guicorn worker timeout error that I see in the log.
>

you mean that you don't access any routes in the psiturk server at all? just initialize the psiturk() js object and call
complete hit at the end? I don't think that should trigger a timeout but maybe the backbone.js dependency for
psiturk.js is causing an issue (perhaps a "sync" event is being triggered and not completing correctly?)
that's my best guess...

> Should I just override the gunicorn timeout?


My guess is you shouldn't have to do that... something is maybe keeping open a connection to the psiturk server
when it shouldn't be. You might be able to debug it in the browser development tools...

this isn't a solution but is the type of thing I would be looking at:
http://stackoverflow.com/questions/14404267/backbone-js-define-timeout-for-backbone-sync-implementation

This is all just a guess though... I don't know what the implications of using psiturk this way actually will be
since we never really tested it under this use... let us know if you figure anything out!

Best,
T

>


> Thanks for your help!
>
> --
> You received this message because you are subscribed to the Google Groups "PsiTurk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to psiturk+u...@googlegroups.com.
> To post to this group, send email to psi...@googlegroups.com.
> Visit this group at http://groups.google.com/group/psiturk.
> For more options, visit https://groups.google.com/d/optout.

Hrvoje Stojic

unread,
Nov 29, 2015, 11:23:11 AM11/29/15
to PsiTurk, nico.e...@gmail.com
Hi,

did anyone resolve this issue?

I use psiturk in similar way, there is no communication between the server and the client except at the beginning and the end of the experiment and I get a lot of worker timeout at the end when they want to submit the data (about 30%). The experiment is not too long, up to 30min, and I use AWS instance for hosting the experiment, there should be no problems with network access.

Best,
Hrvoje
Reply all
Reply to author
Forward
0 new messages