[英]MongoDB - serverStatus was very slow
When I run a multi-thread program which runs about 50 threads, and in each thread there are database operations, mongodb runs too slow and then service will be stopped.当我运行一个运行大约50个线程的多线程程序,并且在每个线程中都有数据库操作时,mongodb运行速度太慢,然后服务将停止。 in Mongodb log I see this message:
在 Mongodb 日志中,我看到此消息:
2017-12-13T09:24:50.226+0330 I COMMAND [ftdc] serverStatus was very slow: { after basic: 71, after asserts: 307, after backgroundFlushing: 358, after connections: 622, after dur: 653, after extra_info: 915, after globalLock: 977, after locks: 998, after network: 1008, after opLatencies: 1008, after opcounters: 1008, after opcountersRepl: 1008, after repl: 1030, after security: 1030, after storageEngine: 1061, after tcmalloc: 1293, after wiredTiger: 1627, at end: 2498 }
This is my thread code:这是我的线程代码:
def processor(*data):
for item in data[0]:
try:
col_articles_data.update({'_id': item['id']}, {'$set': {'processed': True}})
except:
Debug.PrintException()
What should I do?我该怎么办?
This indicates that your mongodb needs more RAM than you provisioned it.这表明您的 mongodb 需要的 RAM 比您预配的要多。 I can think of two ways of fixing the problem:
我可以想到两种解决问题的方法:
For more info read: https://groups.google.com/g/mongodb-user/c/Y-B_XShEquE有关更多信息,请阅读: https : //groups.google.com/g/mongodb-user/c/Y-B_XShEquE
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.