worker exited with exit code 0
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
24 Replies
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
Okay @Jason, thank you for your response. adding and checking it
Hey @Jason , I did this, still the same error. It just gives error exited with code 0, nothing else
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
why exit code 0 tho
maybe your docker CMD doesn't wait forever
Yeah many reasons, just means the program is finished Google says
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?
Send your files here dockerfile, handler
here it is - Thanks @Jason 🙌🏻
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!
just send the runpod docs for creating handlers / find a reference like this
https://github.com/blib-la/runpod-worker-comfy/tree/main
GitHub
GitHub - blib-la/runpod-worker-comfy: ComfyUI as a serverless API o...
ComfyUI as a serverless API on RunPod. Contribute to blib-la/runpod-worker-comfy development by creating an account on GitHub.
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
"manually started the worker" how?
yep, this is why because if there's no runpod-specific library, it cannot stop the worker automatically then.
By triggering via a sample request via the runpod dashboard, it started by an internal server. It communicates with Supabase realtime to render videos
got it
really?
i think so, unless you copy the whole python library into correctly supporting js
isnt t?
i see yep
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?
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
yeah
okay, let me check if we can do this. thanks 🙌
just make a rest-api ish thing with node andthen
invoke it with python
Yeah or that
Understood
You can see an example in this repo
How they use requests library to communicate with other program's http api
Got it, checking it out