#Sometimes tasks are freezing on start (locally)

1 messages · Page 1 of 1 (latest)

sleek tide
#

Hello Trigger,
Sometimes, certain local tasks are received and started, but they don't execute anything and remain frozen. I don't know if it's an error on our side, but there are three of us on the team, and we all have the same problem.
Here is an example with a task named "s3_file." The task should log the payload at the beginning, and you can see on the screen that after 5 minutes, nothing was logged. The CLI logs the beginning of the task, but there is nothing after that.
We have to kill the process and rerun the task when this happens.

Thank for your help

abstract stratusBOT
#

Hi @sleek tide. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

I apologize, but the knowledge sources provided do not contain specific information about tasks freezing on start locally or the exact scenario you've described. However, I can offer some general insights based on the available information about Trigger.dev's task execution and troubleshooting.

  1. Environment Variables: Make sure all necessary environment variables are set correctly. As mentioned in the Common problems section, missing environment variables can cause issues.

  2. Dev CLI: Ensure you're running the dev CLI when working in the Dev environment. As stated in the Scheduled tasks (cron) section, "For Dev environments scheduled tasks will only trigger if you're running the dev CLI."

  3. Logging: Try adding more logging statements throughout your task to pinpoint where it might be freezing. You can use the logger object for structured logging as described in the Logging and tracing section.

  4. Max Duration: Check if you have a maxDuration set for your tasks. If it's set too low, it might cause tasks to stop prematurely. You can configure this in your trigger.config.ts file or on individual tasks as explained in the Max duration section.

  5. Checkpoint-Resume System: Be aware of how the Checkpoint-Resume System works. If your task is waiting for a subtask or using a wait function, it might appear to be frozen when it's actually paused.

#

If the problem persists after checking these points, it would be best to contact Trigger.dev support directly, as the issue might be specific to your setup or could be a bug that needs to be addressed by the Trigger.dev team.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:

#

@sleek tide Kapa.ai is still learning and improving, please let me know how I did by reacting below.

spark imp
#

When this happens if you look at the "Detail" tab in the inspector on the right, does it match with the current version running in your CLI?

sleek tide
#

Just happened again, it looks like it's the same version