I seem to run into this issue as well, but the problem is it is intermittent.
Versions: rasa==1.6.1, rasa_sdk==1.6.1, sanic==19.9.0.
Worse issue is bot gets frozen, and cannot recover unless restarted. There is only one client connecting to it, and it is managed by our team and only uses http communication.
error log:
[2020-03-09 15:21:58 +0000] [1] [ERROR] Exception occurred while handling uri: unknown
Traceback (most recent call last):
File "/build/lib/python3.6/site-packages/sanic/server.py", line 273, in data_received
self.parser.feed_data(data)
File "httptools/parser/parser.pyx", line 193, in httptools.parser.parser.HttpParser.feed_data
httptools.parser.errors.HttpParserInvalidMethodError: invalid HTTP method
[2020-03-09 15:21:59 +0000] [1] [ERROR] Exception occurred while handling uri: unknown
Traceback (most recent call last):
File "/build/lib/python3.6/site-packages/sanic/server.py", line 273, in data_received
self.parser.feed_data(data)
File "httptools/parser/parser.pyx", line 193, in httptools.parser.parser.HttpParser.feed_data
httptools.parser.errors.HttpParserInvalidMethodError: invalid HTTP method
Startup: (Note we use the wealthBotRestInput (custom channel) to extract some metadata. This is a subclass of the normal Rest channel with the get_metadata
method filled up. Thats the only difference.
/webhooks/wealthBotRestInput GET custom_webhook_WealthBotRestInput.health,
[2020-03-10 00:18:22.675 DEBUG rasa.core.utils:utils.py:250] Available web server routes: ,
/conversations/<conversation_id>/messages POST add_message,
/conversations/<conversation_id>/tracker/events POST append_events,
/webhooks/rasa GET custom_webhook_RasaChatInput.health,
/webhooks/rasa/webhook POST custom_webhook_RasaChatInput.receive,
/webhooks/rest/webhook POST custom_webhook_RestInput.receive,
/webhooks/rest GET custom_webhook_RestInput.health,
/model/test/intents POST evaluate_intents,
/webhooks/wealthBotRestInput/webhook POST custom_webhook_WealthBotRestInput.receive,
/model/test/stories POST evaluate_stories,
/domain GET get_domain,
/conversations/<conversation_id>/execute POST execute_action,
/socket.io OPTIONS handle_request,
/version GET version,
/model DELETE unload_model,
/webhooks/websocket GET websocket_webhook.health,
/model/train POST train,
/model/predict POST tracker_predict,
/status GET status,
/conversations/<conversation_id>/tracker GET retrieve_tracker,
/conversations/<conversation_id>/story GET retrieve_story,
/conversations/<conversation_id>/tracker/events PUT replace_events,
/conversations/<conversation_id>/predict POST predict,
/model/parse POST parse,
/ GET hello,
/model PUT load_model,
[2020-03-10 00:18:22.675 INFO root:run.py:183] Starting Rasa server on http://localhost:5005,
[2020-03-10 00:18:22.675 DEBUG rasa.core.utils:utils.py:508] Using the default number of Sanic workers (1).
We are hoping to move this into production very soon, and any help in identifying the issue would really be appreciated. The only solution when the bot encounters this is to restart.