mongo抛出异常:com.mongodb.MongoException: Lock not granted. Try restarting the transaction 解决方式
来源:互联网 发布:易语言qq登陆器源码 编辑:程序博客网 时间:2024/06/07 05:11
原因是使用findandmodify中的query 条件对应的字段没有建索引,导致mongo查询缓慢,形成工作队列,在mongo中建好索引后问题得到解决。
db.demo.createIndex({"id": 1}, {name: "index_id"});
参考链接:点击打开链接
I have some problem.
I am actually getting this error because of a lot updates without the right index.
It looks like each update requires too much time, so the queue of operations increases, and a lock related timeout is fired, and the operations on the queue are dropped out.After having setted the index up, the error does not appear anymore.
阅读全文
0 0
- mongo抛出异常:com.mongodb.MongoException: Lock not granted. Try restarting the transaction 解决方式
- mysql异常Lock wait timeout exceeded; try restarting transaction
- Mysql: Lock wait timeout exceeded; try restarting transaction异常处理
- 异常:Lock wait timeout exceeded; try restarting transaction
- Lock wait timeout exceeded; try restarting transaction
- Lock wait timeout exceeded; try restarting transaction
- Lock wait timeout exceeded; try restarting transaction
- Lock wait timeout exceeded; try restarting transaction
- Lock wait timeout exceeded; try restarting transaction
- Lock wait timeout exceeded; try restarting transaction
- Lock wait timeout exceeded; try restarting transaction
- Lock wait timeout exceeded; try restarting transaction
- Lock wait timeout exceeded; try restarting transaction
- Lock wait timeout exceeded; try restarting transaction
- mysql的gap锁导致Lock wait timeout exceeded try restarting transaction异常
- 异常com.mongodb.MongoException: not talking to master and retries used up 处理办法
- com.mongodb.MongoException$CursorNotFound: cursor not found on server异常处理
- 解决com.mongodb.MongoException$CursorNotFound: cursor 0 not found on server
- 计算机编程语言分类
- 理解CSV格式规范(解析CSV必备)
- FastDFS的作者介绍的防盗链 使用FastDFS的内置防盗链功能
- java JButton数组 scriptengine解析表达式
- MySQL的半同步复制和延时复制
- mongo抛出异常:com.mongodb.MongoException: Lock not granted. Try restarting the transaction 解决方式
- 大数据架构中使用JSON-RPC好,还是RESTful API好?
- Shrio的域-————Realm,安全数据的保存地方。
- Retrofit单例封装工具类
- Android常见异常处理
- HDU-2015(偶数求和)
- 前端框架angular学习笔记(三)
- python split()
- 2017年10月英语总结