Loading...
 
Features / Usability

Features / Usability


Lost Tiki database connection

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?

posts: 3665 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.
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!

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

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?


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

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.


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

posts: 126

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

Has anyone got any other suggestions?

posts: 3665 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.
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.

Upcoming Events

1)  18 Apr 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  16 May 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting
4)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
5)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7) 
Tiki birthday
8)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
9)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
10)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting