Multiple Instances of Repl since the restoration this past weekend

There seems to be a bug where I have multiple instances of a repl running somehow. This is a very basic understanding of what seems to be happening. Basically my repl runs a local flask server. I first noticed the issue when I saw that I would occasionally get an error upon starting my server saying that the port is already in use - I never got an error like this before the restoration efforts. Now, I will occasionally load my repl editor and see that the server is not running but I can still interact with it and make requests over http as if it were running. This leads me to believe that there is somehow some sort of split between the machine(s) that the repl is running on vs what the editor is running on. Again, this may be a completely off-base understanding of the issue but something odd is definitely going on.

1 Like

@AJArshem I have experienced the error too. Try changing you Flask port to 8080 if it isn’t already,

2 Likes

Thanks for the reply! I do, already have the port set to 8080. Every now and again I’ll come back to my repl and it will show no console output and show the ‘Run’ button as if it is not running. However, it is still operating properly as a web server. It is becoming rather frustrating as it seems to be causing certain functionality to behave unpredictably.

1 Like

Hello @AJArshem. I have done a lot of coding with HTML/CSS/JS and I have noticed that the ‘Run’ button says Run, even if the repl is running in the webview tab. Hope this helps.

1 Like

Interesting, for my python flask server (which I have set as my always-on repl) it always used to stay in the ‘running’ mode while accessible via http. Then, if I stopped it, I could no longer access the available endpoints I have set up. Just seems to be some oddities with the new ui updates and after the restoration that don’t quite mesh with how it used to run.

@ShaneAtReplit you’ve been helpful on past posts of mine. Any tips here? My replit seems to randomly ‘split’ where there is one version that is the ‘running’ version accessible over http and one version not running which is where the ui points to. For example, I can begin a process on my flask server by making a get request, but the repl page shows not running. This makes it hard for me to check in on my service to see what the server is logging and diagnose errors. I keep having to periodically go in and run a ‘kill 1’ command to get things back in sync.

1 Like

Hey @AJArshem!

Thank you for bringing this to my attention. Can you send me the link to your Repl so I can take a look?

1 Like

Thanks Shane! It’s https://replit.com/@AJArshem/ftpsync, however it is a private repl, so let me know if you need me to temporarily adjust permissions. Seems to be still happening. I’ll pull up the repl to check the logs and see that it’s not running but when I ping one of the endpoints, it still appears to be running and processing data.

1 Like

Thanks! We will look into this and will follow up once we know more!

I was unable to reproduce this issue. Once the Repl was no longer running, I checked the repl.co URL and I was met with the intended error page:

If at all possible, could you record a loom.com video and share it in this thread? That way we can know exactly what you’re seeing and how you’re reproducing the issue!

@ShaneAtReplit unfortunately the issue only seems to occur randomly. I’ll open the repl page and it is already not running (run button visible instead of stop button). But I am still able to interact with it over http. If I manually stop the repl when it is running the issue does not happen. I’ll try and capture a loom the next time I see this happen. Could be a little while though as the issue has been sporadic. Thanks!
AJ

1 Like

Is it intended that both errors appear when a Repl is sleeping?

1 Like

That’s a bug related to hot-module-reload or similar systems which pulls in the same image twice. This is strictly a bug with old hosting and is not an issue with Deployments.

1 Like

Understood, I will await your reply!

1 Like

This is a current, and still active Deployment bug.

I have experienced something similar with deploying a Discord Bot on Autoscale.
I was told it was nothing to worry about and that I was using the wrong choice for Deployment!

Hope this helps!

@ShaneAtReplit , here is a screen recording. I haven’t had the issue in some time so was optimistic it had resolved itself but it reared its ugly head this afternoon.

Try changing the port.

Maybe browser cache is involved here? What if you kill 1 the Repl and then go to the repl.co page and hard-refresh using Ctrl+F5 or Ctrl+Shift+R? If it still works, try clearing the cache and cookies as well.

I wonder this because in the video, your site had missing styles and functionality when the Repl was off and once it was back on, that functionality was restored.

It doesn’t seem to be browser caching as the VIN I queried in the /getjsonfile route in the video was one I had not searched before so it would need to be referencing live data from the server. I believe the route that appeared to be missing data was due to the split as it is pulling the photo info from a local file on the server. Not entirely sure though, as I mentioned this has been a super odd one for me lol. It seems like the issues are much fewer and farther between than they had been previously so I take comfort in that.

@RedCoder, I have experimented with different ports. That was my initial fix for the issue because when this first began happening I would open the repl, see that it was not running and attempt to start it but then got an error stating that port 8080 was already in use. So I began catching that error and attempting other ports until I succeeded. But once I noticed it seemed to still be half ‘running’ on 8080 I stopped using this method as I did not want to fragment my data or cause further issues. So now I just check to see if the server can run on 8080 and if not it prints ‘unable to start the server’ which gives me notice that I need to ‘kill 1’ and start fresh.

Again, though, not happening very frequently at all anymore, so hoping (perhaps naively) that it’ll just go away lol

I’ve been facing the same issue. Will this bug be fixed soon?