Best practice forum (Archived)

Totara Sync Error "active database transaction detected when disposing database"

 
? ?
Totara Sync Error "active database transaction detected when disposing database"
by ? ? - Tuesday, 30 July 2013, 7:03 AM
 

Running Totara Sync imports 30 user records, then errors out with this message:

"active database transaction detected when disposing database"

I am importing these fields:

"idnumber","timemodified","username","delete","firstname","lastname","email","city",
"country","timezone","description","institution","department","phone1","phone2","address",
"orgidnumber","postitle","manageridnumber","auth","password","customfield_location","customfield_region","customfield_ismanager"

Version 2.4.6

New Installation

Not seeing anything in database error log at this point.

Web/php logs:

[Tue Jul 30 09:39:57 2013] [error] [client 10.10.0.131] FastCGI: server "/mnt/data/environment_cache/10075/http/php5-10075.fcgi" stderr: PHP message: Potential coding error - active database transaction detected when disposing database:, referer: https://md.expertlearning.net/admin/tool/totara_sync/admin/syncexecute.php
[Tue Jul 30 09:39:57 2013] [error] [client 10.10.0.131] FastCGI: server "/mnt/data/environment_cache/10075/http/php5-10075.fcgi" stderr: * line 240 of /admin/tool/totara_sync/elements/user.php: call to moodle_database->start_delegated_transaction(), referer: https://md.expertlearning.net/admin/tool/totara_sync/admin/syncexecute.php
[Tue Jul 30 09:39:57 2013] [error] [client 10.10.0.131] FastCGI: server "/mnt/data/environment_cache/10075/http/php5-10075.fcgi" stderr: * line 135 of /admin/tool/totara_sync/elements/user.php: call to totara_sync_element_user->create_user(), referer: https://md.expertlearning.net/admin/tool/totara_sync/admin/syncexecute.php
[Tue Jul 30 09:39:57 2013] [error] [client 10.10.0.131] FastCGI: server "/mnt/data/environment_cache/10075/http/php5-10075.fcgi" stderr: * line 105 of /admin/tool/totara_sync/lib.php: call to totara_sync_element_user->sync(), referer: https://md.expertlearning.net/admin/tool/totara_sync/admin/syncexecute.php
[Tue Jul 30 09:39:57 2013] [error] [client 10.10.0.131] FastCGI: server "/mnt/data/environment_cache/10075/http/php5-10075.fcgi" stderr: * line 51 of /admin/tool/totara_sync/admin/syncexecute.php: call to tool_totara_sync_cron(), referer: https://md.expertlearning.net/admin/tool/totara_sync/admin/syncexecute.php

 

One each subsequent run more users are imported. Now I am having a hunch that this is due to manager dependencies causing problems. I could have sworn that Totara sync used to sort out the Manager relationships correctly, regardless of order in the input file.

I am going to attempt import of all users and leave the manager id field blank for first run, though I don't think this should be necessary.

? ?
Re: Totara Sync Error "active database transaction detected when disposing database"
by ? ? - Tuesday, 30 July 2013, 9:33 AM
 

I imported all the users with out manager assignments first, and then imported again with manager assignments and it worked. Can anyone confirm whether or not Totara sync is supposed to figure out the import order of the user.csv file based upon manager assignment dependencies? ie manager record must be created before the user record that is assigned to the manager.

 

Thanks

me
Re: Totara Sync Error "active database transaction detected when disposing database"
by George Angus - Tuesday, 30 July 2013, 5:01 PM
Group Totara

Hi Jamie,

There is a patch being worked on now, and subject to testing, it should be available in the near future.

regards,

George.

? ?
Re: Totara Sync Error "active database transaction detected when disposing database"
by ? ? - Thursday, 1 August 2013, 9:07 AM
 

Thank you George, much appreciated.

Umberto Zaccaro
Re: Totara Sync Error "active database transaction detected when disposing database"
by Umberto Zaccaro - Friday, 2 August 2013, 8:54 AM
Group Partners

Hi Everybody,

I encountered the same error about managers importing . In my case I have three levels of manager also. I hope that the patch will be available soon.

But I have another question, let me know if I have to open another discussion for this.

My issue is related to work flow of Totara sync. When Totara sync finds an error then highlights this and stops to import next data.

I don't know if there is any setting that I have to enable but in this manner we have a lot of problems because if there is an error on top of file, all other data are not imported.

Let me know any workaround about this.

Thank you very much indeed.

Kind Regards

Umberto

me
Re: Totara Sync Error "active database transaction detected when disposing database"
by George Angus - Monday, 5 August 2013, 8:38 PM
Group Totara

Hi,

The patching being tested will only exlude the bad record, the import will continue with the other records. Should be avaiable for the next release - 2 weeks 2.4 (20/08/13) 3 weeks 2.2 (27/08/13).

regards,

George.

Umberto Zaccaro
Re: Totara Sync Error "active database transaction detected when disposing database"
by Umberto Zaccaro - Monday, 26 August 2013, 1:29 AM
Group Partners

Hi George,

Great, .

Thank you very much.

Kind Regards

Umberto