Cron scheduler seems to throw a timeout

I created a workflow that is triggered every hour by the scheduler.

The workflow sometimes fails due to a timeout. It seems like the timeout is not thrown by any of my steps but instead by the scheduler component (see screenshot #1 below) that triggers the execution. None of the steps have been executed and the trigger step has an error icon attached.

UPDATE #1: it seems like the scheduler component also threw an Out of memory error once (cannot post a screenshot since I am limited to one image per post).

Am I misunderstanding the error details or is it a bug?

Hi @xlarry

The design of the error message might be a bit misleading. For general timeout and out of memory errors, the error appears above the trigger which makes it look as if the trigger is the culprit but in fact it’s just the workflow in general.

But, 0/5 steps executed is very strange.

Could you share the workflow ID of this affected workflow? It’s in the workflow’s URL when you have it open, and it looks like p_*****.

Hi @pierce

Thanks for clarification!

The workflow ID is p_V9CG5qO. Please note that the timeout setting has just been increased from 60 to 90s (but still failing occasionally). Also, there are some failed executions caused by an HTTP 429 response. Hope it doesn’t clutter your analysis too much.

Thanks @xlarry

Yes, the 429 responses and the attempted retrying by manually waiting within the code step is most likely the culprit here.

When using a 3rd party NPM package or manually using setTimeout in a code step, it’s still affecting the total execution time of the workflow.

You might have more luck with the built in $.flow.rerun method to rerun an API request in case you hit an API limit.

The advantage there is the pausing between reruns will not add to your overall execution time.

Below is a link to the documentation:

Here’s a short video on how to use it:

Hope this helps!

Alright, I will try to handle the 429 errors with $.flow.rerun then.

Thanks for your excellent support @pierce :slight_smile:

1 Like

Great @xlarry happy to help!

Please let me know if that solves your problem :slight_smile: