R
RunPod4w ago
rushab

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
Jason
Jason4w ago
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
rushab
rushabOP4w ago
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
Jason
Jason4w ago
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
riverfog7
riverfog74w ago
why exit code 0 tho maybe your docker CMD doesn't wait forever
Jason
Jason4w ago
Yeah many reasons, just means the program is finished Google says
rushab
rushabOP4w ago
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?
Jason
Jason4w ago
Send your files here dockerfile, handler
rushab
rushabOP3w ago
here it is - Thanks @Jason 🙌🏻
Jason
Jason3w ago
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!
Jason
Jason3w ago
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.
rushab
rushabOP3w ago
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
Jason
Jason3w ago
"manually started the worker" how? yep, this is why because if there's no runpod-specific library, it cannot stop the worker automatically then.
rushab
rushabOP3w ago
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
riverfog7
riverfog73w ago
really?
Jason
Jason3w ago
i think so, unless you copy the whole python library into correctly supporting js isnt t? i see yep
rushab
rushabOP3w ago
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?
Jason
Jason3w ago
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
riverfog7
riverfog73w ago
yeah
rushab
rushabOP3w ago
okay, let me check if we can do this. thanks 🙌
riverfog7
riverfog73w ago
just make a rest-api ish thing with node andthen invoke it with python
Jason
Jason3w ago
Yeah or that
rushab
rushabOP3w ago
Understood
Jason
Jason3w ago
You can see an example in this repo How they use requests library to communicate with other program's http api
rushab
rushabOP3w ago
Got it, checking it out

Did you find this page helpful?