-
Notifications
You must be signed in to change notification settings - Fork 0
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
Retry "Launch Simulation" on server failure #281
Comments
Both on NGS and locally there should be no errors, so to test this you can just shut down the backend after you logged in so that attempting to launch a simulation will fail. When you do this, the frontend should tell you that the servers are busy and do a countdown, try again, show the same error/countdown, try again, and eventually give up and tell you that all the servers are busy. |
To clarify, this issue is not about handling a specific error that I'm seeing -- it's just an added measure to handle potential errors that might be raised by the server when e.g. it's under heavy load.
This might be because you have outdated simdata files. You can just delete the
This seems unrelated, and I haven't seen this error. Did all the panels look ok or was there something broken? |
Thanks for the clarification.
I'll try this. However, I'll also be sure not to use presets when testing.
All the panels seemed to have been working properly. I tried producing the error again but couldn't. If I do I'll take a closer look at the error. |
After clicking on the
LAUNCH SIMULATION
button in the config wizard, we might sometime get a 5xx error from the server. When that happens, instead of showing a popup with the error, it would be better to tell the user that our server are busy, and automatically retry the request after 10-15 seconds. If after a few attempts we still get an error, a regular popup should tell the user that all our server are busy.Since we already have a timeout modal, it would be nice to reuse it for the countdown before the retry. I looked into it briefly, however the timeout is not-blocking and returns immediately, so it didn't work.
Click to see a diff of my (not-working) attempt, which outlines the implementation.
This could be implemented in
launchSimulation
and/orhandleAxiosError
but, if possible, it should avoid duplicating code (both the one that handles the error, and the one that sends the request). It might also require an udpate to thetimeout
modal to make it async, so that you can await until the 10-15 pass before retrying and doing another iteration of the loop.The text was updated successfully, but these errors were encountered: