-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Worker process dies with "This is an uncaught error in rrq, probably a bug!" message #59
Comments
I think I need a bit more to get a reproducible example; this works for me: r <- rrq::rrq_controller$new("myqueue")
r$worker_config_save("localhost", heartbeat_period = 3)
w <- rrq::worker_spawn(r, logdir = "logs")
t <- r$enqueue(1 + 1)
r$task_wait(t)
r$message_send_and_wait("PING") # worker looks alive
writeLines(readLines(file.path("logs", w))) # logs look fine Does this happen every time? Seems more likely that it's a race condition than load really given the timings above. For the redux error:
that is really weird. It's coming from deep in the redis-reply-to-r code:
So something you're doing is triggering a new response type. Most likely newer redis servers are returning something else? |
Hi, thanks for your reply! For the redux error - i just found this issue richfitz/redux#50 and it looks relevant - i'm using forking HTTP server, so i'll fix that now to reopen redis connection for every client connection. It would be better to use connection pool for sure, but i couldn't find one quickly. I'll fix forking error with redis and see if that helps with other bug also. |
Ok, i've fixed redis connection in forked processes and cannot see that error anymore. I think this can be closed for now, sorry for the buzz. It looks like i was somehow crippling the data in the Redis DB while simultaneously using Redis connection in many forked processes (each handling HTTP polling request) to get task statuses from |
Thanks, that makes sense as a cause if we have some corrupted client state there. If there's public code at any point that shows the full setup I'd be curious. That said, creating a connection should cost ~1ms (equivalent to around the overhead of a single task) so this may not be that big a deal in practice? |
Hello again. I'm having two workers processing a queue of tasks . After processing a task each - both workers die with the following error:
I was trying to play around with worker config and found out that when i use
heartbeat_period = 3
this error almost always appears and nothing works. When i useheartbeat_period = 30
- it works as expected.is it somehow related to high CPU load - like heartbeat cannot refresh redis key in time and worker got killed?
i'm also randomly catch other type of errors in my HTTP controller:
The text was updated successfully, but these errors were encountered: