Welcome Guest, Not a member yet? Register   Sign In
Lock wait timeout exceeded: How to solve?
#1

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

[code]
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'
[code]

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

Thanks
#2

[eluser]bretticus[/eluser]
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.
#3

[eluser]gh0st[/eluser]
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!
#4

[eluser]Eric Cope[/eluser]
was there ever a result to this? I am getting this same message.
#5

[eluser]gh0st[/eluser]
The error seemed to disappear for me after a while.
#6

[eluser]Eric Cope[/eluser]
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?
#7

[eluser]Unknown[/eluser]
Well yeah, changing from innoDB to MyISAM will remove the error, as MyISAM does not do transactions.




Theme © iAndrew 2016 - Forum software by © MyBB