deploy to Google Cloud Run and it reloads in 5 minutes #1763
Replies: 3 comments 1 reply
-
Yes, long polling is a feasible solution. It will eat a bit more resources than websocket and is a bit slower in certain conditions but you wont notice it in the grand scope of things. Another way would be to increase the timeout on Cloud Run. But I think it can not be extended for more than an hour. A few hours ago I created a feature request to not reload the page when connection is lost: #1761. What a coincidence. |
Beta Was this translation helpful? Give feedback.
-
I used the latest version of NiceGUI and deployed to Cloud Run. I have not configured anything special, but it seems to be working well. |
Beta Was this translation helpful? Give feedback.
-
Edit: Asked my question here -> #2891 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Question
I have a NiceGUI app deployed to Google Cloud Run. After 5 minutes of displaying the page, the page automatically reloads. When it reloads, all values in the input form that are being edited are lost. Do you have an idea to avoid reloading?
Cloud Run times out requests in 5 minutes by default, and when Cloud Run times out requests, the WebSocket connection disconnects, and NiceGUI seems to reload when the WebSocket connection disconnects.
I figured out a way. Using long polling seems to extend the request timeout.
Is this method correct? Is there another way? Is it possible to reconnect WebSocket without reloading?
Beta Was this translation helpful? Give feedback.
All reactions