Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to stop auto update in production #525

Closed
HardikFefar opened this issue Jan 6, 2023 · 2 comments
Closed

how to stop auto update in production #525

HardikFefar opened this issue Jan 6, 2023 · 2 comments
Labels

Comments

@HardikFefar
Copy link

when we run application a few times in local and then suddenly, there is this message "The site is being updated. Please try again shortly." and app is not working for a while.

is there a way we can stop those auto update or they are not meant to be stopped at all?
we can run them manually when there is no traffic in the site though if needed

@HeyJoel
Copy link
Member

HeyJoel commented Jan 6, 2023

This is the distributed locking mechanism that prevents multiple concurrent auto-update processes running. It will also prevents the applicartion from running if there is an error applying the update, however if this was the case you would see an error message when running in development mode.

If you are seeing this message for an extended period, it is likely because the auto update process has been interrupted before it can finish or fail. In my experience this only really ever happens when debugging and shutting down the application while the auto-update process is running e.g. maybe you hit a breakpoint or exception in a hosted service or update command and then kill the application rather than letting it continue finishing startup.

The lock has a time out to work around this, which defaults to 10 minutes, this is an overly generous value and you can likely get away with a much shorter limit if your not customizing the auto-update process e.g. 2 min should still be quite generous, or even less for local development where you know there's no danger of multiple concurrent processes running. You can change this with the Cofoundry:AutoUpdate:ProcessLockTimeoutInSeconds settting.

There's no documented way to run the auto-update process manually, although obviously you can just target the database and run an instance of the site against it. Should you go down this route you can disable the auto-update process entirely with the Cofoundry:AutoUpdate:Disabled setting.

A full list of auto-update settings can be found here.

@HeyJoel HeyJoel closed this as completed Mar 18, 2023
@HeyJoel
Copy link
Member

HeyJoel commented Mar 18, 2023

Closing, no further info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants