mongo update timeout
程序员文章站
2022-06-12 22:29:35
...
大量数据插入mongo的时候发生了timeout异常,提示UPDATE失败:
PHP Fatal error: Uncaught exception 'MongoCursorTimeoutException' with message 'cursor timed out (timeout: 10000, time left: 10:0, status: 0)
PHP Fatal error: Uncaught exception 'MongoCursorTimeoutException' with message 'cursor timed out (timeout: 10000, time left: 10:0, status: 0)
MongoDB Support => enabled
Version => 1.3.4
phpinfo()
PHP Version => 5.4.11
尝试了以下参数,均无效,
array('connectTimeoutMS'=>30000, 'socketTimeoutMS'=>30000, 'wTimeout'=>30000, 'w'=>0)
求解.
PHP Fatal error: Uncaught exception 'MongoCursorException' with message 'Couldn't get connection: Failed to connect to: localhost:26011: send_packag
e: error reading from socket: cursor timed out (timeout: 10000, time left: 10:0, status: 0)' in /data1/www/ifilmp.com/console/SocialGraphTransform/fu
nc/ToFollowing.php:76
Stack trace:
#0 /data1/www/ifilmp.com/console/SocialGraphTransform/func/ToFollowing.php(76): MongoCollection->update(Array, Array, Array)
#1 /data1/www/ifilmp.com/console/SocialGraphTransform/process/run.php(10): ToFollowing->run()
#2 {main}
thrown in /data1/www/ifilmp.com/console/SocialGraphTransform/func/ToFollowing.php on line 76
回复内容:
大量数据插入mongo的时候发生了timeout异常,提示UPDATE失败:
PHP Fatal error: Uncaught exception 'MongoCursorTimeoutException'
with message 'cursor timed out
(timeout: 10000, time left: 10:0, status: 0)
MongoDB Support => enabled
Version => 1.3.4
phpinfo()
PHP Version => 5.4.11
尝试了以下参数,均无效,
array('connectTimeoutMS'=>30000, 'socketTimeoutMS'=>30000, 'wTimeout'=>30000, 'w'=>0)
求解.
PHP Fatal error: Uncaught exception 'MongoCursorException' with message 'Couldn't get connection: Failed to connect to: localhost:26011: send_packag
e: error reading from socket: cursor timed out (timeout: 10000, time left: 10:0, status: 0)' in /data1/www/ifilmp.com/console/SocialGraphTransform/fu
nc/ToFollowing.php:76
Stack trace:
#0 /data1/www/ifilmp.com/console/SocialGraphTransform/func/ToFollowing.php(76): MongoCollection->update(Array, Array, Array)
#1 /data1/www/ifilmp.com/console/SocialGraphTransform/process/run.php(10): ToFollowing->run()
#2 {main}
thrown in /data1/www/ifilmp.com/console/SocialGraphTransform/func/ToFollowing.php on line 76
$cursor = $collection->find();
$cursor->timeout(-1); # (-1 is no timeout)
推荐阅读
-
mongo分布式锁Java实现方法(推荐)
-
XMind 8 Update 7破解补丁中文授权一键注册安装破解教程(免序列号)
-
思维导图XMind 8 Pro安装教程及Update破解补丁破解方法(附序列号)
-
简单了解标准SQL的update语句三种用法
-
windows 7/8安装新硬件时如何逃过windows update?解决办法详解
-
Win10 Creators Update创作者更新定型:第三次重磅大补
-
安装程序不能验证Update.inf文件的完整性,请确定加密服务正在此计算机上运行
-
VS2015 update2安装历程
-
VS2015在升级到Update2之后运行Cordova项目异常的解决方案
-
VS2015 Update2 构建 Android 程序问题汇总