Migration/Import Database Errors

rottie_girl

Joined: 2005-08-01
Posts: 12
Posted: Fri, 2007-10-05 14:48

Hello there...

So I've finally taken the initiative to update to Gallery 2. I followed all the steps to migrate and installed Gallery 2 with no issues.

I then began the process to import my data from G1. Follwed Data Migration step 1 and clicked Install/Update...things appeared to go well and then I got the ERROR_STORAGE_FAILURE error. I followed the steps to correct that. However now when I go to my Gallery home page this is all I see:

Quote:
Database Error
An error has occurred while interacting with the database.
The exact nature of database errors is not captured unless Gallery debug mode is enabled in config.php. Before seeking support for this error please enable buffered debug output and retry the operation. Look near the bottom of the lengthy debug output to find error details.
Back to the Gallery
Error Detail -
Error (ERROR_STORAGE_FAILURE)
• in modules/core/classes/GalleryStorage.class at line 480 (gallerycoreapi::error)
• in modules/core/classes/Gallery.class at line 202 (mysqlstorage::search)
• in modules/core/classes/helpers/GalleryItemHelper_simple.class at line 265 (gallery::search)
• in modules/core/classes/helpers/GalleryItemHelper_simple.class at line 167 (galleryitemhelper_simple::fetchuncacheddescendentcounts)
• in modules/core/classes/GalleryCoreApi.class at line 1436 (galleryitemhelper_simple::fetchdescendentcounts)
• in modules/core/classes/GalleryTheme.class at line 1366 (gallerycoreapi::fetchdescendentcounts)
• in themes/matrix/theme.inc at line 65 (matrixtheme::loadcommontemplatedata)
• in modules/core/classes/GalleryTheme.class at line 926 (matrixtheme::showalbumpage)
• in modules/core/classes/GalleryView.class at line 308 (matrixtheme::loadtemplate)
• in main.php at line 441 (showitemview::doloadtemplate)
• in main.php at line 94
• in main.php at line 83
System Information
Gallery version 2.2.3
PHP version 4.4.1 apache
Webserver Apache
Database mysqlt 4.0.27
Toolkits ImageMagick, NetPBM
Operating system FreeBSD st33.startlogic.com 4.11-STABLE FreeBSD 4.11-STABLE #0: Thu Jun i386
Browser Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)

Thoughts? Ideas? Next steps? I don't know how to run the DeBug mode that was suggested and figured I'd make things worse if I tried...

I'm a bit of non-techy, so simple words would be helpful :)


G2 URL (optional):http://arottalove.org/gallery/main.php
G2 version: 2.2.3
G1 URL (optional): www.arottalove.org/G1
G1 version: 1.5
G1 character set:
PHP memory limit:
--
PHP version (e.g. 5.1.6): 4.4.1 apache
PHPInfo Link (see FAQ):
Webserver (e.g. Apache 1.3.33):
Database (e.g. MySql 5.0.32): mysqlt 4.0.27
Activated toolkits (e.g. NetPbm, GD): ImageMagick, NetPBM
Operating system (e.g. Linux): FreeBSD st33.startlogic.com 4.11-STABLE FreeBSD 4.11-STABLE #0: Thu Jun i386
Browser (e.g. Firefox 2.0): IE 7

 
rottie_girl

Joined: 2005-08-01
Posts: 12
Posted: Fri, 2007-10-05 15:03

Ok, so I changed the config.php to buffered debug mode...now my "http://arottalove.org/gallery/main.php
" is a total mess of data, but this is the error listed at the bottom of the page:

Quote:
1030: Got error 124 from table handler

adodb_mysqlt._execute(
SELECT
iam0.g_itemId,
COUNT(iam1.g_itemId)
FROM
g2_ItemAttributesMap AS iam0,
g2_ItemAttributesMap AS iam1,
g2...) % line 870, file: adodb.inc.php

adodb_mysqlt.execute(
SELECT
iam0.g_itemId,
COUNT(iam1.g_itemId)
FROM
g2_ItemAttributesMap AS iam0,
g2_ItemAttributesMap AS iam1,
g2..., Array[726]) % line 473,
file: GalleryStorage.class

mysqlstorage.search(
SELECT
[GalleryItemAttributesMap=1::itemId],
COUNT([GalleryItemAttributesMap=2::itemId])
FROM
[GalleryItemAttributes..., Array[726], Array[0]) % line 202, file: Gallery.class
gallery.search(
SELECT
[GalleryItemAttributesMap=1::itemId],
COUNT([GalleryItemAttributesMap=2::itemId])
FROM
[GalleryItemAttributes..., Array[726]) % line 265, file: GalleryItemHelper_simple.class
galleryitemhelper_simple.fetchuncacheddescendentcounts(Array[5],
6) % line 167, file: GalleryItemHelper_simple.class

Loading plugin comment Class not defined, trying to include it. file_exists(/home/arottalo/public_html/gallery/modules/comment/module.inc) comment plugin successfully instantiated Loading plugin customfield Class not defined, trying to include it. file_exists(/home/arottalo/public_html/gallery/modules/customfield/module.inc) customfield plugin successfully instantiated Loading plugin hidden Class not defined, trying to include it. file_exists(/home/arottalo/public_html/gallery/modules/hidden/module.inc) hidden plugin successfully instantiated Loading plugin migrate Class not defined, trying to include it. file_exists(/home/arottalo/public_html/gallery/modules/migrate/module.inc) migrate plugin successfully instantiated Loading plugin rating Class not defined, trying to include it. file_exists(/home/arottalo/public_html/gallery/modules/rating/module.inc) rating plugin successfully instantiated Loading plugin rewrite Class not defined, trying to include it. file_exists(/home/arottalo/public_html/gallery/modules/rewrite/module.inc) rewrite plugin successfully instantiated Loading plugin core core plugin successfully instantiated getParameter default.theme for core plugin Loading plugin matrix matrix plugin successfully instantiated Check the version of the matrix plugin The version of the matrix plugin is ok Loading plugin core core plugin successfully instantiated Check the version of the core plugin The version of the core plugin is ok getParameter id.adminGroup for core plugin realpath(/home/arottalo/public_html/gallery/modules/core/classes/../../../) realpath(/home/arottalo/public_html/gallery/)
--------------------------------------------------------------------------------
(mysqlt): SELECT g_mimeType, g_toolkitId, g_priority FROM g2_TkOperatnMimeTypeMap WHERE g_operationName='thumbnail' ORDER BY g_mimeType ASC, g_priority ASC
--------------------------------------------------------------------------------
file_exists(/home/arottalo/public_html/gallery/g2data_2dbaf33600/smarty/templates_c/%%2823217704) is_dir(/home/arottalo/public_html/gallery/g2data_2dbaf33600/smarty/templates_c/%%2823217704) file_exists(/home/arottalo/public_html/gallery/g2data_2dbaf33600/smarty/templates_c/%%2823217704) is_writeable(/home/arottalo/public_html/gallery/g2data_2dbaf33600/smarty/templates_c/%%2823217704) file_exists(/home/arottalo/public_html/gallery/g2data_2dbaf33600/smarty/templates_c/%%2823217704/v_12) file_exists(/home/arottalo/public_html/gallery/modules/core/classes/../../../lib/javascript/local/BlockToggle.js) file_exists(/home/arottalo/public_html/gallery/modules/core/../../themes/matrix/local/theme.css) file_exists(/home/arottalo/public_html/gallery/modules/core/classes/../../../themes/matrix/local/theme.css)

Is that what I'm looking for? Is it helpful?

 
rottie_girl

Joined: 2005-08-01
Posts: 12
Posted: Fri, 2007-10-05 22:16

Ok, newest development...stepped away from it for a few hours then went back and things seemed to be fine?!?!?!

Started importing the remaining albums from G1, this time only a handful at time thinking that maybe it was a size issue...things went smoothly for about 5 batches of 10 albums each and then I got the ERROR_STORAGE deal again..

Went back into debug mode, and this is the error I received this time:

Quote:
1030: Got error 127 from table handler

adodb_mysqlt._execute(
SELECT
iam0.g_itemId,
COUNT(iam1.g_itemId)
FROM
g2_ItemAttributesMap AS iam0,
g2_ItemAttributesMap AS iam1,
g2...) % line 870, file: adodb.inc.php

adodb_mysqlt.execute(
SELECT
iam0.g_itemId,
COUNT(iam1.g_itemId)
FROM
g2_ItemAttributesMap AS iam0,
g2_ItemAttributesMap AS iam1,
g2..., Array[61]) % line 473, file:
GalleryStorage.class

mysqlstorage.search(
SELECT
[GalleryItemAttributesMap=1::itemId],
COUNT([GalleryItemAttributesMap=2::itemId])
FROM
[GalleryItemAttributes..., Array[61], Array[0]) % line 202, file: Gallery.class
gallery.search(
SELECT
[GalleryItemAttributesMap=1::itemId],
COUNT([GalleryItemAttributesMap=2::itemId])
FROM
[GalleryItemAttributes..., Array[61]) % line 265, file: GalleryItemHelper_simple.class
galleryitemhelper_simple.fetchuncacheddescendentcounts(Array[5],
6) % line 167, file: GalleryItemHelper_simple.class

I guess I don't understand how I'm getting different errors for doing the same thing?

This is what happens when you make this stuff available to the masses who know just enough to get ourselves hosed... :(

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2007-10-05 23:13
Quote:
stepped away from it for a few hours then went back and things seemed to be fine?!?!?!

I suspect that you might be running into this issue:
FAQ: I seem to be running into some sort of MySQL query limit, is there anything that can be done?
Try to import smaller chucks over a longer period of time.

A google search yielded some tables need repair. can you repair tables with phpMyadmin?

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
rottie_girl

Joined: 2005-08-01
Posts: 12
Posted: Fri, 2007-10-05 23:58

My host is StartLogic and I use vDeck and phpMyAdmin for database stuff...they do have a check/repair feature for databases that will give warnings that you can repair...I've checked that at each failure and have repaired a few along the way, but they are currently all registering as ok...

As for the query limit...I was thinking the same thing...I'm leaving it alone for a bit again...but the different error numbers has me perplexed...

In regards to the query limits...has anyone found this to be a problem outside of importing large amounts rapidly...I ask because I have a number of users who'll upload 5-20 pictures at any given time and would hate to think the Gallery is going to be errored out and offline for an hour every time they do that...

Thanks for the assist....

 
rottie_girl

Joined: 2005-08-01
Posts: 12
Posted: Sat, 2007-10-06 00:07

So I just tried the Gallery again (it's been 1.5 hours) and I still have the ERROR_STORAGE error, but now as I read down the debug the 1030 error is gone, but has been replaced by:

Quote:
mysqlt error: [1062: Duplicate entry '6-7' for key 1] in EXECUTE("INSERT INTO g2_DescendentCountsMap (g_userId, g_itemId, g_descendentCount) VALUES (6,7,871)")
--------------------------------------------------------------------------------
(mysqlt): INSERT INTO g2_DescendentCountsMap (g_userId, g_itemId, g_descendentCount) VALUES (6,7,871)
--------------------------------------------------------------------------------
1062: Duplicate entry '6-7' for key 1

adodb_mysqlt._execute(INSERT INTO g2_DescendentCountsMap
(g_userId, g_itemId, g_descendentCount) VALUES (6,7,871)) % line 870, file: adodb.inc.php

adodb_mysqlt.execute(INSERT INTO
g2_DescendentCountsMap (g_userId, g_itemId, g_descendentCount) VALUES
(?,?,?), Array[3]) % line 998, file:
GalleryStorageExtras.class

gallerystorageextras.addmapentry(GalleryDescendentCountsMap,
Array[3]) % line 505, file: GalleryStorage.class
mysqlstorage.addmapentry(GalleryDescendentCountsMap,
Array[3]) % line 2841, file: GalleryCoreApi.class
gallerycoreapi.addmapentry(GalleryDescendentCountsMap,
Array[3]) % line 176, file: GalleryItemHelper_simple.class

I've done nothing to it in mean time??? Is this usual for php? Can errors just come and go without user intervention??

---------------------------

G2 URL (optional):http://arottalove.org/gallery/main.php
G2 version: 2.2.3
G1 URL (optional): www.arottalove.org/G1
G1 version: 1.5
G1 character set:??
PHP memory limit: ??
--
PHP version (e.g. 5.1.6): 4.4.1 apache
PHPInfo Link (see FAQ):
Webserver (e.g. Apache 1.3.33):
Database (e.g. MySql 5.0.32): mysqlt 4.0.27
Activated toolkits (e.g. NetPbm, GD): ImageMagick, NetPBM
Operating system (e.g. Linux): FreeBSD st33.startlogic.com 4.11-STABLE FreeBSD 4.11-STABLE #0: Thu Jun i386
Browser (e.g. Firefox 2.0): IE 7

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sat, 2007-10-06 02:44
Quote:
In regards to the query limits...has anyone found this to be a problem outside of importing large amounts rapidly...

I have experienced in on a couple of hosts. Only when importing G1 items. I have not seen this limit in regular use on the same hosts.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
rottie_girl

Joined: 2005-08-01
Posts: 12
Posted: Sat, 2007-10-06 15:34

I woke up this morning and it's back up and running, so I'm going to guess that it's a query limit deal...

Hopefully floridave is correct and once I'm done moving everything over it won't continue to happen...

But now I have new anomoly...but I'll start a new thread for that...

Thanks!