Why is a Timeout NodeJS Step Consuming More Credits Than a Successful One?

This topic was automatically generated from Slack. You can find the original thread here.

I have noticed some unusual credit consumption this morning. one of my workflow throw error and the reason is one of my nodeJS step times out. and all the time out steps consume about 200 credits… though the succeed one only cost 56 credits. can you help me with this?

I’m sorry to hear that you’re experiencing issues with credit consumption. Timeouts can occur when your code takes longer to execute than the allowed limit. When a timeout occurs, it might consume more credits than a successful execution. To address timeouts, you can: 1. Investigate why your code is taking longer than expected. Timeouts are specific to your workflow, and they might be caused by slow responses from third-party APIs or processing large amounts of data. 2. If it’s expected that your code takes longer to run, you can increase the execution limit of your workflow in your workflow’s settings. If you need further assistance, please visit https://pipedream.com/support for more support options.

but why the interrupted workflow cost 200 credits while the whole only cost 56?? thats weird

I understand your concern about the credit consumption. When a workflow times out, it might consume more credits due to the additional compute time spent before reaching the timeout. However, it’s unusual for a timed-out workflow to consume significantly more credits than a successful one. To better understand the issue, I would need more information about your specific workflow, such as the steps involved and the timeout settings. Additionally, you can visit https://pipedream.com/support for more support options and to get assistance from the Pipedream team.

Does the WF attempt to rerun? That’s the case when I experience something similar.

yep, the reason my workflow timeout seems to be the audio file is too big and it take way too long to process and exceeds the execution limits

Seen,

I haven’t worked with audio files on PD. How do you reckon to fix this?

Process bits of the audio, store in a datastore, process more and when done, do something with processed audio?

i haven’t got time fixing it. but yeah, i was considering do that. i think there’s python lib could help cut and combine the audio file.

All the best