|SEQUENCE table / row lock issue [message #748495]
||Mon, 24 October 2011 14:18
| pop prem
Registered: June 2010
I'm using Spring transactions with eclipselink in tomcat, mysql enviornment.
I was getting lock timeout issues always when testing my web application and i was looking for issues with Spring transactions with eclipselink, but finally got my doubt cleared with the log statements.
I'm using ID generation type AUTO.
@Column(name = "some_id", unique = true, nullable = false)
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
I can see that a tabled named SEQUENCE is created and it has only a value which is updated by all transactions. Seems like the lock is happening here.
Internal Exception: java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction
Error Code: 1205
Call: UPDATE SEQUENCE SET SEQ_COUNT = SEQ_COUNT + ? WHERE SEQ_NAME = ?
bind => [50, SEQ_GEN]
Query: DataModifyQuery(name="SEQUENCE" sql="UPDATE SEQUENCE SET SEQ_COUNT = SEQ_COUNT + ? WHERE SEQ_NAME = ?")]
How can i solve this issue?? Any advices are much appreciated.
Powered by FUDForum
. Page generated in 0.06027 seconds