#Problems after V4 upgrade
1 messages · Page 1 of 1 (latest)
Hi @thin sparrow. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
I understand you're experiencing issues after upgrading to the V4 beta, particularly with batch triggering tasks. Based on the information provided in the knowledge sources, I can suggest a few troubleshooting steps.
Possible Issues and Solutions
1. Large Payloads
There's a limit on payload sizes when batch triggering tasks. If your payloads are too large, this could cause issues:
- The total size of all payloads in a batch cannot exceed 1MB
- For a batch of 100 runs, each payload should be less than 100KB
- The maximum batch size is 500 runs
Large Payloads documentation mentions these limitations.
2. Realtime API Known Issue
There's a known issue with the realtime API when dealing with large payloads:
- The realtime API doesn't work properly with runs that have large payloads stored in object storage instead of the database
- As a workaround, keep payloads and outputs below 128KB when using the realtime API
This is documented in the Realtime known issues.
3. Parallel Waits
If you're using multiple "wait" operations in parallel, this could cause problems:
Parallel waits are not supported
This includes functions like task.triggerAndWait(), task.batchTriggerAndWait(), etc. Instead, use the built-in functions for triggering tasks in parallel as mentioned in the Runtime issues documentation.
4. Missing Await
Make sure you're using await when calling trigger functions:
When triggering subtasks the parent task finishes too soon
Without await, the tasks might not be triggered because the calling function process can terminate before the network calls are sent.
5. Version Locking
Check if there are any version locking issues. The Versions documentation explains that child tasks triggered with wait functions are version-locked to the parent task version.
Next Steps
- Check your deployment logs for any specific error messages
- Try a dry run with
npx trigger.dev deploy --dry-runto inspect the built tasks - Run with debug logs:
npx trigger.dev deploy --log-level debug - Consider joining the Trigger.dev Discord for more specific help
If none of these suggestions help, you might be encountering a new issue with the V4 beta that isn't documented in the knowledge sources.
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
@thin sparrow Kapa.ai is still learning and improving, please let me know how I did by reacting below.
I rolled back to v3 as I needed to get things moving
Here's a run that ran, triggered a batch, and no tasks actually ran in that batch
Hey,
How did you trigger the batch? It looks like these are all v3 runs and aren't using v4.
Hey!
It's all in code (a scheduled task, does this)
await anotherTask.batchTrigger(
sites.map((payload) => ({ payload }))
)
Do you happen to have one of the runs that was stuck handy? It's strange because the run you linked above that's the parent is definitely v4.
Sorry, I think the "run that was stuck" part is just a UI thing (the batch shows as "executing")
I can't see any evidence that run above actually triggered any jobs.
It says it triggered batch_cm9jvqtns01st1voibb4anyvo - but that batch has no tasks.
Yeah that’s why I’m confused too. Were there any times in that batch do you know from your logs?
The spinner on the batch page is purely for UI feedback, it’s not operational
Although it should be being updated
Were you using idempotency keys?
OK this is now fixed. You'll need to upgrade to 4.0.0-v4-beta.5