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

Auto-update locked #528

Open
JornWildt opened this issue Mar 18, 2023 · 2 comments
Open

Auto-update locked #528

JornWildt opened this issue Mar 18, 2023 · 2 comments

Comments

@JornWildt
Copy link

Every now and then, during development, the website fails to start - and the console only states:

info: Cofoundry.Web.AutoUpdateHostedService[0]
      Process failed, retrying in 5 seconds

No further info is given. It took me a while to guess that the singular entry in AutoUpdateLock table, column "IsLocked" should be changed manually from False to True. No exact idea why, but it fixes the problem.

Apparently it is one of the failure modes of auto update that doesn't get a useful error message attached. It would be nice if the error message stated something like "Seems like the previous auto update failed and got stuck in a unhealthy state. Try XXX to restart the process".

I don't know how it happens - but it is most likely a result of a quick rebuild from VS2022 while the auto update is running?

@HeyJoel
Copy link
Member

HeyJoel commented Mar 20, 2023

Some more info in #525.

Perhaps it is due to a quick rebuild, I'm not sure if the new hot reload compilation feature would mess with it either? The issue does seem to be limited to dev and I only see it when I force shut down while debugging the auto-update process. I can't imagine many people do that, but people do occasionally log an issue for it.

I don't think there's not much to be done to work around that without risking multiple update processes running concurrently. Perhaps in development mode we can be more tolerant or show a button to unlock the process.

@JornWildt
Copy link
Author

I assume it happens because I compile-and-run from VS2022 while it is auto-updating, which restarts the website in the middle of the auto update, leaving it in the invalid state - or if I kill the process somehow else. Not much to do about that.

But you could add to the error message "This may happen during development, blah blah. If the problem does not go away - and you are sure there are no other website processes running - then try to XXXX"

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

No branches or pull requests

2 participants