#1 2014-08-31 20:52:05

mendip_discovery
Member
Mendip Hills, Somerset, UK
2012-05-19
91

[Solved] Images Table possibly Corrupt

Hello,

I have had a nightmare trying to work out why Piwigo keeps crashing my webserver but I am now remembering I had this issue once before and it was fixed by me moving over to a new server where I then re-added all the images to the database. As often I get errors saying table 'images' is crashed I wonder if its has got an error in it from a database update that went wrong.

Is there a way to check my database for errors that could cause queries to run slow on the server. I am wondering if there is a bit of text that is in the wrong column so causing issues.


Thank you, Jack

Piwigo version: 2.6.3
PHP version: 5.4.32
MySQL version:  5.5.39
Piwigo URL: http://gallery.jackstringer.co.uk

Last edited by mendip_discovery (2014-09-28 13:00:55)

Offline

 

#2 2014-08-31 23:14:06

flop25
Piwigo Team
2006-07-06
7037

Re: [Solved] Images Table possibly Corrupt

Hi
just go to you databse manager and click Repair
This kind of issues server sided (hard drive, server malfunction...)


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#3 2014-09-01 08:32:33

mendip_discovery
Member
Mendip Hills, Somerset, UK
2012-05-19
91

Re: [Solved] Images Table possibly Corrupt

Sadly Flop its not that simple.

I can do a repair via PhpMyAdmin and that gets the site working again but the webserver still has to work hard to deliver the webpages. High execution times for mySQL.

It has ran fine for a year and at somepoint in Feb I think a mysql upgrade caused a version error because the databases didn't have the mysql upgrade script run on them which I have now done. Since then the piwigo site has caused the server to take up lots of memory and high cpu load. The server is a 1and1 VPS with 2 cpu, 4gb RAM running Plesk as the webadmin.

This also happened once before on a server and I solved it by swapping servers and then deleting all images and re-adding them to the server.

Offline

 

#4 2014-09-01 09:50:40

flop25
Piwigo Team
2006-07-06
7037

Re: [Solved] Images Table possibly Corrupt

So you would have to check for the slow queries
check the local config of Piwigo to display the queries time etc And enable the mysql slow log on your server


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#5 2014-09-03 19:59:25

mendip_discovery
Member
Mendip Hills, Somerset, UK
2012-05-19
91

Re: [Solved] Images Table possibly Corrupt

MySQL Server running for only 30mins or so as it looks like it crashed again.

Code:

  /usr/libexec/mysqld, Version: 5.5.39 (MySQL Community Server (GPL) by Remi). started with:
Tcp port: 3306  Unix socket: /var/lib/mysql/mysql.sock
Time                 Id Command    Argument
# Time: 140903 18:18:26
# User@Host: piwigo_user[piwigo_user] @ localhost []
# Query_time: 5.535561  Lock_time: 0.000653 Rows_sent: 147352  Rows_examined: 589408
use piwigo;
SET timestamp=1409764706;
SELECT DISTINCT(image_id)
  FROM piwigo_image_category
    INNER JOIN piwigo_images ON id = image_id
  WHERE
    1=1

# Time: 140903 18:24:32
# User@Host: piwigo_user[piwigo_user] @ localhost []
# Query_time: 63.627989  Lock_time: 0.667506 Rows_sent: 147352  Rows_examined: 589408
SET timestamp=1409765072;
SELECT DISTINCT(image_id)
  FROM piwigo_image_category
    INNER JOIN piwigo_images ON id = image_id
  WHERE
    1=1

  ORDER BY file ASC, date_creation DESC;
# Time: 140903 18:24:36
# User@Host: piwigo_user[piwigo_user] @ localhost []
# Query_time: 67.439250  Lock_time: 0.256758 Rows_sent: 147352  Rows_examined: 589408
SET timestamp=1409765076;
SELECT DISTINCT(image_id)
  FROM piwigo_image_category
    INNER JOIN piwigo_images ON id = image_id
  WHERE
    1=1

  ORDER BY file ASC, date_creation DESC;
# Time: 140903 18:24:42
# User@Host: piwigo_user[piwigo_user] @ localhost []
# Query_time: 73.724821  Lock_time: 0.072095 Rows_sent: 147352  Rows_examined: 589408
SET timestamp=1409765082;
SELECT DISTINCT(image_id)
  FROM piwigo_image_category
    INNER JOIN piwigo_images ON id = image_id
  WHERE
    1=1

  ORDER BY file ASC, date_creation DESC;
# User@Host: piwigo_user[piwigo_user] @ localhost []
# Query_time: 76.847180  Lock_time: 1.195185 Rows_sent: 147352  Rows_examined: 589408
SET timestamp=1409765084;
SELECT DISTINCT(image_id)
  FROM piwigo_image_category
    INNER JOIN piwigo_images ON id = image_id
  WHERE
    1=1

  ORDER BY file ASC, date_creation DESC;
# Time: 140903 18:24:48
# User@Host: piwigo_user[piwigo_user] @ localhost []
# Query_time: 79.574701  Lock_time: 0.650917 Rows_sent: 147352  Rows_examined: 589408
SET timestamp=1409765088;
SELECT DISTINCT(image_id)
  FROM piwigo_image_category
    INNER JOIN piwigo_images ON id = image_id
  WHERE
    1=1

  ORDER BY file ASC, date_creation DESC;

Offline

 

#6 2014-09-03 20:06:15

mendip_discovery
Member
Mendip Hills, Somerset, UK
2012-05-19
91

Re: [Solved] Images Table possibly Corrupt

My my.cnf is simple as did use mysqltuner but it just ended up making the site slower.

[mysqld]
bind-address=127.0.0.1
local-infile=0
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
tmpdir=/var/tmp/

long_query_time = 5

[mysqld_safe]
pid-file=/var/run/mysqld/mysqld.pid

Offline

 

#7 2014-09-28 13:01:30

mendip_discovery
Member
Mendip Hills, Somerset, UK
2012-05-19
91

Re: [Solved] Images Table possibly Corrupt

Fixed. The upgrade to 2.7 has solved what ever issue it was. For now.

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2025 · Contact