默认 mongo server维护连接的时间窗口是十分钟

  默认 单次从 server获取数据是101条或者 大于1M小于16M的数据

  所以默认情况下,如果10分钟内未能处理完数据,则抛出该异常。

  解决办法:

  1. 修改每批次获取数据量的条数,即batch size:

  collection.find(condition).batch_size(5)

  批量数需 估算十分钟内能处理的数据量

  2. 延长超时时间 需显示的关闭cursor

    cursor=db.images.find({}{'id':1,'image_path':1,'_id':0},no_cursor_timeout=True)

    for i in cursor:
     .....
     .....
    cursor.close()

mongodb pymongo.errors.CursorNotFound: Cursor not found, cursor id: 82792803897的更多相关文章

  1. [pymongo] pymongo.errors.CursorNotFound Exception

    由於find之後,loop執行時間過長導致timeout, cusor失效 解決方式有以下幾種: 1. 使用batch_size() cursor = collection.find({}).batc ...

  2. mongo大数据量更新服务端超时解决: Cursor not found, cursor id: 82792803897

    mongodb pymongo.errors.CursorNotFound: Cursor not found, cursor id: 82792803897 默认 mongo server维护连接的 ...

  3. [mongoDB]PyMongo Cursor Not Found Error

    Python跑一个aggregate脚本,报错:pymongo.errors.CursorNotFound: Cursor not found, cursor id: 35411720832 搜了下原 ...

  4. 【pymongo.errors】Cursor not found

    pymongo.errors.CursorNotFound: Cursor not found 故事背景:先从数据库中取得所有数据 db['test'].find(),然后对结果进行for循环,但是当 ...

  5. 使用pymongo连接mongodb时报错:pymongo.errors.OperationFailure: not authorized

    连接本机或局域网部署的mongodb时可以用以下方法: from urllib import parse from pymongo import MongoClient host = '*.*.*.* ...

  6. MongoDB - MongoDB CRUD Operations, Query Documents, Iterate a Cursor in the mongo Shell

    The db.collection.find() method returns a cursor. To access the documents, you need to iterate the c ...

  7. pymongo.errors.BulkWriteError错误排解

    在mongodb进行数据库操作的时候触发异常   pymongo Error: pymongo.errors.BulkWriteError: batch op errors occurred 这种问题 ...

  8. APP 链接ROS时出现pymongo.errors.ServerSelectionTimeoutError: localhost:27017 错误

    ROS版本上kinetic ,APP是官网开源的make a map,当app链接ROS进行建图时,会出现报错:pymongo.errors.ServerSelectionTimeoutError: ...

  9. cursor:hand与cursor:pointer的区别介绍

    cursor:hand 与 cursor:pointer 的效果是一样的,都像光标指向链接一样,光标变成手行. cursor:hand :IE完全支持.但是在firefox是不支持的,没有效果. cu ...

随机推荐

  1. c# RabbitMQ 发送消息

    参考地址:<C#使用RabbitMQ> C#操作RabbitMQ需要引用RabbitMQ的DLL,地址是:http://www.rabbitmq.com/releases/rabbitmq ...

  2. Vue路由开启keep-alive缓存页面

    mode:hash模式下: HTML部分: <template> <div id="app"> <keep-alive> <!--使用ke ...

  3. 湖南大学ACM程序设计新生杯大赛(同步赛)B - Build

    题目描述 In country  A, some roads are to be built to connect the cities.However, due to limited funds, ...

  4. 我对于react-router路由原理的学习

    目录 react-router依赖基础--history react-router是如何实现URL与UI同步 一 react-router依赖基础--history history是一个独立的第三方j ...

  5. 【栈模拟dfs】Cells UVALive - 3486

    题目链接:https://cn.vjudge.net/contest/209473#problem/D 题目大意:有一棵树,这棵树的前n个节点拥有子节点,告诉你n的大小,以及这n个节点各有的子节点个数 ...

  6. (转)Ubuntu 16.04 安裝Docker(PS:本文适用amd64位的ubuntu系统)

    1.前置安裝,確保你的系統是64位 $ sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ software-p ...

  7. 51nod1423 最大二"货" 单调栈

    枚举每个点作为次大值,用单调栈处理出左边 / 右边第一个比它大的数,直接回答 复杂度$O(n)$ #include <cstdio> #include <cstring> #i ...

  8. [BZOJ3676][APIO2014]回文串(Manacher+SAM)

    3676: [Apio2014]回文串 Time Limit: 20 Sec  Memory Limit: 128 MBSubmit: 3097  Solved: 1408[Submit][Statu ...

  9. 【20181027T3】山河令【DP套DP】

    原题 [错解] 一眼DP 哎好像能删成奇形怪状的 弃疗,主要是没时间了 [正解] 神仙DP 明显先设\(f(i,j)\)表示把\([i,j]\) 取完的最小代价 然后发现转移不了,因为可以拿很多块 但 ...

  10. Spring Cloud项目启动脚本

    #!/bin/bash source /etc/profile cd `dirname $0` BIN_DIR=`pwd` echo "$BIN_DIR"#项目名称 SERVER_ ...