#Why is it taking a while for tasks to be picked from the queue?

1 messages · Page 1 of 1 (latest)

twin plume
#

If you refer to the screenshot, you can see there is like a 20 second delay from the time the task is triggered to the time it starts executing. The wait time is meant to be 60 seconds, but I'm unreliably setting it to 40 seconds to counter the difference from the execution delay.

grim orbit
#

There are a couple of things that might be happening with slow start times:

Slow dequeuing times.
If you’re at your max concurrency on your account, then tasks have to complete before the next one will execute.

Spinning up a machine to run your code
If you do a lot of runs you get start times under 2.5 seconds, but for less frequent runs it can be longer. Also if you’re doing infrequent runs you will get longer start times at the moment.

This is our highest priority problem right now. First we’ll ship warm starts which are part of the new Run Engine which ships next month. That will improve situations where a run has just finished and we can quickly grab another from the same deployment. Then we’re working on faster cold starts. We think we can get the p95 to under 1 second.

twin plume
#

Yeah, I'm not running concurrent tasks at the moment. Is there a way I can get access to the Run Engine alpha? Would it be worth testing it? I'm happy to upgrade to a hobby plan to see if it makes a difference.

grim orbit
#

Yes the new run engine will help. We’ll be announcing it this month initially as an opt in. Keep an eye on Discord for when it’s available.

lament mesa
#

We're also shipping some other start improvements sooner than the new engine. A better cache for Docker images which should make starts faster