bash - 错误 R14(超出内存配额)和错误 R10(启动超时)-> Web 进程未能在启动后 60 秒内绑定到 $PORT
问题描述
我正在 Heroku 上部署 RASA 聊天机器人,我正在使用以下 Docker 和脚本文件。服务器正在完美启动,但我认为模型提取可能存在问题。我无法得到。
Dockerfile
FROM rasa/rasa:1.9.7
USER root
ENTRYPOINT []
ADD . /app/
RUN pip install rasa[spacy]
RUN python -m spacy download en_core_web_md
RUN python -m spacy link en_core_web_md en
RUN ls /app
RUN chmod +x /app/server.sh
CMD /app/server.sh
credentials.yml --debug
服务器.sh
rasa run -m models --cors "*" --enable-api --port $PORT --endpoints endpoints.yml --credentials credentials.yml --debug
以下轨迹来自heroku logs -t
2020-06-09T11:25:15.037081+00:00 heroku[web.1]: State changed from crashed to starting
2020-06-09T11:25:49.798297+00:00 heroku[web.1]: Starting process with command `/bin/bash -o pipefail -c /app/server.sh`
2020-06-09T11:25:56.027748+00:00 app[web.1]: 2020-06-09 11:25:56 DEBUG rasa.core.utils - Available web server routes:
2020-06-09T11:25:56.027812+00:00 app[web.1]: /conversations/<conversation_id>/messages POST add_message
2020-06-09T11:25:56.027813+00:00 app[web.1]: /conversations/<conversation_id>/tracker/events POST append_events
2020-06-09T11:25:56.027815+00:00 app[web.1]: /webhooks/rasa GET custom_webhook_RasaChatInput.health
2020-06-09T11:25:56.027815+00:00 app[web.1]: /webhooks/rasa/webhook POST custom_webhook_RasaChatInput.receive
2020-06-09T11:25:56.027816+00:00 app[web.1]: /webhooks/rest GET custom_webhook_RestInput.health
2020-06-09T11:25:56.027816+00:00 app[web.1]: /webhooks/rest/webhook POST custom_webhook_RestInput.receive
2020-06-09T11:25:56.027824+00:00 app[web.1]: /model/test/intents POST evaluate_intents
2020-06-09T11:25:56.027825+00:00 app[web.1]: /model/test/stories POST evaluate_stories
2020-06-09T11:25:56.027825+00:00 app[web.1]: /conversations/<conversation_id>/execute POST execute_action
2020-06-09T11:25:56.027826+00:00 app[web.1]: /domain GET get_domain
2020-06-09T11:25:56.027826+00:00 app[web.1]: /socket.io POST handle_request
2020-06-09T11:25:56.027826+00:00 app[web.1]: / GET hello
2020-06-09T11:25:56.027827+00:00 app[web.1]: /model PUT load_model
2020-06-09T11:25:56.027827+00:00 app[web.1]: /model/parse POST parse
2020-06-09T11:25:56.027828+00:00 app[web.1]: /conversations/<conversation_id>/predict POST predict
2020-06-09T11:25:56.027829+00:00 app[web.1]: /conversations/<conversation_id>/tracker/events PUT replace_events
2020-06-09T11:25:56.027830+00:00 app[web.1]: /conversations/<conversation_id>/story GET retrieve_story
2020-06-09T11:25:56.027830+00:00 app[web.1]: /conversations/<conversation_id>/tracker GET retrieve_tracker
2020-06-09T11:25:56.027830+00:00 app[web.1]: /webhooks/socketio GET socketio_webhook.health
2020-06-09T11:25:56.027831+00:00 app[web.1]: /status GET status
2020-06-09T11:25:56.027831+00:00 app[web.1]: /model/predict POST tracker_predict
2020-06-09T11:25:56.027832+00:00 app[web.1]: /model/train POST train
2020-06-09T11:25:56.027832+00:00 app[web.1]: /conversations/<conversation_id>/trigger_intent POST trigger_intent
2020-06-09T11:25:56.027832+00:00 app[web.1]: /model DELETE unload_model
2020-06-09T11:25:56.027833+00:00 app[web.1]: /version GET version
2020-06-09T11:25:56.027882+00:00 app[web.1]: 2020-06-09 11:25:56 INFO root - Starting Rasa server on http://localhost:17793
2020-06-09T11:25:56.028133+00:00 app[web.1]: 2020-06-09 11:25:56 DEBUG rasa.core.utils - Using the default number of Sanic workers (1).
2020-06-09T11:25:56.029616+00:00 app[web.1]: 2020-06-09 11:25:56 INFO root - Enabling coroutine debugging. Loop id 94472838346280.
2020-06-09T11:25:56.345896+00:00 app[web.1]: 2020-06-09 11:25:56 DEBUG rasa.model - Extracted model to '/tmp/tmp6ebr6r7s'.
2020-06-09T11:26:03.846339+00:00 heroku[web.1]: Process running mem=685M(133.9%)
2020-06-09T11:26:03.848858+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)
2020-06-09T11:26:25.775231+00:00 heroku[web.1]: Process running mem=909M(177.7%)
2020-06-09T11:26:25.777768+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)
2020-06-09T11:26:34.617203+00:00 app[web.1]: 2020-06-09 11:26:34 INFO rasa.nlu.components - Added 'SpacyNLP' to component cache. Key 'SpacyNLP-en'.
2020-06-09T11:26:34.715295+00:00 app[web.1]: 2020-06-09 11:26:34 DEBUG rasa.utils.tensorflow.models - Loading the model ...
2020-06-09T11:26:35.297208+00:00 app[web.1]: 2020-06-09 11:26:35.296743: E tensorflow/stream_executor/cuda/cuda_driver.cc:351] failed call to cuInit: UNKNOWN ERROR (303)
2020-06-09T11:26:41.647385+00:00 app[web.1]: 2020-06-09 11:26:41 DEBUG rasa.utils.tensorflow.models - Finished loading the model.
2020-06-09T11:26:41.648183+00:00 app[web.1]: 2020-06-09 11:26:41 DEBUG rasa.utils.tensorflow.models - Building tensorflow prediction graph...
2020-06-09T11:26:47.461993+00:00 heroku[web.1]: Process running mem=979M(191.2%)
2020-06-09T11:26:47.463550+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)
2020-06-09T11:26:49.828941+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
解决方案
推荐阅读
- python-3.x - 如何将一维张量转换为图中的标量值?
- typescript - 为什么这个 TypeScript 详尽的开关检查不起作用?
- android - 浓缩咖啡“与所选视图不匹配”用于回收站视图
- azure-ad-b2c - 为 SaaS 多租户应用程序提供客户品牌的登录体验
- c++ - ns-3 日志记录 - 输出没有日志
- java - 如何通过spring boot批处理JdbcBatchItemWriter()将java Char插入MariaDB CHAR(1)
- linux - 如何提供“每个客户”隔离的 linux 环境(低成本/自动化/可扩展)
- angular - 如何在登录页面上禁用面包屑
- flutter - 如何将字符串用作对象或类
- rust - 如何从 image::ImageBuffer 到 actix_web::HttpResponse