Closed MarkAngler closed 5 months ago
disabled https, same issue
disabled debug, got a new error -
2024-04-09T16:17:56.859672955Z File "/opt/python/3.9.18/lib/python3.9/site-packages/gunicorn/workers/sync.py", line 135, in handle
2024-04-09T16:17:56.859677755Z self.handle_request(listener, req, client, addr)
2024-04-09T16:17:56.859682255Z File "/opt/python/3.9.18/lib/python3.9/site-packages/gunicorn/workers/sync.py", line 178, in handle_request
2024-04-09T16:17:56.859686855Z respiter = self.wsgi(environ, resp.start_response)
2024-04-09T16:17:56.859691055Z File "/tmp/8dc58afcd86fa09/antenv/lib/python3.9/site-packages/flask/app.py", line 1488, in __call__
2024-04-09T16:17:56.859732356Z return self.wsgi_app(environ, start_response)
2024-04-09T16:17:56.859737656Z File "/tmp/8dc58afcd86fa09/antenv/lib/python3.9/site-packages/flask_socketio/__init__.py", line 43, in __call__
2024-04-09T16:17:56.859741656Z return super(_SocketIOMiddleware, self).__call__(environ,
2024-04-09T16:17:56.859745556Z File "/tmp/8dc58afcd86fa09/antenv/lib/python3.9/site-packages/engineio/middleware.py", line 63, in __call__
2024-04-09T16:17:56.859749556Z return self.engineio_app.handle_request(environ, start_response)
2024-04-09T16:17:56.859753756Z File "/tmp/8dc58afcd86fa09/antenv/lib/python3.9/site-packages/socketio/server.py", line 430, in handle_request
2024-04-09T16:17:56.859758156Z return self.eio.handle_request(environ, start_response)
2024-04-09T16:17:56.859762856Z File "/tmp/8dc58afcd86fa09/antenv/lib/python3.9/site-packages/engineio/server.py", line 274, in handle_request
2024-04-09T16:17:56.859767756Z packets = socket.handle_get_request(
2024-04-09T16:17:56.859772156Z File "/tmp/8dc58afcd86fa09/antenv/lib/python3.9/site-packages/engineio/socket.py", line 90, in handle_get_request
2024-04-09T16:17:56.859777057Z return getattr(self, '_upgrade_' + transport)(environ,
2024-04-09T16:17:56.859781657Z File "/tmp/8dc58afcd86fa09/antenv/lib/python3.9/site-packages/engineio/socket.py", line 146, in _upgrade_websocket
2024-04-09T16:17:56.859786257Z return ws(environ, start_response)
2024-04-09T16:17:56.859790657Z File "/tmp/8dc58afcd86fa09/antenv/lib/python3.9/site-packages/engineio/async_drivers/gevent.py", line 54, in __call__
2024-04-09T16:17:56.859795357Z raise RuntimeError('The gevent-websocket server is not '
2024-04-09T16:17:56.859799757Z RuntimeError: The gevent-websocket server is not configured appropriately. See the Deployment section of the documentation for more information.
Fixed with custom startup cmd
gunicorn -k "geventwebsocket.gunicorn.workers.GeventWebSocketWorker" -w 1 -b 0.0.0.0:8000 app:app ?
Resolution above
Thank you for the issue and its solution. We will make sure to update the doc accordingly.
I don't know if you use Taipy Core features with scenario and data management, but Gunicorn has limitations when using execution mode. You could use our command line interface (taipy run ...
) to run Taipy.
I changed the port on the CMD and also in tp.run
, still see the same issue.
Could you describe your issue and how did you produce the error? @swateek
Description Deploying Taipy to Azure App Services results in 2024-04-09T13:28:03.433854674Z KeyError: 'Session is disconnected'. Pages eventually load, but take an extremely long time. App service is https, documentation only shows a http example. Full error
How to reproduce Deploy a https azure app service, web service
pages = { "/": root.root, "ProductServices": productservices.ProductServices, "EdmHandbookRag": edm.EdmHandbookRag }
tp_app = Gui(pages=pages)
if name == "main": tp_app.run(debug=True, use_reloader=True) # , async_mode='standalone' else:
Production mode, Azure Web Application runs the application with Gunicorn.
app = tp_app.run(run_server=False, port=8000, title="LLM", debug=True, ) #, async_mode='standalone'
Expected behavior No errors
Screenshots
Runtime environment Python 3.9, linux app service databricks_vectorsearch==0.28 langchain==0.1.14 langchain-community==0.0.31 langchain-core==0.1.40 langchain-text-splitters==0.0.1 langsmith==0.1.40 openai==1.16.2 taipy==3.1.1 taipy-config==3.1.1 taipy-core==3.1.1 taipy-gui==3.1.1 taipy-rest==3.1.1 taipy-templates==3.1.1
Acceptance Criteria