core_user_create_users causes "active database transaction detected during request shutdown" errors

core_user_create_users causes "active database transaction detected during request shutdown" errors

by Dan Bennett -
Number of replies: 2

Hi,

Not entirely sure what the story with this is. The function works fine and there's no problems at all except every time I use it I get this lovely error filling up Apache's error logs...

[Mon Jul 07 11:39:58 2014] [error] [client 193.169.192.110] Potential coding error - active database transaction detected during request shutdown:\n
• line 122 of /user/externallib.php: call to moodle_database->start_delegated_transaction()\n
• line 17 of /webservice/lib.php(1275) : eval()'d code: call to core_user_external::create_users()\n
• line ? of unknownfile: call to webservices_virtual_class_000000->core_user_create_users()\n* 
• line 232 of /lib/zend/Zend/Server/Abstract.php: call to call_user_func_array()\n* 
• line 599 of /lib/zend/Zend/XmlRpc/Server.php: call to Zend_Server_Abstract->_dispatch()\n* 
• line 337 of /lib/zend/Zend/XmlRpc/Server.php: call to Zend_XmlRpc_Server->_handle()\n* 
• line 1179 of /webservice/lib.php: call to Zend_XmlRpc_Server->handle()\n* 
• line 55 of /webservice/xmlrpc/server.php: call to webservice_zend_server->run()\n

What I can't decide on is - what could be causing this?

If it's creating users just fine with the information it gets. Is there a problem with the webservice itself or the way it's being touched?

Anyone with any thoughts? smile

Average of ratings: -
In reply to Dan Bennett

Re: core_user_create_users causes "active database transaction detected during request shutdown" errors

by Seth Chevalier -

Hi Dan,


Did you happen to get this worked out? I am running into the same problem.

In reply to Seth Chevalier

Re: core_user_create_users causes "active database transaction detected during request shutdown" errors

by Séverin Terrier -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Hi,

I had a similar problem with CAS authentication, launching moodle/auth/cas/cli/sync_users.php, exactly like in this thread.

Problem resolved using more PHP memory (512M to 1024M in my case ; memory_limit=1024M) to execute this script, as explained in this discussion smile

Séverin