Old deployment never stops

Problem description:
I deployed a Reserved VM for my project (link below), which is a background worker. An hour after shutting down the deployment, it continues to send API calls to other services. I tried to create another deployment to see if it would overwrite it, to no avail.

Expected behavior:
Deployment shutdown

Actual behavior:
Deployment seems to continue to run in the background, but I can’t see it in the Console.

Steps to reproduce:
Created Reserved VM for background worker. Then shut down the deployment.

Bug appears at this link:
https://replit.com/@kenxyz/replitlongrunningscripttemplate

Browser: Chrome
Plan (Pro Plan): Pro

2 Likes

Hi @kenxyz . Thanks for reporting this issue.

At least from the deployment side, it does seem like this is all shutdown. Would you be able to share of screenshot of what you see on the Deployments pane? Any other details you can share about what you are seeing with the API calls are appreciated as well. Thanks so much.

3 Likes

@SuzyAtReplit thank you. Sure. Is there a private way to share screenshots?

You can use private messages: click on a user’s profile, you should see a summary of their profile pop up, and there should be a ‘message’ button you can click. :smile:

3 Likes

@SuzyAtReplit Sending you screenshots now by private message

  • the deployment is supposed to be shut down from what I can see, it does not appear in Deployments anymore.
  • however I am still getting pings from that Deployment in my other service “basic_datastore”. Sending you these pings too. The API calls emanating from the deployment to this other service are coming from IP 127.0.0.1 apparently.

This suggests that the Deployment is hanging but still running somewhere.

Thank you so much @kenxyz . I’m looking into it with our teams internally. Appreciated the screenshots via private message. I’ll let you know when I have an update to share.

3 Likes

Hi @kenxyz . I have an update to share and happy that I was able to collaborate with the team so quickly. We can give a lot of credit to @lincoln-replit for his insights.

From what I understand, all requests in deployment have the appearance of coming from 127.0.0.1, since the local proxy server that handles incoming requests runs on the same machine as the user application. We’re working on fixing this so that the Host header is preserved, which will make these logs more useful. In the meantime, users can print out the value of the X-Forwarded-Host header to see where the requests are coming from.

We have confirmed that the reserved VM deployment for the https://replit.com/@kenxyz/replitlongrunningscripttemplate Repl is not still running. So you should be all set. I hope this information is helpful!

3 Likes

thank you @SuzyAtReplit I can confirm that the pings have stopped. Not sure why though, or what I did wrong before, if you guys didn’t stop any deployment yourselves.

1 Like

Thank you @kenxyz ! I don’t think we did anything other than check on its status, but I’m glad the pings have stopped. I’ll keep an eye out if I hear similar behavior from others in the future.

1 Like