The struggle continues. I have two apps. One lightweight, the other more complex - but nothing too dramatic. When using multi-app support, this second one never loads, and crashes Chrome (“Aw, snap”). Run in isolation on its own, it’s fine. Unfortunately, we can only have one uwsgi instance running our dash apps, so we need to use multi-app support.
I’ve tried running it locally with Dash’s flask as well as with 5 Uwsgi processes - same issue. 10+ calls to dash-update-component
per second before it keels over. Sometimes the layout loads, but rarely.
127.0.0.1 - - [14/Sep/2017 22:46:34] "POST /graph/line/_dash-update-component HTTP/1.1" 200
dash-core-components (0.12.5)
dash-html-components (0.7.0)
dash-renderer (0.9.0)
import dash_core_components as dcc
import dash_html_components as html
from app import app
server=app.server
# Import the apps from the apps folder based on filename
from apps import line,beehives
app.layout = html.Div([
dcc.Location(id='url', refresh=False),
html.Div(id='page-content')
])
@app.callback(Output('page-content', 'children'),
[Input('url', 'pathname')])
def display_page(pathname):
if pathname == '/graph/line/line_graph':
return line.layout
elif pathname == '/graph/line/beehives':
return beehives.layout
else:
return '404'
if __name__ == '__main__':
app.run_server(debug=True)
Some of the callbacks in beehives
are big - 20 inputs, all fed to one function. A lot of mysql involved, but very clean sql and no db issues. Can share the other files privately if anyone’s willing to help - I’m flat-out of ideas. The app, though complex, shouldn’t fall over like this in such a simple multi-app setup which makes me think there’s an underlying bug. Chrome’s Inspector isn’t much help unfortunately
Thanks
Will