VM deployed but stops running when away

Problem description:
I have a python code that is currently deployed and running as a VM. When I go away it stops running like it would as an undeployed program would.

Expected behavior:
The program continues running dispute the user - myself - not having it open in a window. This is the ‘always on’ functionality described in the VM description

Actual behavior:
Program times out after user is away for ~ 1 minute and when I come back it says I need to hit run again.

Steps to reproduce:

Bug appears at this link:

Device (Android, iOS, NA leave blank):
Desktop app version (Avatar menu->“Version”) or NA:
Plan (Free, Replit Core):

This is most likely because it isn’t being used.

If it’s a Reserved VM, then this shouldn’t be the case, as they’re never supposed to shutdown.

I’ve tried redeploying multiple times but continue to encounter this same error. I’ve even tried having the server ping itself as a keep awake function but this does not work either. Any other suggestions are much appreciated

Might I ask, are you deploying as Reserved VM or as Autoscale?

This is set up as a reserve BM web server

If it’s a webserver, then it should go down when not being used.

No, that should only happen on Autoscale.

Ok I will try changing it back to this, I had the same issue with it deployed as a background worker but I experienced the same issue before with this as well

Generally, streaming anything 24/7 is not going to last with any deployment with a Webserver because they aren’t constant,

having to rerun is most likely because it timed out.

Reference screenshots:

It should be lasting on Reserved VM, that’s the whole point of using one.

1 Like

I misunderstood, actually!

My guess is your program does not live on,
It exits,

So it doesn’t run all the time, just once.

This means its not being used, but it’s on your end and probably not Replit’s.

@keithneely I think there’s some confusion or perhaps I’m misunderstanding. Clicking “run” or “stop” in the workspace does not affect your deployment.

The workspace is typically used for local testing. Your deployment gets it own space:


Hello, thank you for this I think I understand now. I do have a question for how the “snapshot” of your code for how the deployments work. If I have a local database file wouldnt this overwrite the snapshot database file every time I redeploy? And wouldnt this local database file no longer be getting updated as the deployed one is? If this is the case, I really do not want to change the structure of how my finished codes handle data management, especially if they are larger in size

Looking through the other forum posts it appears what I’ve been working on is no longer suitable for this website do to the required functionality being phased out. I bid you all farewell

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.