Autotask Error: Lambda Internal Error: TimeoutError

Sometimes Autotask fails with “Message: Lambda Internal Error: TimeoutError. Details: Error running the autotask function: TimeoutError… No logs available”

:computer: Environment

Autotask

:memo:Details

I have an Autotask scheduled to run every 60 minutes. It was running correctly for a while, but recently it started to fail with Message: Lambda Internal Error: TimeoutError. Details: Error running the Autotask function: TimeoutError.. No logs available. This happens for a couple of hours (e.g. 3-6 runs of the Autotask) and then goes back to normal. I’d like to use Defender in production, as long as it is 100% reliable, but it looks like it is not the case yet.
Please help.
:1234: Code to reproduce

1 Like

Hey @ivan! Thanks for the report. That error happens when your Autotask exceeds the maximum alloted time of 5 minutes (note that this time will be less if you specify a faster frequency, so an Autotask that runs every minute cannot go over 1 minuteof running time).

That said, there’s an error on our end that we’ve now identified that prevents logs from being captured upon timeouts. We’ll look into it and push a fix as soon as possible. We’ll keep you posted!

2 Likes

Hey @spalladino, thanks for the quick response. Yeah, it would be helpful to see the logs. My guess is that it took more than 5 minutes for the transaction to go through. It happened before when the gas price was not high enough. However, I use “fastest” option for the dynamic gas price calculation, so there is a change that something could be wrong with how it calculates the gas price. Also, I checked successful transactions and the actual gas price with the “fastest” option is around 5 gwei, which does not look like high enough considering recent ropsten prices.

Oh, and is it possible to see full autotask run history? I can only see the last 20 records (or 20 hours). Is it a free plan limitation? Thank you.

1 Like

I'd suggest not waiting for the tx to be mined as part of the autotask. The relayer will take care of keeping track of it, and resubmitting it with a higher gas price if needed. This should make your tasks much faster to run.

I checked successful transactions and the actual gas price with the “fastest” option is around 5 gwei, which does not look like high enough considering recent ropsten prices.

Given there's no reliable gas price oracle for testnets, we rely on eth_gasPrice and duplicate it to get fastest prices for testnets. But given the volatility of testnets, it's possible that this is not the best option. You can set a fixed gas price yourself if you prefer (see here).

It's on our backlog! I'll make sure to bump its priority.

1 Like