Forums | Mahara Community
Support
/
Pressing "Find Friends" on Mahara Dashboard (or in Groups) causes MySQL server to crash
19 September 2011, 3:16
Hi,
I'm having a problem with the FIND FRIENDS. Whenever someone presses the "FIND FRIENDS" link on the dashboard the MySQL (Innodb) server crashes. This also happens when someone presses FIND FRIEND from the Groups area.
The following error message is displayed.
Mahara: Site unavailable
A nonrecoverable error occured. This probably means you have encountered a bug in the system
I would like to think that I haven't discovered a bug as something like this should have been found by now, surely... but that means it must be configuration ...
I'm running Mahara 1.4.0 (2011061002)) from mahara.org as a fresh install. It's set up as a Mahoodle with Moodle 1.9.13+. Both Mahara and Moodle are running on a single instance of WAMP2(h) on a Windows 2003 Server.
I've imported all our school's users into Mahara and have successfully set up the Mahoodle so that users in Moodle can SSO to Mahara and return to Moodle.
The logs indicate the following
PHP Error Log
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\errors.php:745) Failed to get a recordset: mysql error: [2013: Lost connection to MySQL server during query] in EXECUTE("SELECT u.id, u.username, u.preferredname, u.firstname, u.lastname, u.admin, u.staff, u.deleted,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\errors.php:745) u.profileicon, u.email,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\errors.php:745) 0 AS pending, ap.value AS hidenamepref,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\errors.php:745) COALESCE((SELECT ap.value FROM "mahara_usr_account_preference" ap WHERE ap.usr = u.id AND ap.field = 'messages'), 'allow') AS messages,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\errors.php:745) COALESCE((SELECT ap.value FROM "mahara_usr_account_preference" ap WHERE ap.usr = u.id AND ap.field = 'friendscontrol'), 'auth') AS friendscontrol,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\errors.php:745) (SELECT 1 FROM "mahara_usr_friend" WHERE ((usr1 = '25' AND usr2 = u.id) OR (usr2 = '25' AND usr1 = u.id))) AS friend,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\errors.php:745) (SELECT 1 FROM "mahara_usr_friend_request" fr WHERE fr.requester = '25' AND fr.owner = u.id) AS requestedfriendship,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\errors.php:745) (SELECT title FROM "mahara_artefact" WHERE artefacttype = 'introduction' AND owner = u.id) AS introduction,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\errors.php:745) NULL AS message
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\errors.php:745) FROM "mahara_usr" u
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\errors.php:745) LEFT JOIN "mahara_usr_account_preference" ap ON (u.id = ap.usr AND ap.field = 'hiderealname')
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\errors.php:745) WHERE u.id IN (420,446,1188,1365,1639,1692,1467,912,589,675)
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\errors.php:745) UNION
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\errors.php:745) SELECT u.id, u.username, u.preferredname, u.firstname, u.lastname, u.admin, u.staff, u.deleted,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\errors.php:745) u.profileicon, u.email,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\errors.php:745) 1 AS pending, ap.value AS hidenamepref,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\errors.php:745) COALESCE((SELECT ap.value FROM "mahara_usr_account_preference" ap WHERE ap.usr = u.id AND ap.field = 'messages'), 'allow') AS messages,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\errors.php:745) NULL AS friendscontrol,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\errors.php:745) NULL AS friend,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\errors.php:745) NULL AS requestedfriendship,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\errors.php:745) (SELECT title FROM "mahara_artefact" WHERE artefacttype = 'introduction' AND owner = u.id) AS introduction,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\errors.php:745) message
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\errors.php:745) FROM "mahara_usr" u
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\errors.php:745) LEFT JOIN "mahara_usr_account_preference" ap ON (u.id = ap.usr AND ap.field = 'hiderealname')
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\errors.php:745) JOIN "mahara_usr_friend_request" fr ON fr.requester = u.id
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\errors.php:745) WHERE fr.owner = '25'
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\errors.php:745) AND u.id IN (420,446,1188,1365,1639,1692,1467,912,589,675)")
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\errors.php:745) Command was: SELECT u.id, u.username, u.preferredname, u.firstname, u.lastname, u.admin, u.staff, u.deleted,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\errors.php:745) u.profileicon, u.email,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\errors.php:745) 0 AS pending, ap.value AS hidenamepref,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\errors.php:745) COALESCE((SELECT ap.value FROM "mahara_usr_account_preference" ap WHERE ap.usr = u.id AND ap.field = 'messages'), 'allow') AS messages,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\errors.php:745) COALESCE((SELECT ap.value FROM "mahara_usr_account_preference" ap WHERE ap.usr = u.id AND ap.field = 'friendscontrol'), 'auth') AS friendscontrol,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\errors.php:745) (SELECT 1 FROM "mahara_usr_friend" WHERE ((usr1 = ? AND usr2 = u.id) OR (usr2 = ? AND usr1 = u.id))) AS friend,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\errors.php:745) (SELECT 1 FROM "mahara_usr_friend_request" fr WHERE fr.requester = ? AND fr.owner = u.id) AS requestedfriendship,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\errors.php:745) (SELECT title FROM "mahara_artefact" WHERE artefacttype = 'introduction' AND owner = u.id) AS introduction,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\errors.php:745) NULL AS message
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\errors.php:745) FROM "mahara_usr" u
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\errors.php:745) LEFT JOIN "mahara_usr_account_preference" ap ON (u.id = ap.usr AND ap.field = 'hiderealname')
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\errors.php:745) WHERE u.id IN (420,446,1188,1365,1639,1692,1467,912,589,675)
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\errors.php:745) UNION
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\errors.php:745) SELECT u.id, u.username, u.preferredname, u.firstname, u.lastname, u.admin, u.staff, u.deleted,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\errors.php:745) u.profileicon, u.email,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\errors.php:745) 1 AS pending, ap.value AS hidenamepref,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\errors.php:745) COALESCE((SELECT ap.value FROM "mahara_usr_account_preference" ap WHERE ap.usr = u.id AND ap.field = 'messages'), 'allow') AS messages,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\errors.php:745) NULL AS friendscontrol,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\errors.php:745) NULL AS friend,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\errors.php:745) NULL AS requestedfriendship,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\errors.php:745) (SELECT title FROM "mahara_artefact" WHERE artefacttype = 'introduction' AND owner = u.id) AS introduction,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\errors.php:745) message
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\errors.php:745) FROM "mahara_usr" u
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\errors.php:745) LEFT JOIN "mahara_usr_account_preference" ap ON (u.id = ap.usr AND ap.field = 'hiderealname')
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\errors.php:745) JOIN "mahara_usr_friend_request" fr ON fr.requester = u.id
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\errors.php:745) WHERE fr.owner = ?
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\errors.php:745) AND u.id IN (420,446,1188,1365,1639,1692,1467,912,589,675) and values was (25,25,25,25)
[19-Sep-2011 19:24:16] Call stack (most recent first):
[19-Sep-2011 19:24:16] * log_message("Failed to get a recordset: mysql error: [2013: Los...", 8, true, true) at C:\wamp\www\mahara\lib\errors.php:109
[19-Sep-2011 19:24:16] * log_warn("Failed to get a recordset: mysql error: [2013: Los...") at C:\wamp\www\mahara\lib\errors.php:745
[19-Sep-2011 19:24:16] * SQLException->__construct("Failed to get a recordset: mysql error: [2013: Los...") at C:\wamp\www\mahara\lib\dml.php:484
[19-Sep-2011 19:24:16] * get_recordset_sql("SELECT u.id, u.username, u.preferredname, u.firstn...", array(size 4), "", "") at C:\wamp\www\mahara\lib\dml.php:650
[19-Sep-2011 19:24:16] * get_records_sql_assoc("SELECT u.id, u.username, u.preferredname, u.firstn...", array(size 4)) at C:\wamp\www\mahara\lib\user.php:1330
[19-Sep-2011 19:24:16] * get_users_data(array(size 10), false) at C:\wamp\www\mahara\lib\user.php:1439
[19-Sep-2011 19:24:16] * build_userlist_html(array(size 5), "find", false) at C:\wamp\www\mahara\user\find.php:56
[19-Sep-2011 19:24:16]
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\dml.php:484) Failed to get a recordset: mysql error: [2013: Lost connection to MySQL server during query] in EXECUTE("SELECT u.id, u.username, u.preferredname, u.firstname, u.lastname, u.admin, u.staff, u.deleted,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\dml.php:484) u.profileicon, u.email,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\dml.php:484) 0 AS pending, ap.value AS hidenamepref,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\dml.php:484) COALESCE((SELECT ap.value FROM "mahara_usr_account_preference" ap WHERE ap.usr = u.id AND ap.field = 'messages'), 'allow') AS messages,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\dml.php:484) COALESCE((SELECT ap.value FROM "mahara_usr_account_preference" ap WHERE ap.usr = u.id AND ap.field = 'friendscontrol'), 'auth') AS friendscontrol,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\dml.php:484) (SELECT 1 FROM "mahara_usr_friend" WHERE ((usr1 = '25' AND usr2 = u.id) OR (usr2 = '25' AND usr1 = u.id))) AS friend,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\dml.php:484) (SELECT 1 FROM "mahara_usr_friend_request" fr WHERE fr.requester = '25' AND fr.owner = u.id) AS requestedfriendship,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\dml.php:484) (SELECT title FROM "mahara_artefact" WHERE artefacttype = 'introduction' AND owner = u.id) AS introduction,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\dml.php:484) NULL AS message
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\dml.php:484) FROM "mahara_usr" u
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\dml.php:484) LEFT JOIN "mahara_usr_account_preference" ap ON (u.id = ap.usr AND ap.field = 'hiderealname')
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\dml.php:484) WHERE u.id IN (420,446,1188,1365,1639,1692,1467,912,589,675)
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\dml.php:484) UNION
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\dml.php:484) SELECT u.id, u.username, u.preferredname, u.firstname, u.lastname, u.admin, u.staff, u.deleted,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\dml.php:484) u.profileicon, u.email,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\dml.php:484) 1 AS pending, ap.value AS hidenamepref,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\dml.php:484) COALESCE((SELECT ap.value FROM "mahara_usr_account_preference" ap WHERE ap.usr = u.id AND ap.field = 'messages'), 'allow') AS messages,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\dml.php:484) NULL AS friendscontrol,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\dml.php:484) NULL AS friend,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\dml.php:484) NULL AS requestedfriendship,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\dml.php:484) (SELECT title FROM "mahara_artefact" WHERE artefacttype = 'introduction' AND owner = u.id) AS introduction,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\dml.php:484) message
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\dml.php:484) FROM "mahara_usr" u
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\dml.php:484) LEFT JOIN "mahara_usr_account_preference" ap ON (u.id = ap.usr AND ap.field = 'hiderealname')
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\dml.php:484) JOIN "mahara_usr_friend_request" fr ON fr.requester = u.id
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\dml.php:484) WHERE fr.owner = '25'
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\dml.php:484) AND u.id IN (420,446,1188,1365,1639,1692,1467,912,589,675)")
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\dml.php:484) Command was: SELECT u.id, u.username, u.preferredname, u.firstname, u.lastname, u.admin, u.staff, u.deleted,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\dml.php:484) u.profileicon, u.email,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\dml.php:484) 0 AS pending, ap.value AS hidenamepref,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\dml.php:484) COALESCE((SELECT ap.value FROM "mahara_usr_account_preference" ap WHERE ap.usr = u.id AND ap.field = 'messages'), 'allow') AS messages,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\dml.php:484) COALESCE((SELECT ap.value FROM "mahara_usr_account_preference" ap WHERE ap.usr = u.id AND ap.field = 'friendscontrol'), 'auth') AS friendscontrol,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\dml.php:484) (SELECT 1 FROM "mahara_usr_friend" WHERE ((usr1 = ? AND usr2 = u.id) OR (usr2 = ? AND usr1 = u.id))) AS friend,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\dml.php:484) (SELECT 1 FROM "mahara_usr_friend_request" fr WHERE fr.requester = ? AND fr.owner = u.id) AS requestedfriendship,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\dml.php:484) (SELECT title FROM "mahara_artefact" WHERE artefacttype = 'introduction' AND owner = u.id) AS introduction,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\dml.php:484) NULL AS message
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\dml.php:484) FROM "mahara_usr" u
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\dml.php:484) LEFT JOIN "mahara_usr_account_preference" ap ON (u.id = ap.usr AND ap.field = 'hiderealname')
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\dml.php:484) WHERE u.id IN (420,446,1188,1365,1639,1692,1467,912,589,675)
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\dml.php:484) UNION
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\dml.php:484) SELECT u.id, u.username, u.preferredname, u.firstname, u.lastname, u.admin, u.staff, u.deleted,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\dml.php:484) u.profileicon, u.email,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\dml.php:484) 1 AS pending, ap.value AS hidenamepref,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\dml.php:484) COALESCE((SELECT ap.value FROM "mahara_usr_account_preference" ap WHERE ap.usr = u.id AND ap.field = 'messages'), 'allow') AS messages,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\dml.php:484) NULL AS friendscontrol,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\dml.php:484) NULL AS friend,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\dml.php:484) NULL AS requestedfriendship,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\dml.php:484) (SELECT title FROM "mahara_artefact" WHERE artefacttype = 'introduction' AND owner = u.id) AS introduction,
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\dml.php:484) message
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\dml.php:484) FROM "mahara_usr" u
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\dml.php:484) LEFT JOIN "mahara_usr_account_preference" ap ON (u.id = ap.usr AND ap.field = 'hiderealname')
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\dml.php:484) JOIN "mahara_usr_friend_request" fr ON fr.requester = u.id
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\dml.php:484) WHERE fr.owner = ?
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\dml.php:484) AND u.id IN (420,446,1188,1365,1639,1692,1467,912,589,675) and values was (25,25,25,25)
[19-Sep-2011 19:24:16] Call stack (most recent first):
[19-Sep-2011 19:24:16] * get_recordset_sql("SELECT u.id, u.username, u.preferredname, u.firstn...", array(size 4), "", "") at C:\wamp\www\mahara\lib\dml.php:650
[19-Sep-2011 19:24:16] * get_records_sql_assoc("SELECT u.id, u.username, u.preferredname, u.firstn...", array(size 4)) at C:\wamp\www\mahara\lib\user.php:1330
[19-Sep-2011 19:24:16] * get_users_data(array(size 10), false) at C:\wamp\www\mahara\lib\user.php:1439
[19-Sep-2011 19:24:16] * build_userlist_html(array(size 5), "find", false) at C:\wamp\www\mahara\user\find.php:56
[19-Sep-2011 19:24:16]
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\errors.php:745) Failed to get a recordset: mysql error: [2006: MySQL server has gone away] in EXECUTE("SELECT * FROM "mahara_export_installed" ORDER BY name ")
[19-Sep-2011 19:24:16] [WAR] 66 (C:\wamp\www\mahara\lib\errors.php:745) Command was: SELECT * FROM "mahara_export_installed" ORDER BY name
[19-Sep-2011 19:24:16] Call stack (most recent first):
[19-Sep-2011 19:24:16] * log_message("Failed to get a recordset: mysql error: [2006: MyS...", 8, true, true) at C:\wamp\www\mahara\lib\errors.php:109
[19-Sep-2011 19:24:16] * log_warn("Failed to get a recordset: mysql error: [2006: MyS...") at C:\wamp\www\mahara\lib\errors.php:745
[19-Sep-2011 19:24:17] * SQLException->__construct("Failed to get a recordset: mysql error: [2006: MyS...") at C:\wamp\www\mahara\lib\dml.php:484
[19-Sep-2011 19:24:17] * get_recordset_sql("SELECT * FROM "mahara_export_installed" ORDER BY n...", null) at C:\wamp\www\mahara\lib\dml.php:440
[19-Sep-2011 19:24:17] * get_recordset_select("export_installed", "", null, "name", "*", "", "") at C:\wamp\www\mahara\lib\dml.php:404
[19-Sep-2011 19:24:17] * get_recordset("export_installed", "", "", "name", "*", "", "") at C:\wamp\www\mahara\lib\dml.php:569
[19-Sep-2011 19:24:17] * get_records_assoc("export_installed", "", "", "name") at C:\wamp\www\mahara\lib\mahara.php:1158
[19-Sep-2011 19:24:17] * plugins_installed("export") at C:\wamp\www\mahara\lib\web.php:1966
[19-Sep-2011 19:24:17] * mahara_standard_nav() at C:\wamp\www\mahara\lib\web.php:2089
[19-Sep-2011 19:24:17] * main_nav() at C:\wamp\www\mahara\lib\web.php:399
[19-Sep-2011 19:24:17] * smarty(array(size 0), array(size 0), array(size 0), array(size 1)) at C:\wamp\www\mahara\lib\errors.php:577
[19-Sep-2011 19:24:17] * MaharaException->handle_exception() at C:\wamp\www\mahara\lib\errors.php:472
[19-Sep-2011 19:24:17] * exception(object(SQLException)) at Unknown:0
[19-Sep-2011 19:24:17]
[19-Sep-2011 19:24:17] [WAR] 66 (C:\wamp\www\mahara\lib\errors.php:586) Exception thrown by smarty call while handling exception
[19-Sep-2011 19:24:17] Call stack (most recent first):
[19-Sep-2011 19:24:17] * log_message("Exception thrown by smarty call while handling exc...", 8, true, true) at C:\wamp\www\mahara\lib\errors.php:109
[19-Sep-2011 19:24:17] * log_warn("Exception thrown by smarty call while handling exc...") at C:\wamp\www\mahara\lib\errors.php:586
[19-Sep-2011 19:24:17] * MaharaException->handle_exception() at C:\wamp\www\mahara\lib\errors.php:472
[19-Sep-2011 19:24:17] * exception(object(SQLException)) at Unknown:0
[19-Sep-2011 19:24:17]
[19-Sep-2011 19:24:18] ADODB Error: Can't connect to MySQL server on 'localhost' (10061)
My SQL Log
110919 19:24:12 InnoDB: Assertion failure in thread 4684 in file .\btr\btr0pcur.c line 217
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.1/en/forcing-recovery.html
InnoDB: about forcing recovery.
110919 19:24:12 - mysqld got exception 0xc0000005 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help diagnose
the problem, but since we have already crashed, something is definitely wrong
and this may fail.
key_buffer_size=16777216
read_buffer_size=1048576
max_used_connections=9
max_threads=151
threads_connected=1
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 326584 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
thd: 0x4b08c78
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
006FF672 mysqld.exe!???
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 032B8828=SELECT u.id, u.username, u.preferredname, u.firstname, u.lastname, u.admin, u.staff, u.deleted,
u.profileicon, u.email,
0 AS pending, ap.value AS hidenamepref,
COALESCE((SELECT ap.value FROM "mahara_usr_account_preference" ap WHERE ap.usr = u.id AND ap.field = 'messages'), 'allow') AS messages,
COALESCE((SELECT ap.value FROM "mahara_usr_account_preference" ap WHERE ap.usr = u.id AND ap.field = 'friendscontrol'), 'auth') AS friendscontrol,
(SELECT 1 FROM "mahara_usr_friend" WHERE ((usr1 = '25' AND usr2 = u.id) OR (usr2 = '25' AND usr1 = u.id))) AS friend,
(SELECT 1 FROM "mahara_usr_friend_request" fr WHERE fr.requester = '25' AND fr.owner = u.id) AS requestedfriendship,
(SELECT title FROM "mahara_artefact" WHERE artefacttype = 'introduction' AND owner = u.id) AS introduction,
NULL AS message
FROM "mahara_usr" u
LEFT JOIN "mahara_usr_account_preference"
thd->thread_id=4758
thd->killed=NOT_KILLED
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.
InnoDB: Thread 5204 stopped in file .\os\os0sync.c line 271
InnoDB: Thread 4872 stopped in file .\sync\sync0arr.c line 337
InnoDB: Thread 3388 stopped in file .\os\os0sync.c line 574
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
110919 19:24:36 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
InnoDB: Last MySQL binlog file position 0 1375413, file name .\mysql-bin.000490
110919 19:24:36 InnoDB: Started; log sequence number 0 357145218
110919 19:24:36 [Note] Recovering after a crash using mysql-bin
110919 19:24:36 [Note] Starting crash recovery...
110919 19:24:36 [Note] Crash recovery finished.
110919 19:24:36 [Note] Event Scheduler: Loaded 0 events
110919 19:24:36 [Note] wampmysqld: ready for connections.
Version: '5.1.33-community-log' socket: '' port: 3306 MySQL Community Server (GPL)
The MySQL database appears to loose connectivty according to the first error message above - but I'd like to find the cause.
Moodle and Mahara databases are run from the same MySQL instance with schema names school_mahara and school_moodle. The Mahara schema has a database prefix mahara_ and Moodle has the prefix mdl_
The Moodle and Mahara web roots are c:\wamp\www\moodle and c:\wamp\www\mahara\ respectively.
Mahara appears to function perfectly otherwise.
I have dumped the MySQL Mahara tables and rebuilt the Mahara instance with a fresh (updated) version of the Mahara code - still with FIND FRIENDS casuing a MySQL crash.
I'd appreciate any help and ideas as to what I could try next. Thanks.
19 September 2011, 16:33
Hi David,
It looks like you have either found a MySQL bug or the version of MySQL you are using has been badly compiled / linked.
There's of course nothing that Mahara can do if the database stops responding and if Mahara is able to crash the DB server by issuing queries, that's definitely a bug in MySQL :)
Cheers,
Francois