我遇到了奇怪的情况,我正在使用 11.11 版本玩 2.5.1。我的应用程序在本地 mongodb 上运行良好。当我在 AWS 或 Google 计算上启动应用程序时,它在 collection.find 期间被卡住,因为事实上任何类型的收集操作都被卡住了。我已经在实例本身本地安装了 mongodb,我可以通过 shell 连接并将集合添加到 mongodb。
同样在数字海洋上工作得很好
有人可以帮我出什么问题吗
配置
mongodb.uri = "mongodb://"${?MONGO_HOST}":"${?MONGO_PORT}"/service_collection"
mongo-async-driver {
akka {
loggers = ["akka.event.slf4j.Slf4jLogger"]
loglevel = DEBUG
}
}
以下来自我的构建和插件文件。
"org.reactivemongo" %% "play2-reactivemongo" % "0.11.11"
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.5.1")
反应式 mongo 日志
[info] application - ReactiveMongoApi starting...
[info] application - ReactiveMongoApi successfully configured with DB 'service_collection'! Servers:
[127.0.0.1:27017]
在 mongodb 方面,这些是以下日志,我没有看到任何从日志到达 mongodb 的查询。
MongoDB日志
Sat Apr 9 01:20:25.891 [initandlisten] opening db: local
Sat Apr 9 01:20:25.892 [initandlisten] enter repairDatabases (to check pdfile version #)
Sat Apr 9 01:20:25.892 [initandlisten] local
Sat Apr 9 01:20:25.892 [initandlisten] service_collection
Sat Apr 9 01:20:25.892 [initandlisten] opening db: service_collection
Sat Apr 9 01:20:25.893 [initandlisten] done repairDatabases
Sat Apr 9 01:20:25.893 [initandlisten] run command local.$cmd { create: "startup_log", size: 10485760, capped: true }
Sat Apr 9 01:20:25.893 [initandlisten] opening db: local
Sat Apr 9 01:20:25.893 [initandlisten] create collection local.startup_log { create: "startup_log", size: 10485760, capped: true }
Sat Apr 9 01:20:25.893 [initandlisten] command local.$cmd command: { create: "startup_log", size: 10485760, capped: true } ntoreturn:1 keyUpdates:0 reslen:75 0ms
Sat Apr 9 01:20:25.893 [initandlisten] insert local.startup_log ninserted:1 keyUpdates:0 0ms
Sat Apr 9 01:20:25.893 [initandlisten] fd limit hard:64000 soft:64000 max conn: 51200
Sat Apr 9 01:20:25.893 [initandlisten] waiting for connections on port 27017
Sat Apr 9 01:20:25.893 BackgroundJob starting: TTLMonitor
Sat Apr 9 01:20:25.893 BackgroundJob starting: PeriodicTask::Runner
Sat Apr 9 01:20:25.893 BackgroundJob starting: ClientCursorMonitor
Sat Apr 9 01:20:25.893 [websvr] fd limit hard:64000 soft:64000 max conn: 51200
Sat Apr 9 01:20:25.894 [websvr] admin web console waiting for connections on port 28017
Sat Apr 9 01:20:25.894 BackgroundJob starting: snapshot
Sat Apr 9 01:20:33.471 [initandlisten] connection accepted from 127.0.0.1:58316 #1 (1 connection now open)
Sat Apr 9 01:20:33.473 [initandlisten] connection accepted from 127.0.0.1:58317 #2 (2 connections now open)
Sat Apr 9 01:20:33.473 [initandlisten] connection accepted from 127.0.0.1:58318 #3 (3 connections now open)
Sat Apr 9 01:20:33.475 [initandlisten] connection accepted from 127.0.0.1:58319 #4 (4 connections now open)
Sat Apr 9 01:20:33.475 [initandlisten] connection accepted from 127.0.0.1:58320 #5 (5 connections now open)
Sat Apr 9 01:20:33.475 [initandlisten] connection accepted from 127.0.0.1:58321 #6 (6 connections now open)
Sat Apr 9 01:20:33.477 [initandlisten] connection accepted from 127.0.0.1:58322 #7 (7 connections now open)
Sat Apr 9 01:20:33.477 [initandlisten] connection accepted from 127.0.0.1:58323 #8 (8 connections now open)
Sat Apr 9 01:20:33.477 [initandlisten] connection accepted from 127.0.0.1:58324 #9 (9 connections now open)
Sat Apr 9 01:20:33.477 [initandlisten] connection accepted from 127.0.0.1:58325 #10 (10 connections now open)