#worker exited with exit code 0

43 messages · Page 1 of 1 (latest)

pliant slate
#

Hello team, I'm trying to host my remotion video rendering on Runpod serverless built with nodejs via docker.

the build completes but when I shoot a request, it never moves out of job queue, worker starts and gives error worker exited with exit code 0 and never shuts down and the video didn't get's rendered

every time I've to terminate the worker and purge the queue.

What is going wrong?

worker id - j9spmt6ba47py6
endpoint - https://api.runpod.ai/v2/1bqxtx4casdrc9/run

gloomy sand
#

can you check your dockerfifle

#

you must execute your handler.py, and call serverless start

#

if you did that, check for errors in your code, add debugging logs to check for errors in the process

pliant slate
#

Okay @gloomy sand, thank you for your response. adding and checking it

pliant slate
#

Hey @gloomy sand , I did this, still the same error. It just gives error exited with code 0, nothing else

gloomy sand
#

Try using. Working example from runpod worker github instead

#

Then change your way from there

#

If something goes wrong reverse back to the working one

robust stump
#

why exit code 0 tho

#

maybe your docker CMD doesn't wait forever

gloomy sand
#

Yeah many reasons, just means the program is finished Google says

pliant slate
#

understood, will try and revert back here

#

I'm still not able to solve this, can anyone help me with this as a paid gig?

gloomy sand
#

Send your files here dockerfile, handler

pliant slate
gloomy sand
#

well you cant really use .js file as a handler actually

#

usually people use .py, as far as i know thats what's supported

#

but im sure easily with LLM's now they can guide you with migrating these two files fast!

pliant slate
#

Thank you for sharing this! checking it out.
But just want to know that initially this code was made for the server and it worked if I manually started the worker and the same code also worked initially for a few renders (videos were rendering but the worker didn't terminate) but stopped working after that, bit weird

gloomy sand
#

"manually started the worker" how?

gloomy sand
pliant slate
#

By triggering via a sample request via the runpod dashboard, it started by an internal server. It communicates with Supabase realtime to render videos

gloomy sand
#

isnt t?

pliant slate
#

I'm using Remotion for video rendering. Remotion is built specifically for the Node.js. so in this case I don't think Runpod will be the right platform to host if .js handler is not supported?

gloomy sand
#

There is another way actually

#

Like from python you can run any programs

#

.sh..js any that runs in linux

#

By using subprocess or something else, so you may try that

#

And just pass the input as program arguments

robust stump
#

yeah

pliant slate
#

okay, let me check if we can do this. thanks 🙌

robust stump
#

just make a rest-api ish thing with node andthen

#

invoke it with python

gloomy sand
#

Yeah or that

pliant slate
#

Understood

gloomy sand
#

How they use requests library to communicate with other program's http api