Best practice forum (Archived)

Issues after upgrade from 2.2.0 to 2.4.9

 
? ?
Issues after upgrade from 2.2.0 to 2.4.9
door ? ? - Monday, 9 September 2013, 14:51 PM
 

After upgrading our Totara instance from 2.2.0 to 2.4.9 we are seeing the following messages in the error log

"Can not obtain session lock"

Default exception handler: Timed out while waiting for session lock.<br />Wait for your current requests to finish and try again later. Debug: \nError code: sessionwaiterr\n* line 1455 of /lib/dml/mysqli_native_moodle_database.php: dml_sessionwait_exception thrown\n* line 609 of /lib/sessionlib.php: call to mysqli_native_moodle_database->get_session_lock()\n* line ? of unknownfile: call to database_session->handler_read()\n* line 190 of /lib/sessionlib.php: call to session_start()\n* line 482 of /lib/sessionlib.php: call to session_stub->__construct()\n* line 66 of /lib/sessionlib.php: call to database_session->__construct()\n* line 711 of /lib/setup.php: call to session_get_instance()\n* line 30 of /config.php: call to require_once()\n* line 31 of /index.php: call to require_once()\n

This happens whenever a user attempts to sign-up for a facetoface session. It also happens on new user registration.

Thoughts?

David Curry (Core Developer)
Re: Issues after upgrade from 2.2.0 to 2.4.9
door David Curry (Core Developer) - Monday, 9 September 2013, 15:46 PM
Groep Totara

Hey Tony,

Sounds like it is failing to connect to your database, were there any issues when you upgraded? Was this error generated by the facetoface or the new user? and are the 2 messages the same? (if not can you put both up)

Cheers,
David

? ?
Re: Issues after upgrade from 2.2.0 to 2.4.9
door ? ? - Monday, 9 September 2013, 16:19 PM
 

Hi David,

The registration of the facetoface session succeeds but the page just infininetly loads, never redirecting to the confirmation page. This infinite loading also happens on new user registration, but the user is still saved. The only way to make Totara usable after this is to clear your cookie and login again.

The error can be created by the newly created user or an old user.

The error outputs are slightly different. I have included the facetoface sign-up browser returned error (from enabling debugging) and the log output of new user registration.

Facetoface Session Sign-Up
Debug info: 
Error code: sessionwaiterr
Stack trace:
  • line 1455 of /lib/dml/mysqli_native_moodle_database.php: dml_sessionwait_exception thrown
  • line 609 of /lib/sessionlib.php: call to mysqli_native_moodle_database->get_session_lock()
  • line ? of unknownfile: call to database_session->handler_read()
  • line 190 of /lib/sessionlib.php: call to session_start()
  • line 482 of /lib/sessionlib.php: call to session_stub->__construct()
  • line 66 of /lib/sessionlib.php: call to database_session->__construct()
  • line 711 of /lib/setup.php: call to session_get_instance()
  • line 30 of /config.php: call to require_once()
  • line 31 of /index.php: call to require_once()

New User Registration

Default exception handler: Timed out while waiting for session lock.<br />Wait for your current requests to finish and try again later. Debug: \nError code: sessionwaiterr\n* line 1455 of /lib/dml/mysqli_native_moodle_database.php: dml_sessionwait_exception thrown\n* line 609 of /lib/sessionlib.php: call to mysqli_native_moodle_database->get_session_lock()\n* line ? of unknownfile: call to database_session->handler_read()\n* line 190 of /lib/sessionlib.php: call to session_start()\n* line 482 of /lib/sessionlib.php: call to session_stub->__construct()\n* line 66 of /lib/sessionlib.php: call to database_session->__construct()\n* line 711 of /lib/setup.php: call to session_get_instance()\n* line 30 of /config.php: call to require_once()\n* line 27 of /login/signup.php: call to require()\n, referer: https://www.smcu.us/login/signup.php

Thanks for the help!

Tony

David Curry (Core Developer)
Re: Issues after upgrade from 2.2.0 to 2.4.9
door David Curry (Core Developer) - Monday, 9 September 2013, 18:40 PM
Groep Totara

Could you tell me what version of MySQL you are running? And have you looked at the settings under
Home / ► Site administration / ► Server / ► Session handling
"Use database for session information" has some MySQL specific instructions that need to be followed, or the setting should be turned off.

If you have that setting turned off, looking into session issues a bit I came across this list:

1. Session problems can occur when a process is interrupted, which often result in unexpected errors cropping up. Deleting all session keys in sitedata/sessions can sometimes help. Possibly make sure debugging is on and at the highest level and try again to see if anything new is printed out to the screen.

2. Sessions files can grow unexpectedly, resulting in reduced server space, which sometimes does not show up as a problem, but can result in login problems - delete session keys and this may resolve that issue.

3. The mysql.sock file is generated by starting the mysql server, so there may be an issue with the database. No sock, therefore not generated - major issue. Try to connect to the database from the command line.

 

I'm thinking it is probably the admin setting but let me know how you go and possibly have a look at the other 3.

Cheers,
David

? ?
Re: Issues after upgrade from 2.2.0 to 2.4.9
door ? ? - Monday, 9 September 2013, 20:02 PM
 

Hi David

Running Mysql 5.5.33

I have tried both types of session handling, db and disk. Neither resolve the problem. 

I have set max_allowed_packet in my.cnf to 8MB.

1. Debugging is on it's highest level, nothing stands out. I have removed all the old sessions.

2. Disk space looks good

3. mysql.sock exists and I'm able to connect to the db via command line.

I'm able to create locks manually via the command line. 

Tony

? ?
Re: Issues after upgrade from 2.2.0 to 2.4.9
door ? ? - Monday, 9 September 2013, 20:15 PM
 

Hi David

Running Mysql 5.5.33

I have tried both types of session handling, db and disk. Neither resolve the problem. 

I have set max_allowed_packet in my.cnf to 8MB.

1. Debugging is on it's highest level, nothing stands out. I have removed all the old sessions.

2. Disk space looks good

3. mysql.sock exists and I'm able to connect to the db via command line.

I'm able to create locks manually via the command line. 

Tony

David Curry (Core Developer)
Re: Issues after upgrade from 2.2.0 to 2.4.9
door David Curry (Core Developer) - Monday, 9 September 2013, 20:44 PM
Groep Totara

Hey,

Trying to replicate this issue, can you tell me your exact upgrade path? You can't go straight from 2.2.0 -> 2.4.x you have to upgrade to 2.2.13 or higher first (as per the INSTALL.txt file).

Cheers
David

? ?
Re: Issues after upgrade from 2.2.0 to 2.4.9
door ? ? - Monday, 9 September 2013, 20:48 PM
 

2.2.0 to 2.2.22

After that I upgraded mysql from 5.0 to 5.5. Then continued

2.2.22 to 2.4.9

Tony

? ?
Re: Issues after upgrade from 2.2.0 to 2.4.9
door ? ? - Monday, 9 September 2013, 20:59 PM
 

David

I'll need to revert the 2.4.9 installation before tomorrow morning, if we are unable to fix it.

I'm holding out for now but if you need any other information from the deployment let me know.

Thanks

Tony

David Curry (Core Developer)
Re: Issues after upgrade from 2.2.0 to 2.4.9
door David Curry (Core Developer) - Monday, 9 September 2013, 21:34 PM
Groep Totara

Hey Tony,

It's getting near the end of the day here so I doubt I'll have a fix for you by morning, might as well revert back now. Looks like we can't replicate it easily, but I'll try get back to you tomorrow sometime with some more info. Maybe just 2.2.22 would work better for now, while we work it out? That's had a lot of bug fixes since 2.2.0.

Cheers,
David

? ?
Re: Issues after upgrade from 2.2.0 to 2.4.9
door ? ? - Tuesday, 10 September 2013, 00:53 AM
 

David

I figured out the problem. The system was hanging up trying to send an email, on session registration and on new user registration. 

I figured it out because after downgrading to 2.2.22 an error message starting pointing me towards the smtp server being down.

Not sure how the lock is related to sending an email but after fixing the smtp server settings I upgraded to 2.4.9 and everything is working fine.

Thanks for all the help. Sorry that it ended up being a wild goose chase.

Tony

David Curry (Core Developer)
Re: Issues after upgrade from 2.2.0 to 2.4.9
door David Curry (Core Developer) - Tuesday, 10 September 2013, 14:03 PM
Groep Totara

Hey Tony,

That's great to hear, enjoy 2.4.9 :)

Cheers
David