mongo update timeout
程序员文章站
2022-05-06 14:13:12
...
大量数据插入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)
推荐阅读
-
MySQL UPDATE更新语句精解第1/2页
-
mysql insert的几点操作(DELAYED,IGNORE,ON DUPLICATE KEY UPDATE )
-
python 限制函数执行时间,自己实现timeout的实例
-
mysql提示got timeout reading communication packets的解决方法
-
MsSQL数据导入到Mongo的默认编码问题(正确导入Mongo的方法)
-
mysql中错误:1093-You can’t specify target table for update in FROM clause的解决方法
-
Vue infinite update loop的问题解决
-
MySQL执行update语句和原数据相同会再次执行吗
-
win10开发必备:Visual Studio 2015 Update 1正式版下载汇总
-
ORACLE SQL-UPDATE、DELETE、INSERT优化和使用技巧分享