vors
vors•3y ago

Long-running actions

I need to run an action for more then 30 seconds. What are my options?
5 Replies
james
james•3y ago
If there are async components to your action that are taking a long time then this can likely be split into multiple scheduled actions e.g., as discussed in https://stack.convex.dev/background-job-management
Background Job Management
Implement asynchronous job patterns using a table to track progress. Fire-and-forget, cancelation, timeouts, and more.
james
james•3y ago
let us know if this addresses the issue if you're literally running compute for more than 30 seconds that's another issue
vors
vorsOP•3y ago
no, I'm waiting for the external endpoint, thank you, let me try it! just to double check: scehduled functions are not subject to 30 seconds timeout? If that's the case I think there is an oportunity to call this out in https://docs.convex.dev/using/scheduling The example that is referred doesn't have the scheduled functions from what I can tell... https://github.com/get-convex/convex-demos/blob/main/dall-e-storage-action/convex/actions/sendDallE.js ok I'm getting timeouts from the action that run through the scheduler 😦
2/13/2023, 4:15:29 PM
30073ms
failure
Action
actions/inference
failure
Function execution timed out
2/13/2023, 4:15:29 PM
30073ms
failure
Action
actions/inference
failure
Function execution timed out
james
james•3y ago
just realized i gave a bad answer here because you want to synchronously block on a fetch call for more than 30 seconds, not run a long job that can be split into continuations. you're correct that all actions are subject to the timeout will chat with folks about potentially increasing the timeout
vors
vorsOP•3y ago
:thank_you:

Did you find this page helpful?