Solved = ERROR_STORAGE_FAILURE on http://gallery.shyelf.com

JonathanPitt
JonathanPitt's picture

Joined: 2005-06-14
Posts: 4
Posted: Wed, 2006-01-04 06:19

Hi Guys and Gals!

Man 'o Man, I sure love Gallery!
I hope to get it running on my domain http://gallery.shyelf.com
My hosting service is with http://ipowerweb.com
I'm having troubles.

I have stored a bunch of debuging info such as (phpinfo.php) here:
http://shyelf.com/debug
http://shyelf.com/debug/ERROR_STORAGE_FAILURE.htm
http://shyelf.com/debug/ERROR_STORAGE_FAILURE-2.htm

ERROR_STORAGE_FAILURE

shyelfco_g2ur is Gallery's database user for Gallery's database

1226: User 'shyelfco_g2ur' has exceeded the 'max_questions' resource (current value: 50000)

Seems that a large volume of pictures triggers this error. A fresh install of Gallery v2.0.2 goes very smoothly. No problems, until I try to minipulate large sums of pictures. Large sums as in about 300 or greater pictures at a time. I have FTP'd all of my pictures into another folder on the server. When I use the add item function to import from local server to get my pictures into an album the error occurs. I can't get out of the error with out starting over. Starting over as in deleting and re-creating the database and deleting all of the g2data and re-running install.

EDIT: actually the site will return to normal operation after about an hour... hmmm. But, the previous task that caused the error is incomplete - such as importing or deleting lets say about 500 pictures, when the gallery become accessable again there will be maybe 150 un-deleted or maybe some non-imported pictures.

I don't have a clear idea what the problem is.

Does STORAGE_FAILURE mean database failure? Is the database failing, then why is the database failing. Or, is the database's functionality locked down by the hosting service? How could it be unlocked? Is Gallery2 incompatable with this particular host setup in some specific way that can be changed? Is this hosting service so bad that I should switch to another one?

I'm not even sure what questions to ask. But, I sure do think you guys and gals are very cool. I'm sure these problems can be figured out.

Check out all the files here - http://shyelf.com/debug

See if the info you need to help me figure this out is at that link above, otherwise let me know what more info you need.

Thanks a Bunch!

Jonathan

EDIT: Possible Solutions Found (via google search)?:
Am I getting a mysql 'max_questions' error?
http://www.google.com/search?num=100&hl=en&lr=lang_en&newwindow=1&safe=off&as_qdr=all&q=max_questions+mysql+ipowerweb&btnG=Search&lr=lang_en
http://www.google.com/search?num=100&hl=en&lr=lang_en&newwindow=1&safe=off&as_qdr=all&q=max_questions+gallery+ipowerweb&btnG=Search&lr=lang_en

Does anyone think this is on the right track?


Gallery version = 2.0.2 core 1.0.0.2
PHP version = 4.3.11 apache
Webserver = Apache/1.3.33 (Unix) mod_log_bytes/0.3 FrontPage/5.0.2.2635 PHP/4.3.11 mod_ssl/2.8.22 OpenSSL/0.9.7g
Database = mysqlt 4.0.16
Toolkits = ImageMagick, NetPBM, Gd
Operating system = FreeBSD host265.ipowerweb.com 4.11-STABLE FreeBSD 4.11-STABLE #0: Wed Apr i386
Browser = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5

 
shakeb

Joined: 2005-01-04
Posts: 25
Posted: Wed, 2006-01-04 13:35

Your upload directory is not writable could that be the possible problem?
http://shyelf.com/debug/ghcc.php
Fatal Warning -- upload_tmp_dir must be set to a valid directory and be writable by the web server user

Check out my Gallery - http://www.mshakeb.com

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2006-01-04 15:30

1226: User 'shyelfco_g2ur' has exceeded the 'max_questions' resource (current value: 50000)

this means that there were a lot of database queries in a period of time and powweb thinks that's too much.
that's a limit by powweb.
do you have a high traffic site maybe? you should discuss this with powweb, we can't help you there.

 
JonathanPitt
JonathanPitt's picture

Joined: 2005-06-14
Posts: 4
Posted: Thu, 2006-01-05 06:50

I contacted powweb and the response was:

Quote:
The reason you are receiving that error is due to the 'max_questions'
setting which is set to 50,000 per user per hour.
This setting is there to ensure that the MySQL database cannot be accessed
too much by one user and overload the system.
The connections will reset every hour and is kept by user.

My suggestion to alleviate this issue is to break up your queries between
multiple users which would distribute the 50,000 connection
queries to multiple users.

Work Around: You can create a new user for the db and make the changes in
the connection string of your script.
This should work as 50,000 limit is per user.

No you cannot increase the limit more than 50000.

My question to the helpful people of Gallery is: will this "Work Around" suggested by powweb be possible?

Is there a way to modify the config.php file to have Gallery use multiple database users?

Is the multi-site install option a possibility? Or, perhaps multiple single site installs?

If it is not possible, then does anyone have a suggestion as to what would be a better alternative hosting service. The best feature that powweb has is the 10GB capacity.

I'm not sure where to begin to attempt this work around.

Any help is greatly appreciated!

Jonathan

 
mikelamb

Joined: 2005-10-10
Posts: 15
Posted: Thu, 2006-01-05 11:20

Couldnt you setup 5 users who can connect to the same database & have the config file randomly pick a user to connect with?

 
mikelamb

Joined: 2005-10-10
Posts: 15
Posted: Thu, 2006-01-05 11:34

$mysql_user[0] = "user1";
$mysql_user[1] = "user2";
$mysql_user[2] = "user3";
$mysql_user[3] = "user4";
$mysql_user[4] = "user5";

$mysql_pass[0] = "pass1";
$mysql_pass[1] = "pass2";
$mysql_pass[2] = "pass3";
$mysql_pass[3] = "pass4";
$mysql_pass[4] = "pass5";

srand((double)microtime()*1000000);
$u = rand(0,4);

$storeConfig['type'] = 'mysql';
$storeConfig['hostname'] = 'localhost';
$storeConfig['database'] = 'database';
$storeConfig['username'] = $mysql_user[$u];
$storeConfig['password'] = $mysql_pass[$u];
$storeConfig['tablePrefix'] = 'g2_';
$storeConfig['columnPrefix'] = 'g_';
$storeConfig['usePersistentConnections'] = false;
$gallery->setConfig('storage.config', $storeConfig);

Try that :) It's not perfect but should spread the queries fairly evenly over the 5 users!

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2006-01-05 12:26
Quote:
Work Around: You can create a new user for the db and make the changes in
the connection string of your script.
This should work as 50,000 limit is per user.

that's a joke, restricting limits that way and suggesting a workaround like this. ...

but the above rand() workaround could indeed work.

 
mikelamb

Joined: 2005-10-10
Posts: 15
Posted: Thu, 2006-01-05 13:05

I used to be with them, the whole company is a joke.

 
JonathanPitt
JonathanPitt's picture

Joined: 2005-06-14
Posts: 4
Posted: Fri, 2006-01-06 07:36

I've added the work around code to the config.php file. I seem to be able to do alot more, but I still get a browser timeout error:

Quote:
The requested URL could not be retrieved

While trying to retrieve the URL: http://gallery.shyelf.com/main.php

The following error was encountered:

* Zero Sized Reply

Not sure what that means, but the action completes correctly... hmmm

I'm super happy that this work around is greatly improving my experience!

Anyone have any thoughts on what the "Zero Sized Reply" error is?

For those who are curious:

I put in this code into the config.php

Quote:
$mysql_user[0] = "user0";
$mysql_user[1] = "user1";
$mysql_user[2] = "user2";
$mysql_user[3] = "user3";
$mysql_user[4] = "user4";

srand((double)microtime()*1000000);
$u = rand(0,4);

$storeConfig['type'] = 'mysqlt';
$storeConfig['hostname'] = 'localhost';
$storeConfig['database'] = 'db';
$storeConfig['username'] = $mysql_user[$u];
$storeConfig['password'] = 'same-password-for-all-db-users';
$storeConfig['tablePrefix'] = 'g2_';
$storeConfig['columnPrefix'] = 'g_';
$storeConfig['usePersistentConnections'] = false;
$gallery->setConfig('storage.config', $storeConfig);

In place of this code:

Quote:
$storeConfig['type'] = 'mysql';
$storeConfig['hostname'] = 'localhost';
$storeConfig['database'] = 'db';
$storeConfig['username'] = 'user';
$storeConfig['password'] = 'password';
$storeConfig['tablePrefix'] = 'g2_';
$storeConfig['columnPrefix'] = 'g_';
$storeConfig['usePersistentConnections'] = false;
$gallery->setConfig('storage.config', $storeConfig);

I suppose the company "IpowerWeb" doesn't want
to make it too easy to use a lot of their mysql server resources...
just the most persistant people get to ; )