#Problems after V4 upgrade

1 messages · Page 1 of 1 (latest)

thin sparrow
#

I've upgraded to the V4 beta, but have had problems with all my tasks today.

I have a task which batch triggers another set of tasks. None of the subsequent tasks have been triggered. And the batch still shows as "executing" in the UI.

When clicking into the batch, no tasks are shown.

Please help!

sudden sandBOT
#

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

  1. Check your deployment logs for any specific error messages
  2. Try a dry run with npx trigger.dev deploy --dry-run to inspect the built tasks
  3. Run with debug logs: npx trigger.dev deploy --log-level debug
  4. 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.

thin sparrow
thin sparrow
#

I rolled back to v3 as I needed to get things moving

dark grail
#

Hey,

How did you trigger the batch? It looks like these are all v3 runs and aren't using v4.

thin sparrow
#

Hey!

It's all in code (a scheduled task, does this)

    await anotherTask.batchTrigger(
      sites.map((payload) => ({ payload }))
    )
dark grail
#

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.

thin sparrow
#

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.

dark grail
#

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?

thin sparrow
#

Only thing I can see

#

But clicking into it shows 0 runs

dark grail
#

OK this is now fixed. You'll need to upgrade to 4.0.0-v4-beta.5