Part of the EllisLab Network
   
 
Lock wait timeout exceeded: How to solve?
Posted: 07 September 2009 12:28 PM   [ Ignore ]  
Lab Assistant
RankRank
Total Posts:  164
Joined  11-09-2007

I am using CI sessions that come natively with CI, sometimes when I am logged in, it will do this message:


A Database Error Occurred

Error Number: 1205

Lock wait timeout exceeded; try restarting transaction

UPDATE `ci_sessions` SET `last_activity` = 1252339957, `session_id` = ‘09993f3778065783b26fe4f406400986’ WHERE session_id = ‘421fce851a20e8a2e41f6403e9c8c0ea’

What does this error message mean, and how do I stop it from happening?

Thanks

Profile
 
 
Posted: 07 September 2009 12:36 PM   [ Ignore ]   [ # 1 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  613
Joined  09-11-2008

This seems more of an MySQL issue than a CI issue. Perhaps CI session code uses write locks, but I use CI sessions in database mode and have never had this issue.

Profile
 
 
Posted: 08 September 2009 04:59 AM   [ Ignore ]   [ # 2 ]  
Lab Assistant
RankRank
Total Posts:  164
Joined  11-09-2007

Hi there.

Thanks for your answer.  I am using the CI sessions in Database mode.  The live site does not appear to have a problem, and it only ever seems to affect my local version.

The data being stored isn’t big, I’m just using it to store the CI sessions.

If it only affects local it may not be a big issue, but if it is affecting live sites it throws the whole question of whether databases can be used to store CI sessions.

I will review the situation and if there is an issue I will resolve it, but if there’s another way around it that’d be great!

Profile
 
 
Posted: 09 February 2010 01:33 AM   [ Ignore ]   [ # 3 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  189
Joined  09-12-2007

was there ever a result to this? I am getting this same message.

 Signature 

Voltamp Media
Web: PHP, MySQL, PERL, HTML, CSS, Python, Javascript
Linux: FreeBSD, OpenVPN, SMB, SVN, C, Shell

Profile
 
 
Posted: 09 February 2010 12:14 PM   [ Ignore ]   [ # 4 ]  
Lab Assistant
RankRank
Total Posts:  164
Joined  11-09-2007

The error seemed to disappear for me after a while.

Profile
 
 
Posted: 09 February 2010 12:38 PM   [ Ignore ]   [ # 5 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  189
Joined  09-12-2007

that’s a little scary. I changed the table from innoDB to MyISAM. The error went away. I think the way the sessions library deals with the database may abuse innoDB tables. Was it the sessions table that was causing problems for you too?

 Signature 

Voltamp Media
Web: PHP, MySQL, PERL, HTML, CSS, Python, Javascript
Linux: FreeBSD, OpenVPN, SMB, SVN, C, Shell

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 819, on March 11, 2010 11:15 AM
Total Registered Members: 120587 Total Logged-in Users: 45
Total Topics: 126624 Total Anonymous Users: 1
Total Replies: 665661 Total Guests: 381
Total Posts: 792285    
Members ( View Memberlist )