R
RunPod11mo ago
ssssteven

Set timeout on each job

Hello, is there anyway to set a hard limit timeout for each job? Thank you!
Solution:
RunPod
🖇️ | Using Your Endpoint
The method in which jobs are submitted and returned.
Jump to solution
7 Replies
Solution
justin
justin11mo ago
RunPod
🖇️ | Using Your Endpoint
The method in which jobs are submitted and returned.
ssssteven
sssstevenOP11mo ago
Hey @justin it seems like if there's an exception thrown before runpod.serverless.start is called, the timeout above will not work, and my worker is stuck in that state for a very long time... 😦
justin
justin11mo ago
hm unfortunately im not sure why ur worker would get caught in an exception thrown state usually that just crashes the app and exits. Id say try catch ur code if that is an issue so it always returns then? u can kill ur worker manually too if needed
ssssteven
sssstevenOP11mo ago
yes, that means i have to constantly monitor the run status. It would be nice if the timeout also apply to the entire bring up worker process too. Is there anyway to submit this feature request to the RunPod Team?
ashleyk
ashleyk11mo ago
Its impossible to apply to the entire worker process because serverless only kicks in once you actually call runpod.serverless.start(). You should determine what is causing the exceptions before runpod.serverless.start() is called, and fix it.
ssssteven
sssstevenOP11mo ago
Thank you! Is the best practice to call runpod.serverless.start(). then load the model in memory?
ashleyk
ashleyk11mo ago
No, best to load the model before calling it.
Want results from more Discord servers?
Add your server