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

Do not kill frontend isolate on uncaught exceptions. #4672

Merged
merged 3 commits into from
Mar 30, 2021

Conversation

isoos
Copy link
Collaborator

@isoos isoos commented Mar 26, 2021

  • pub.dev is down (global outage) #4663
  • uncaught exceptions are only logged
  • using stderr instead of print to make these errors stand out from the rest
  • if the frontend isolate exits for a reason, it still restarts it with an ever-increasing delay

@isoos isoos requested a review from jonasfj March 26, 2021 10:57
@google-cla google-cla bot added the cla: yes label Mar 26, 2021
@jonasfj
Copy link
Member

jonasfj commented Mar 26, 2021

Let's discuss this next week.. I see pros/cons I'm both directions.

For example: if some internal thing is failing persistently, and this causes 5xx responses, then it might be preferable to restart.

An unhandled exception at this levels typically implies undefined behavior, crashing and restarting is reliable way to recover.

Maybe we want to limit number of times we allow a restart. Like restart on first error, then avoid restarting due to unhandled errors for 5, 10, 20min, or something like that. That would degrade the service more gracefully.

@isoos
Copy link
Collaborator Author

isoos commented Mar 26, 2021

Like restart on first error, then avoid restarting due to unhandled errors for 5, 10, 20min, or something like that. That would degrade the service more gracefully.

Done, with the frontendStarted as controlling for time. On the default service we'll have 4 isolates, so it will start by 4 min protection, then 5 minutes, ... up to 20 minutes maximum.

Copy link
Member

@jonasfj jonasfj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a suggestion... Overall this looks good.

app/lib/service/entrypoint/_isolate.dart Outdated Show resolved Hide resolved
@isoos isoos merged commit daf118b into dart-lang:master Mar 30, 2021
@isoos isoos deleted the isolate-kill branch March 30, 2021 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants