Loading...
 
Features / Usability

Features / Usability


Lost Tiki database connection

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?

United States

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.
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!

The restart only helped temporarily, as the db connection fell over about 3 hours later. Will investigate further tonight and report back.

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?


Yep, just a symptom; it went down again. I'll start looking at the other possibilities and report back.

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.


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

Looks like re-running the installer failed. I think I need a clean installation.

Has anyone got any other suggestions?

United States

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.
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.

Upcoming Events

No records to display

Why Register?

Register at tiki.org and you'll be able to use the account at any *.tiki.org site, thanks to the InterTiki feature. A valid email address is required to receive site notifications and occasional newsletters. You can opt out of these items at any time.