I created a dash application in python, and everything runs fine on my local virtual environment.
When I try to deploy it to elasticbeanstalk on AWS, I am having this issue where the page gets stuck loading the first time you click on the link. If you exit the page, and then return to the link, everything works fine. If I try to open the application in a private browser, or if I reload the application, I have this same issue.
The app itself has around 5 different main pages, with around 2-10 callbacks per page. It is dynamically reading in csv’s stored in S3 buckets, and then slices the data depending on the callbacks (via dropdowns) and plotting them using the plotly express library.
I checked the error logs, and saw this warning pop up a couple of times. Could the issue be related to too much data being read in dynamically? I tried using the most basic AWS Free tier configuration, and then tried the High Availability configuration which contains a load balancer, and had the same issues and warning message with both.
It might just be because of how the whole setup works (mostly to save costs).
You could verify in AWS that there’s actually resources ready to serve your request and not needed to be allocated somehow, explaining the delay.
I just saw the following error message pop up in the developer console while debugging things locally. Any ideas on what could be happening here?
react_devtools_backend.js:4012 Warning: Can’t perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.
I think I have isolated the issue to this section of my code. When I set ‘display’:‘none’ for the Div containing a dash data table, the max call stack issue occurs. If I do not set the display to be none, the app runs fine.
This is the section of code for the div causing the issues:
html.Div(data_table(metric_name + '_table'),
id = metric_name + '_table_div',
data_table is a function that creates and styles a data table. It is defined as so: