Does Koyeb suspend Bun processes with active timers but low HTTP traffic?

TLDR: timers (setTimeout, setInterval) stop running.

I’ve got a Bun webserver running in Docker. Starter plan, micro. 1 instance, 1 volume attached. The server has internal jobs scheduled through timers like settimeout or intervals. When I migrated to Koyeb a year ago, everything was fine. Now I see that the jobs are interrupted. I don’t see any error being logged and no reason to fail.
The Koyeb AI chatbox tells me :

For now, your timer issues are likely still related to the eBPF monitoring system we discussed earlier, but without the ability to change minimum instances, you’ll need to work around it differently - maybe restructuring how your scheduled jobs work or finding alternative approaches to background processing.

So, is that it, JS timers will get canceled randomly?
(and yes there is little traffic to the server at the moment)

Hi there,

If scale-to-zero is disabled, there is no reason for this to happen. (It seems the AI believes that you’re an instance with scale-to-zero enabled)

Do you have any code snippet to reproduce this issue?

Hi Yann. Yes the AI is mistaken. I do not have scale to zero because it’s disabled by default due to having a volume attached.

I was not able to figure out what’s going on. I’ve locked the Docker image version to oven/bun:1.3.5 when I was investigating. (I had it as oven/bun:1)
Had absolutely no trouble with the server until Koyeb’s outage on December 20th.

I deployed the same service (except I replaced the volume attached with an S3 like object storage) to Digital Ocean App Platform , using their Bun Buildpack (so no Docker) on the smallest instance 512 MB RAM | 1 Shared vCPU .
The service is working as expected. At the time of writing, it has been running all scheduled jobs for 2 days and errors are logged while the service keeps running without interruption.

For context: I’m not seeing errors in the logs on Koyeb. The job is querying paginated data from a 3rd party API. I can see it getting a couple of pages and then stop for no reason. If I restart the service, it will query again a few pages (sometimes more, sometimes less), then stop.

I’m not a Docker guru to debug this properly. I found out that Bun had issue with timers in the past but that’s supposed to be resolved.

Not having too much time to investigate, I decided to leave the service on DO at the moment. I haven’t tested Bun + Docker on their app platform due to an issue on their side.

I don’t have much of code to share here. I can give access to the repo if needed.

Thank you for your help

Just wanted to give some feedback. After roughly a week. I’ve started to see the same thing on DigitalOcean. Although it happens much less frequently. I’m going to test Deno instead of Bun.