Long-running actions
I need to run an action for more then 30 seconds. What are my options?
5 Replies
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.
let us know if this addresses the issue
if you're literally running compute for more than 30 seconds that's another issue
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 😦
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
:thank_you: