Mongo DB:消息超出了允许的最大消息大小

¡嗨! 我刚开发的RoR应用程序与MongoDB一起工作,并正常工作。 我尝试了几个HTTP请求到邮递员的应用程序,也工作得很好!

当我使用Docker部署应用程序时,出现了任何请求之后出现的MongoDB错误:

MONGODB | 消息超出了允许的最大消息大小 最大值是50331648. ms_notifications_1 | 2017-09-29 21:16:48 +0000:HTTPparsing错误,格式错误request():#Puma :: HttpParserError:HTTP格式无效,parsing失败。

我会很感激如果有人有这个错误的解决scheme。 谢谢!

我的撰写文件:

version: '2' services: ms_notifications_db: image: mongo:latest container_name: "rancher-node1" ` environment: - MONGO_DATA_DIR=/data/db - MONGO_LOG_DIR=/dev/null volumes: - ./data/db:/data/db ports: - "27017:27017" command: mongod --smallfiles ` ms_notifications: build: . command: bash -c " rm -f tmp/pids/server.pid && bundle exec rails db:migrate && bundle exec rails s -p 3007 -b '0.0.0.0'" ports: - "3007:3007" depends_on: - ms_notifications_db