{"action":"created","issue":{"url":"https://api.github.com/repos/Elgg/Elgg/issues/9057","repository_url":"https://api.github.com/repos/Elgg/Elgg","labels_url":"https://api.github.com/repos/Elgg/Elgg/issues/9057/labels{/name}","comments_url":"https://api.github.com/repos/Elgg/Elgg/issues/9057/comments","events_url":"https://api.github.com/repos/Elgg/Elgg/issues/9057/events","html_url":"https://github.com/Elgg/Elgg/issues/9057","id":113187861,"number":9057,"title":"Elgg 2.0: tables crashing!","user":{"login":"iionly","id":1773681,"avatar_url":"https://avatars.githubusercontent.com/u/1773681?v=3","gravatar_id":"","url":"https://api.github.com/users/iionly","html_url":"https://github.com/iionly","followers_url":"https://api.github.com/users/iionly/followers","following_url":"https://api.github.com/users/iionly/following{/other_user}","gists_url":"https://api.github.com/users/iionly/gists{/gist_id}","starred_url":"https://api.github.com/users/iionly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iionly/subscriptions","organizations_url":"https://api.github.com/users/iionly/orgs","repos_url":"https://api.github.com/users/iionly/repos","events_url":"https://api.github.com/users/iionly/events{/privacy}","received_events_url":"https://api.github.com/users/iionly/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-10-24T22:33:06Z","updated_at":"2016-04-07T09:26:26Z","closed_at":"2016-04-07T09:26:26Z","body":"I'm using MariaDB (version 10.0.21) and this might be part of the problem with tables crashing.\r\n\r\nFirst time at all that I had a problem with tables crashing was happening both on 1.X and 2.X not long ago and in this case it was due to the archive engine not being loaded (https://github.com/Elgg/Elgg/issues/8741). Then I had another issue with table crashing because the AriaDB engine of MariaDB not being able to handle delayed queries (https://github.com/Elgg/Elgg/issues/8744). Fixed that by using \"max_delayed_threads = 0\" in my.cnf.\r\n\r\nBut now I have yet another issue with table crashing. Now it happens only on Elgg 2.0 (beta) and in this case it's the private_settings table that crashed. Twice! It seems to happen when garbagecollector runs (weekly cron). Though I'm not sure because after repairing the table I couldn't reproduce the crash when I re-run the cronjobs.\r\n\r\nAnyone else has similar problems?\r\n\r\nLog entries:\r\n```\r\n[Sun Oct 25 00:00:04.032187 2015] [php5:error] [pid 23481] [client 127.0.0.1:43835] Exception #1445724004: exception 'DatabaseException' with message 'An exception occurred while executing 'SELECT value FROM elgg_private_settings\\n\\t\\t\\twhere name = 'period' and entity_guid = 23':\\n\\nSQLSTATE[HY000]: General error: 144 Table './elgg20zip/elgg_private_settings' is marked as crashed and last (automatic?) repair failed\\n\\n QUERY: SELECT value FROM elgg_private_settings\\n\\t\\t\\twhere name = 'period' and entity_guid = 23' in /xxx/elgg/elgg/engine/classes/Elgg/Database.php:413\\nStack trace:\\n#0 /xxx/elgg/elgg/engine/classes/Elgg/Database.php(366): Elgg\\\\Database->executeQuery('SELECT value FR...', Object(Doctrine\\\\DBAL\\\\Connection))\\n#1 /xxx/elgg/elgg/engine/classes/Elgg/Database.php(217): Elgg\\\\Database->getResults('SELECT value FR...', '', true)\\n#2 /xxx/elgg/elgg/engine/classes/Elgg/Database/PrivateSettingsTable.php(312): Elgg\\\\Database->getDataRow('SELECT value FR...')\\n#3 /xxx/elgg/elgg/engine/lib/private_settings.php(67): Elgg\\\\Database\\\\PrivateSettingsTable->get(23, 'period')\\n#4 /xxx/elgg/elgg/engine/classes/ElggEntity.php(657): get_private_setting(23, 'period')\\n#5 /xxx/elgg/elgg/engine/classes/ElggPlugin.php(877): ElggEntity->getPrivateSetting('period')\\n#6 /xxx/elgg/elgg/engine/classes/ElggPlugin.php(278): ElggPlugin->__get('period')\\n#7 /xxx/elgg/elgg/engine/classes/Elgg/Database/Plugins.php(938): ElggPlugin->getSetting('period', NULL)\\n#8 /xxx/elgg/elgg/engine/lib/plugins.php(361): Elgg\\\\Database\\\\Plugins->getSetting('period', 'logrotate', NULL)\\n#9 /zzz/elgg20zip/mod/logrotate/start.php(40): elgg_get_plugin_setting('period', 'logrotate')\\n#10 [internal function]: logrotate_archive_cron('cron', 'weekly', '', Array)\\n#11 /xxx/elgg/elgg/engine/classes/Elgg/PluginHooksService.php(38): call_user_func_array('logrotate_archi...', Array)\\n#12 /xxx/elgg/elgg/engine/lib/elgglib.php(800): Elgg\\\\PluginHooksService->trigger('cron', 'weekly', Array, '')\\n#13 /xxx/elgg/elgg/engine/lib/cron.php(67): elgg_trigger_plugin_hook('cron', 'weekly', Array, '')\\n#14 [internal function]: _elgg_cron_page_handler(Array, 'cron')\\n#15 /xxx/elgg/elgg/engine/classes/Elgg/Router.php(80): call_user_func('_elgg_cron_page...', Array, 'cron')\\n#16 /xxx/elgg/elgg/engine/classes/Elgg/Application.php(393): Elgg\\\\Router->route(Object(Elgg\\\\Http\\\\Request))\\n#17 /xxx/elgg/elgg/engine/classes/Elgg/Application.php(349): Elgg\\\\Application->run()\\n#18 /zzz/elgg20zip/index.php(8): Elgg\\\\Application::index()\\n#19 {main}\r\n[Sun Oct 25 00:00:04.162988 2015] [php5:error] [pid 23481] [client 127.0.0.1:43835] Exception #1445724004 : fatal error in exception handler : An exception occurred while executing 'SELECT value FROM elgg_private_settings\\n\\t\\t\\twhere name = 'elggx_fivestar_view' and entity_guid = 138':\\n\\nSQLSTATE[HY000]: General error: 144 Table './elgg20zip/elgg_private_settings' is marked as crashed and last (automatic?) repair failed\\n\\n QUERY: SELECT value FROM elgg_private_settings\\n\\t\\t\\twhere name = 'elggx_fivestar_view' and entity_guid = 138\r\n[Sun Oct 25 00:01:01.626306 2015] [php5:error] [pid 682] [client 127.0.0.1:43872] Exception #1445724061: exception 'DatabaseException' with message 'An exception occurred while executing 'SELECT  e.*, plugin_oe.*, r.id FROM elgg_entities e  JOIN elgg_private_settings ps on ps.entity_guid = e.guid  JOIN elgg_objects_entity plugin_oe on plugin_oe.guid = e.guid  JOIN elgg_entity_relationships r on r.guid_one = e.guid  WHERE  ps.name = 'elgg:internal:priority' AND  (r.relationship = 'active_plugin' AND r.guid_two = '1') AND  ((e.type = 'object' AND e.subtype IN (1))) AND  (e.site_guid IN (1)) AND ((1 = 1) AND (e.enabled = 'yes')) ORDER BY CAST(ps.value as unsigned), e.guid':\\n\\nSQLSTATE[HY000]: General error: 144 Table './elgg20zip/elgg_private_settings' is marked as crashed and last (automatic?) repair failed\\n\\n QUERY: SELECT  e.*, plugin_oe.*, r.id FROM elgg_entities e  JOIN elgg_private_settings ps on ps.entity_guid = e.guid  JOIN elgg_objects_entity plugin_oe on plugin_oe.guid = e.guid  JOIN elgg_entity_relationships r on r.guid_one = e.guid  WHERE  ps.name = 'elgg:internal:priority' AND  (r.relationship = 'active_plugin' AND r.guid_two = '1') AND  ((e.type = 'object' AND e.subtype IN (1))) AND  (e.site_guid IN (1)) AND ((1 = 1) AND (e.enabled = 'yes')) ORDER BY CAST(ps.value as unsigned), e.guid' in /xxx/elgg/elgg/engine/classes/Elgg/Database.php:413\\nStack trace:\\n#0 /xxx/elgg/elgg/engine/classes/Elgg/Database.php(366): Elgg\\\\Database->executeQuery('SELECT  e.*, pl...', Object(Doctrine\\\\DBAL\\\\Connection))\\n#1 /xxx/elgg/elgg/engine/classes/Elgg/Database.php(200): Elgg\\\\Database->getResults('SELECT  e.*, pl...', '', false)\\n#2 /xxx/elgg/elgg/engine/classes/Elgg/Database/EntityTable.php(599): Elgg\\\\Database->getData('SELECT  e.*, pl...')\\n#3 /xxx/elgg/elgg/engine/lib/entities.php(507): Elgg\\\\Database\\\\EntityTable->fetchFromSql('SELECT  e.*, pl...', NULL)\\n#4 /xxx/elgg/elgg/engine/classes/Elgg/Database/EntityTable.php(471): _elgg_fetch_entities_from_sql('SELECT  e.*, pl...', NULL)\\n#5 /xxx/elgg/elgg/engine/classes/Elgg/Database/MetadataTable.php(484): Elgg\\\\Database\\\\EntityTable->getEntities(Array)\\n#6 /xxx/elgg/elgg/engine/classes/Elgg/Database/RelationshipsTable.php(347): Elgg\\\\Database\\\\MetadataTable->getEntities(Array)\\n#7 /xxx/elgg/elgg/engine/lib/relationships.php(205): Elgg\\\\Database\\\\RelationshipsTable->getEntities(Array)\\n#8 /xxx/elgg/elgg/engine/classes/Elgg/Database/Plugins.php(413): elgg_get_entities_from_relationship(Array)\\n#9 /xxx/elgg/elgg/engine/classes/Elgg/Database/Plugins.php(338): Elgg\\\\Database\\\\Plugins->find('active')\\n#10 /xxx/elgg/elgg/engine/classes/Elgg/Application.php(255): Elgg\\\\Database\\\\Plugins->load()\\n#11 /xxx/elgg/elgg/engine/classes/Elgg/Application.php(391): Elgg\\\\Application->bootCore()\\n#12 /xxx/elgg/elgg/engine/classes/Elgg/Application.php(349): Elgg\\\\Application->run()\\n#13 /zzz/elgg20zip/index.php(8): Elgg\\\\Application::index()\\n#14 {main}\r\n```"},"comment":{"url":"https://api.github.com/repos/Elgg/Elgg/issues/comments/206780433","html_url":"https://github.com/Elgg/Elgg/issues/9057#issuecomment-206780433","issue_url":"https://api.github.com/repos/Elgg/Elgg/issues/9057","id":206780433,"user":{"login":"jdalsem","id":861833,"avatar_url":"https://avatars.githubusercontent.com/u/861833?v=3","gravatar_id":"","url":"https://api.github.com/users/jdalsem","html_url":"https://github.com/jdalsem","followers_url":"https://api.github.com/users/jdalsem/followers","following_url":"https://api.github.com/users/jdalsem/following{/other_user}","gists_url":"https://api.github.com/users/jdalsem/gists{/gist_id}","starred_url":"https://api.github.com/users/jdalsem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdalsem/subscriptions","organizations_url":"https://api.github.com/users/jdalsem/orgs","repos_url":"https://api.github.com/users/jdalsem/repos","events_url":"https://api.github.com/users/jdalsem/events{/privacy}","received_events_url":"https://api.github.com/users/jdalsem/received_events","type":"User","site_admin":false},"created_at":"2016-04-07T09:26:26Z","updated_at":"2016-04-07T09:26:26Z","body":"There are no similar reports, so assuming for now the problem is related to your specific situation. If you have more information please let us know"}}