R
RunPod•5mo ago
mrmvp

Request stuck in "IN_QUEUE" status

Hi, I tried to setup a endpoint for "rembg" package using cog. It seems to run fine locally, but when I hit the serverless endpoint the request is always "IN_QUEUE" even though the logs shows that the server is up and running. Do you know what could be the issue?
17 Replies
ashleyk
ashleyk•5mo ago
Are all your workers throttled?
mrmvp
mrmvp•5mo ago
Ah you mean throttled by cpu utilization?
mrmvp
mrmvp•5mo ago
No description
ashleyk
ashleyk•5mo ago
Why did you set max workers to 1? That is a bad idea, leave it at defaulrt of 3. The default of 3 is the sane default, setting it to 1 will cause you endless issues, nightmares and a world of pain.
mrmvp
mrmvp•5mo ago
Ah I see, it was initially 3 but I was still facing the same issue and it was costing quite a bit so I switched it to 1 😓
ashleyk
ashleyk•5mo ago
You don't pay for max workers, only for active workers. With max workers you only pay for the requests.
mrmvp
mrmvp•5mo ago
Okay set it back to 3. But how do i resolve the issue of the request being stuck in "IN_QUEUE"?
ashleyk
ashleyk•5mo ago
Are all 5 workers throttled?
mrmvp
mrmvp•5mo ago
Nope
mrmvp
mrmvp•5mo ago
No description
ashleyk
ashleyk•5mo ago
Are any of your requests actually processing successfully?
mrmvp
mrmvp•5mo ago
Nope
ashleyk
ashleyk•5mo ago
Then there is something wrong with your handler, click on one of the workers and check the logs.
mrmvp
mrmvp•5mo ago
hmm I see this. When I run the docker container locally, it processes the request successfully. Not unable to get it work on serverless
No description
navin_hariharan
navin_hariharan•5mo ago
@mrmvp Mind sending your rp hander? There is something erong with it!
ashleyk
ashleyk•5mo ago
Looks like the /health-check API is not working and resulting in an HTTP 404 not found, and then looks like you are wrapping the health check API call in a try, except block and which tries to access the status field of the JSON response from /health-check but its failing because status does not exist within the HTTP 404 response and throws a KeyError exception as a result.
mrmvp
mrmvp•5mo ago
I have been following this tutorial https://blog.runpod.io/replicate-cog-migration/ I have not changed anything in the handler code inside the cog-worker
RunPod Blog
Serverless | Migrating and Deploying Cog Images on RunPod Serverles...
Switching cloud platforms or migrating existing models can often feel like a Herculean task, especially when it necessitates additional developmental efforts. This guide aims to simplify this process for individuals who have deployed models via replicate.com or utilized the Cog framework. Through a few straightforward steps, you'll learn how