-
Notifications
You must be signed in to change notification settings - Fork 179
Description
We have a Shiny app running inside a docker container at a specific URL.
After going to the app and retrieving new data multiple times, which refreshes the DataTable with new data, suddenly we get an Ajax error and the table is empty, even though R reports no errors.
So, the app works several times, and then any further actions results in a broken table. All other components relying on new data (i.e. plots) still work, only the DT breaks!
Looking at the Network tab in Devtools, we get 404 errors:
Failed to load resource: the server responded with a status of 404 (Not Found)
<myURL>/session/fc012ccedd40a438092f8403d45c96a9/dataobj/<myDataTableID>?w=&nonce=79f70b402396a814
Each time we get a new table OR go to the next table page, a new request is sent and results in 404.
No other aspects of the app send http/XHR requests.
Potential cause
I believe the issue is that we have several containers running in parallel, serving multiple users at once. All containers are routed to the same URL.
From my understanding DataTable creates mini-endpoints that fetch new data when e.g. you fetch the next page, and those endpoints live at myURL/dataobj/table-id . After some time in the app, when the request is sent to the url listed above, it gets routed to a different container - and in that container, the endpoint is not created so the Ajax error occurs.
The user itself is not redirected as long as he stays in the same tab, but DataTable alone communicates in a different way than the rest of the Shiny session. So other components still works.
Does this explanation make sense? How can it be avoided while still serving multiple containers?