Hi,
Once in a while I check my static and Golang app running on DO app platform and it appears that they usually rebuild once a day or something?
What could be the reason behind this? I was planning on saving keys to a hash map for batch insert into my database, but that wouldn’t be possible if the server unpredictably redeploys once in a while.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

đź‘‹ @Jellybean82

App Platform does not redeploy apps on a schedule. There are several triggers that can cause redeploys:

  • If deploy on push is enabled, we will deploy everytime a commit is pushed to the selected branch
  • If the deploy button is pressed
  • If the App spec changes (eg. adding an environment variable in the UI)
  • On App Platform maintenance

Regarding the last point, if an App Platform app is on a node that goes down, or the cluster is having issues we will automatically deploy another version and transfer traffic to that new instance. This is how we keep your app up during outages, hardware failure, and big storms.

Because of this it is not recommended to store any state that is not easily recreatable. If the keys you mentioned are easily reproducible then it shouldn’t be a problem but that would need to be built into the logic of your app.

We are looking at adding attached volumes that will persist between app deploys in the future, though I don’t have a timeline on that.

  • Are you guys doing a lot of maintenance then? I deployed my static app 4 days ago, and my server 3 days ago. Both in the Amsterdam region. Both redeployed respectively 6 and 12 hour ago, and I’m pretty sure that it happened before that. But I can’t review it from the app platforms dashboard because it only shows logs for the current deployment.

    I guess the server gets killed so I could implement something like this on my server app
    https://github.com/gin-gonic/examples/blob/master/graceful-shutdown/graceful-shutdown/server.go

    • To my knowledge we haven’t done any maintenance in AMS3 recently.

      You should be able to see build logs for all deployments under the deployment tab. All deployments will appear under there, including maintenance deploys.

      If you’d like us to take a look at your app deployments please file a support ticket: https://do.co/2RvJI2Y

      • Thanks @crashoverride, I’ve submitted ticket #4268218 with some screenshots attached to it.

        Regards

        • đź‘‹ @Jellybean82

          Thank-you for the screenshots they were extremely helpful in understanding the problem.

          The “Last Deployed” timestamp is using deployment timestamps but also includes the last time our DNS domain checks are run. This is a bug and we are working on a fix. It should be noted, that no deployment is happening, this is just erroneous timestamp showing up.

          The deployments listed in the Deployment tab are accurate to the actual deployments that have happened..

Submit an Answer