Lost Tiki database connection Posted by James Geddes 05 Jun 2019 10:54 GMT-0000 posts: 126 Hi everyone, I was using the Geek.Zone site as normal yesterday, but I went on today to do some work and it is returning; Lost Tiki database connection What do I do?
Posted by Rick Sapir / Tiki for Smarties 05 Jun 2019 12:56 GMT-0000 posts: 3665 Some things to check: Is the database up and running? Is the database accessible? Check your your ../db/local.php file.... Is it readable by Tiki? Is it corrupt? Is the database information correct? Can you re-run the installer (tiki-install.php) and reset your database information? (Do NOT replace the database, though!) Did you review your server error logs to see what caused the problem? HTH, - Rick | My Tiki Blog | My Tiki UserPage Why be a dummy? Get smarty! TikiForSmarties.com Tiki for Smarties, your source for the best (and only) Tiki books, guides, and tutorials.
Posted by James Geddes 05 Jun 2019 13:22 GMT-0000 posts: 126 Soooo... ...I did the typical IT guy thing and turned it off and on again. It seems fine now. I'll investigate the cause of the issue later. Thanks for the pointers though!
Posted by James Geddes 05 Jun 2019 17:28 GMT-0000 posts: 126 The restart only helped temporarily, as the db connection fell over about 3 hours later. Will investigate further tonight and report back.
Posted by James Geddes 06 Jun 2019 14:34 GMT-0000 posts: 126 On running sudo service mysql status MySQL returned Failed to start MySQL Community Server. Since GIYF, I found https://askubuntu.com/questions/455029/mysql-server-start-failed/602087 This suggested sudo service mysql stop sudo rm /var/lib/mysql/ib_logfile0 sudo rm /var/lib/mysql/ib_logfile1 Since that seems a bit dangerous without proper precautions, I first took a copy of ib_logfile0 and ib_logfile1, then removed them. I then restarted the SQL server. So far, it seems to be stable, but only time and Uptime Robot will tell. I will keep everyone informed! I feel like I have only addressed the symptom rather than treating the root cause. What can be done to prevent this?
Posted by James Geddes 07 Jun 2019 08:04 GMT-0000 posts: 126 Yep, just a symptom; it went down again. I'll start looking at the other possibilities and report back.
Posted by James Geddes 07 Jun 2019 09:05 GMT-0000 posts: 126 MySQL logs are reporting; 2019-06-07T06:51:52.795202Z 0 [ERROR] InnoDB: Page [page id: space=0, page number=4] log sequence number 395901167 is in the future! Current system log sequence number 227375385. 2019-06-07T06:51:52.795296Z 0 [ERROR] InnoDB: Your database may be corrupt or you may have copied the InnoDB tablespace but not the InnoDB log files. Please refer to http://dev.mysql.com/doc/refman/5.7/en/forcing-innodb-recovery.html for information about forcing recovery. Urgh.
Posted by James Geddes 10 Jun 2019 19:23 GMT-0000 posts: 126 Right, time to go through all of the things. Is the database up and running? No, keeps crashing. Don't know why. Is the database accessible? Yes - I think so anyway. Check your ../db/local.php file.... Is it readable by Tiki? Yes - the $dbfail_url is forwarding correctly Is it corrupt? Nope Is the database information correct? Yes Can you re-run the installer (tiki-install.php) and reset your database information? (Do NOT replace the database, though!) Restarted MySQL server, re-ran installer. Geek.Zone is currently up but we'll have to see for how long. Did you review your server error logs to see what caused the problem? See above
Posted by James Geddes 11 Jun 2019 10:16 GMT-0000 posts: 126 Looks like re-running the installer failed. I think I need a clean installation. Has anyone got any other suggestions?
Posted by Rick Sapir / Tiki for Smarties 12 Jun 2019 13:06 GMT-0000 posts: 3665 From your log: 2019-06-07T06:51:52.795296Z 0 [ERROR] InnoDB: Your database may be corrupt or you may have copied the InnoDB tablespace but not the InnoDB log files. It looks like your database is corrupt — not necessarily a Tiki issue.. Can your restore from a known good copy? Or try a DB recovery? HTH, - Rick | My Tiki Blog | My Tiki UserPage Why be a dummy? Get smarty! TikiForSmarties.com Tiki for Smarties, your source for the best (and only) Tiki books, guides, and tutorials.
Posted by James Geddes 13 Jun 2019 18:45 GMT-0000 posts: 126 Yea I figured as much. I've taken an XML download of the wiki pages then killed the site entirely. Am working on building from a clean install now using the docker image.