Inconsistent mouse over behaviour between local and EC2 instance, same package versions


I have done local development getting my dashboard to where i want it and have deployed to a small EC2 instance (with some nginx config stuff to do https redirects) however I am getting different results between my local and remote instances.

I have attached some gifs showing the two cases. What I am doing is plotting a barchart based on some data (which shows means and quantiles) and then i have a mouse over callback to plot the histogram of the underlying data next to it. This works great on my local machine for all the datasets i have tried.

However, on the remove machine it only works for certain datasets, in other cases it shows ‘updating’ but nothing happens. Note, it does not even trigger the call back (which i can see by monitoring the dash output directly). I have verified that all underlying package versions are the same, which are


Actually remote had a newer version of plotly (4.9 i think) and i downgraded to see if that helped but it did not.

The call back function is

@app.callback(Output('transit-stats-plot2','figure'), [Input('transit-storage','data'), Input('transit-stats-plot','hoverData')])
def test(df_json, hover_data):
	print('mouseover callback')
	df = pd.DataFrame(json.loads(df_json))
	if hover_data is not None:
		lane = hover_data['points'][0]['label']
		lane = '-1'
	if len(df)> 0:
		times = df[df['lane'] == lane]['actual_transit'].tolist()
		times = []
	return calculations.histogram(times)

and what i have found is if i remove the storage input, the remote call back fires (though this is not useful as obviously i need that data!). I found another thread suggesting i had to specify a type for the storage so i did but to no avail (i tried session and memory)

The store is defined as


Any ideas?

LOCAL VERSION (only showing 1 dataset, works for all)

REMOTE VERSION (works on 2nd dataset shown not first)

Actually looking at the browser console i see i also get a ‘failed to load resource 413 request entity too large’ only on the remote one, which seems to be the culprit! Which is really odd because if I go to one of the datasets that does work and back to one that doesn’t, the one that didn’t work before does!

EDIT: doing some more digging it turns out the default data size for nginx was restricting the plot being filled (which is weird). Anyway, increasing the max of that has solved the problem!