[2013-06-17 22:19:05,826] {ERROR api_views.api_like - 934} Traceback (most recent call last):
File "/data1/dist/app/main/duitang/api/api_views.py", line 932, in api_like
liked = form.save()
File "/data1/dist/app/main/duitang/like/forms.py", line 83, in save
liked = like_it(like_object, category)
File "/data1/dist/app/main/duitang/like/forms.py", line 62, in like_it
liked, created = Like.objects.get_or_create(user=self.user, category=category, object_id=like_object.id)
File "/duitang/dist/sys/python/lib/python2.7/site-packages/django/db/models/manager.py", line 135, in get_or_create
return self.get_query_set().get_or_create(**kwargs)
File "/duitang/dist/sys/python/lib/python2.7/site-packages/django/db/models/query.py", line 385, in get_or_create
obj.save(force_insert=True, using=self.db)
File "/data1/dist/app/main/duitang/like/models.py", line 54, in save
super(Like, self).save(*args, **kwargs)
File "/duitang/dist/sys/python/lib/python2.7/site-packages/django/db/models/base.py", line 460, in save
self.save_base(using=using, force_insert=force_insert, force_update=force_update)
File "/duitang/dist/sys/python/lib/python2.7/site-packages/django/db/models/base.py", line 553, in save_base
result = manager._insert(values, return_id=update_pk, using=using)
File "/duitang/dist/sys/python/lib/python2.7/site-packages/django/db/models/manager.py", line 195, in _insert
return insert_query(self.model, values, **kwargs)
File "/duitang/dist/sys/python/lib/python2.7/site-packages/django/db/models/query.py", line 1436, in insert_query
return query.get_compiler(using=using).execute_sql(return_id)
File "/duitang/dist/sys/python/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 791, in execute_sql
cursor = super(SQLInsertCompiler, self).execute_sql(None)
File "/duitang/dist/sys/python/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 735, in execute_sql
cursor.execute(sql, params)
File "/duitang/dist/sys/python/lib/python2.7/site-packages/django/db/backends/mysql/base.py", line 86, in execute
return self.cursor.execute(query, args)
File "/duitang/dist/sys/python/lib/python2.7/site-packages/MySQLdb/cursors.py", line 174, in execute
self.errorhandler(self, exc, value)
File "/duitang/dist/sys/python/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
raise errorclass, errorvalue
OperationalError: (1213, 'Deadlock found when trying to get lock; try restarting transaction')
[2013-06-17 22:19:06,190] {ERROR async._worker - 100} async worker [duitang.callback.mblogsync.update_message] [(<Message: 转发 <#81375380>>,)] [{}] err: [Traceback (most recent call last):
File "/data1/dist/app/main/duitang/common/async.py", line 91, in _worker
profiling(func, "async")(*a, **kw)
File "/data1/dist/app/main/duitang/common/async.py", line 19, in _profiling
r = func(*a, **kw)
File "/data1/dist/app/main/duitang/callback/mblogsync.py", line 51, in update_message
mon_album = get_or_create_mongo_album(msg)
File "/data1/dist/app/main/duitang/callback/mblogsync.py", line 26, in get_or_create_mongo_album
alb_id, alb_name = get_album_info(msg)
File "/data1/dist/app/main/duitang/callback/mblogsync.py", line 19, in get_album_info
album = msg.album
File "/data1/dist/app/main/duitang/message/models.py", line 273, in __getattribute__
return super(Message, self).__getattribute__(name)
File "/duitang/dist/sys/python/lib/python2.7/site-packages/django/db/models/fields/related.py", line 315, in __get__
rel_obj = QuerySet(self.field.rel.to).using(db).get(**params)
File "/duitang/dist/sys/python/lib/python2.7/site-packages/django/db/models/query.py", line 349, in get
% self.model._meta.object_name)
DoesNotExist: Album matching query does not exist.
]
[2013-06-17 22:19:06,861] {ERROR views.callback - 496} Cannot login via sina, code: cab614ffc313e0b0b29f4e78e988c09e
[2013-06-17 22:19:25,800] {ERROR api_views.api_like - 934} Traceback (most recent call last):
File "/data1/dist/app/main/duitang/api/api_views.py", line 932, in api_like
liked = form.save()
File "/data1/dist/app/main/duitang/like/forms.py", line 83, in save
liked = like_it(like_object, category)
File "/data1/dist/app/main/duitang/like/forms.py", line 62, in like_it
liked, created = Like.objects.get_or_create(user=self.user, category=category, object_id=like_object.id)
File "/duitang/dist/sys/python/lib/python2.7/site-packages/django/db/models/manager.py", line 135, in get_or_create
return self.get_query_set().get_or_create(**kwargs)
File "/duitang/dist/sys/python/lib/python2.7/site-packages/django/db/models/query.py", line 385, in get_or_create
obj.save(force_insert=True, using=self.db)
File "/data1/dist/app/main/duitang/like/models.py", line 54, in save
super(Like, self).save(*args, **kwargs)
File "/duitang/dist/sys/python/lib/python2.7/site-packages/django/db/models/base.py", line 460, in save
self.save_base(using=using, force_insert=force_insert, force_update=force_update)
File "/duitang/dist/sys/python/lib/python2.7/site-packages/django/db/models/base.py", line 553, in save_base
result = manager._insert(values, return_id=update_pk, using=using)
File "/duitang/dist/sys/python/lib/python2.7/site-packages/django/db/models/manager.py", line 195, in _insert
return insert_query(self.model, values, **kwargs)
File "/duitang/dist/sys/python/lib/python2.7/site-packages/django/db/models/query.py", line 1436, in insert_query
return query.get_compiler(using=using).execute_sql(return_id)
File "/duitang/dist/sys/python/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 791, in execute_sql
cursor = super(SQLInsertCompiler, self).execute_sql(None)
File "/duitang/dist/sys/python/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 735, in execute_sql
cursor.execute(sql, params)
File "/duitang/dist/sys/python/lib/python2.7/site-packages/django/db/backends/mysql/base.py", line 86, in execute
return self.cursor.execute(query, args)
File "/duitang/dist/sys/python/lib/python2.7/site-packages/MySQLdb/cursors.py", line 174, in execute
self.errorhandler(self, exc, value)
File "/duitang/dist/sys/python/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
raise errorclass, errorvalue
OperationalError: (1213, 'Deadlock found when trying to get lock; try restarting transaction')
- 浏览: 2652384 次
- 来自: 杭州
文章分类
- 全部博客 (1188)
- webwork (4)
- 网摘 (18)
- java (103)
- hibernate (1)
- Linux (85)
- 职业发展 (1)
- activeMQ (2)
- netty (14)
- svn (1)
- webx3 (12)
- mysql (81)
- css (1)
- HTML (6)
- apache (3)
- 测试 (2)
- javascript (1)
- 储存 (1)
- jvm (5)
- code (13)
- 多线程 (12)
- Spring (18)
- webxs (2)
- python (119)
- duitang (0)
- mongo (3)
- nosql (4)
- tomcat (4)
- memcached (20)
- 算法 (28)
- django (28)
- shell (1)
- 工作总结 (5)
- solr (42)
- beansdb (6)
- nginx (3)
- 性能 (30)
- 数据推荐 (1)
- maven (8)
- tonado (1)
- uwsgi (5)
- hessian (4)
- ibatis (3)
- Security (2)
- HTPP (1)
- gevent (6)
- 读书笔记 (1)
- Maxent (2)
- mogo (0)
- thread (3)
- 架构 (5)
- NIO (5)
- 正则 (1)
- lucene (5)
- feed (4)
- redis (17)
- TCP (6)
- test (0)
- python,code (1)
- PIL (3)
- guava (2)
- jython (4)
- httpclient (2)
- cache (3)
- signal (1)
- dubbo (7)
- HTTP (4)
- json (3)
- java socket (1)
- io (2)
- socket (22)
- hash (2)
- Cassandra (1)
- 分布式文件系统 (5)
- Dynamo (2)
- gc (8)
- scp (1)
- rsync (1)
- mecached (0)
- mongoDB (29)
- Thrift (1)
- scribe (2)
- 服务化 (3)
- 问题 (83)
- mat (1)
- classloader (2)
- javaBean (1)
- 文档集合 (27)
- 消息队列 (3)
- nginx,文档集合 (1)
- dboss (12)
- libevent (1)
- 读书 (0)
- 数学 (3)
- 流程 (0)
- HBase (34)
- 自动化测试 (1)
- ubuntu (2)
- 并发 (1)
- sping (1)
- 图形 (1)
- freemarker (1)
- jdbc (3)
- dbcp (0)
- sharding (1)
- 性能测试 (1)
- 设计模式 (2)
- unicode (1)
- OceanBase (3)
- jmagick (1)
- gunicorn (1)
- url (1)
- form (1)
- 安全 (2)
- nlp (8)
- libmemcached (1)
- 规则引擎 (1)
- awk (2)
- 服务器 (1)
- snmpd (1)
- btrace (1)
- 代码 (1)
- cygwin (1)
- mahout (3)
- 电子书 (1)
- 机器学习 (5)
- 数据挖掘 (1)
- nltk (6)
- pool (1)
- log4j (2)
- 总结 (11)
- c++ (1)
- java源代码 (1)
- ocr (1)
- 基础算法 (3)
- SA (1)
- 笔记 (1)
- ml (4)
- zokeeper (0)
- jms (1)
- zookeeper (5)
- zkclient (1)
- hadoop (13)
- mq (2)
- git (9)
- 问题,io (1)
- storm (11)
- zk (1)
- 性能优化 (2)
- example (1)
- tmux (1)
- 环境 (2)
- kyro (1)
- 日志系统 (3)
- hdfs (2)
- python_socket (2)
- date (2)
- elasticsearch (1)
- jetty (1)
- 树 (1)
- 汽车 (1)
- mdrill (1)
- 车 (1)
- 日志 (1)
- web (1)
- 编译原理 (1)
- 信息检索 (1)
- 性能,linux (1)
- spam (1)
- 序列化 (1)
- fabric (2)
- guice (1)
- disruptor (1)
- executor (1)
- logback (2)
- 开源 (1)
- 设计 (1)
- 监控 (3)
- english (1)
- 问题记录 (1)
- Bitmap (1)
- 云计算 (1)
- 问题排查 (1)
- highchat (1)
- mac (3)
- docker (1)
- jdk (1)
- 表达式 (1)
- 网络 (1)
- 时间管理 (1)
- 时间序列 (1)
- OLAP (1)
- Big Table (0)
- sql (1)
- kafka (1)
- md5 (1)
- springboot (1)
- spring security (1)
- Spring Boot (3)
- mybatis (1)
- java8 (1)
- 分布式事务 (1)
- 限流 (1)
- Shadowsocks (0)
- 2018 (1)
- 服务治理 (1)
- 设计原则 (1)
- log (0)
- perftools (1)
最新评论
-
siphlina:
课程——基于Python数据分析与机器学习案例实战教程分享网盘 ...
Python机器学习库 -
san_yun:
leibnitz 写道hi,我想知道,无论在92还是94版本, ...
hbase的行锁与多版本并发控制(MVCC) -
leibnitz:
hi,我想知道,无论在92还是94版本,更新时(如Puts)都 ...
hbase的行锁与多版本并发控制(MVCC) -
107x:
不错,谢谢!
Latent Semantic Analysis(LSA/ LSI)算法简介 -
107x:
不错,谢谢!
Python机器学习库
发表评论
-
spring-cloud问题排查
2019-11-18 14:58 513### 问题1报错,应用无法启动 org.springfra ... -
log4j 和slf4j的 类冲突解决
2018-07-14 16:11 19781. 检查 log4j 和slf4j的冲突 pub ... -
HikariPool-1 - Connection is not available, request timed out after
2018-05-07 19:13 6673在开发中遇到 HikariPool-1 - Conn ... -
java.io.StreamCorruptedException: invalid stream header: EFBFBDEF
2018-05-03 16:54 2403Java代码 publi ... -
log4j问题总结-加载配置文件
2014-08-20 16:34 1063今天遇到log4j的log4j.properties没有生效 ... -
一个诡异的类冲突错误排查记录
2014-08-13 10:44 815今天遇到一个问题排查了很久,记录一下。 问题原因,日常环境 ... -
tomcat7.0.26的连接数控制bug的问题排查
2014-04-23 19:51 1709今儿线上一台机器,监控一直在告警, mtophost[CM ... -
tomcat,jboss,jetty访问出现404错误问题记录
2014-04-21 19:51 1690原因是WEB-INF下面缺少jboss-web.xml ... -
记录Hadoop native libraries无法load的问题
2014-04-10 19:45 2297今天遇到一个错误,在本地往Hadoop写文件的时候报了一个错 ... -
Exception性能问题
2014-01-24 22:25 13071.从Exception往上介绍相关结构、代码 ... -
spring加载xml去远程获取dtd验证xml的问题
2014-01-24 11:57 899最近遇到spring 加载xml去远程获取dtd,但外网不 ... -
hbase查询超时导致的错误
2013-12-25 19:53 2714今天上线跑一个hbase程序出现如下错误: org.ap ... -
hbase无法启动问题
2013-12-24 23:53 927今天遇到hbase无法启动,找了很久,才发现可能是data ... -
web.xml配置注意点
2013-12-19 20:29 6391. servlet启动初始化 servlet默认只有访 ... -
Linux服务器Cache占用过多内存导致系统内存不足问题的排查解决
2013-12-17 23:22 3909作者: 大圆那些事 | 文章可以转载,请以超链接形式标明文章 ... -
linger close用法
2013-12-13 14:18 964Linux下tcp连接断开的时候调用close()函数,有 ... -
log4j-over-slf4的log4j Loger加载问题
2013-12-11 00:19 5780log4j-over-slf4是通过定义和log4j同包名 ... -
log4j,slf4j,logback问题总结
2013-12-10 18:12 6527ls4j初始化过程参考:l ... -
maven 小结(打包和单元测试)
2013-12-04 11:53 6851. 如何把一个jar和他依赖的包打包成一个 使用mave ... -
solr load比较高
2013-12-02 09:50 1069最近solr的load比较高,通过jstack查看: 写 ...
相关推荐
在描述的场景中,程序在尝试更新数据时遇到了"Deadlock found when trying to get lock; try restarting transaction"的错误,这表明存在一个死锁情况。在InnoDB存储引擎中,这种错误会导致其中一个事务被回滚,以便...
MySQL数据库在多用户并发操作中,为了保证数据的一致性和完整性,使用了锁机制来管理事务的并发控制。死锁是并发控制中的一种异常状态,通常发生在两个或多个事务之间,由于相互等待对方释放资源而形成僵局。本文将...
"MySQL 死锁避免和最小化方法" 在 MySQL 中,死锁是指两个或多个事务之间的资源竞争,导致事务无法继续执行的情况。死锁可能会导致数据库性能下降,甚至整个数据库无法访问。为了避免或最小化 MySQL 死锁,需要了解...
MYSQL 死锁检测机制初探 在 MySQL 中,死锁检测机制是一种重要的机制,用于检测和解决事务之间的死锁问题。在本文中,我们将详细介绍 MySQL 死锁检测机制的原理和实现。 一、死锁的定义和原理 在 MySQL 中,死锁...
MySQL的InnoDB存储引擎在处理并发事务时可能会遇到死锁问题,这主要发生在多个事务互相等待对方释放资源的情况下。死锁通常由四个必要条件引发: 1. 互斥条件:资源只能被一个事务使用。 2. 请求和保持条件:一个...
当遇到无法访问MySQL数据库时,可能会出现如描述中的异常情况:“ThreadPoolAsynchronousRunner - com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@75d634ea -- APPARENT DEADLOCK!...
- 新的`innodb_deadlock_detect`变量允许在高并发环境下禁用死锁检测以提高效率。 6. **字符集支持**: 默认字符集从latin1升级到utf8mb4,提供了更广泛的Unicode字符支持,包括新的排序规则。 7. **增强JSON...
MySQL中的死锁问题是一个复杂而微妙的议题,尤其是在数据库优化和并发控制中。本文将深入探讨一个看似不可能发生的死锁案例,并分析其背后的原理。死锁通常发生在多个事务相互等待对方释放资源的情况下,但在这个...
- **Latest Detect Deadlock**:最近检测到的死锁情况。 - **File I/O**:文件I/O操作统计,包括读写次数、速度等。 - **Insert Buffer and Adaptive Hash Index**:插入缓冲区和自适应哈希索引的状态。 - **Log**:...
- 错误返回:被回滚的事务会收到错误1213(Deadlock found when trying to get lock; try restarting transaction),提示开发者检查并解决可能导致死锁的代码逻辑。 了解了死锁的基本概念后,我们可以通过实际例子...
### MySQL死锁分析 #### 死锁问题背景 在MySQL的使用过程中,死锁是一个较为常见的现象,尤其是在并发量较大的应用场景下。死锁的发生往往会给系统带来不可预知的影响,严重时甚至会导致整个数据库服务不可用。...
6. **事务与并发控制**:学习如何使用事务(TRANSACTION)确保数据的一致性,以及理解隔离级别(READ UNCOMMITTED, READ COMMITTED, REPEATABLE READ, SERIALIZABLE)和死锁(Deadlock)的概念。 7. **存储引擎**:...
"mysql 死锁 Deadlock found when trying to get lock; try restarting transaction - hehaibo - ITeye技术网站.mht"这个文件可能包含有关如何识别和解决MySQL死锁的详细信息。解决死锁通常包括重新组织事务的顺序,...
### MySQL如何减少行锁对性能的影响 在MySQL数据库中,行锁是一种重要的锁定机制,它主要应用于InnoDB存储引擎中,用于控制并发事务对数据行的访问。行锁的使用可以显著提高系统的并发处理能力,但同时也会带来一定...
- 新的动态变量 `innodb_deadlock_detect` 可用于在必要时禁用死锁检测,以提高高并发环境下的性能。 6. 字符集支持: 默认字符集从 latin1 更改为 utf8mb4,提供更好的 Unicode 支持,新增了 utf8mb4_ja_0900_as...
3. **死锁检测**:利用`innodb_deadlock_detect`配置选项,可以开启或关闭死锁检测。 4. **程序逻辑优化**:在应用层检查并避免可能导致死锁的操作,如一次性获取所有需要的资源,或者在循环中尽早释放不再需要的锁...