link tracking and max_questions? database error 1226?

Solutions for other advanced phplisters

link tracking and max_questions? database error 1226?

Postby amoswright » 4:30pm, Tue 25 Mar, 2008

Hi, I am having a problem that started after enabling link tracking. I have one list that is around 1,000 emails. I searched the forum for answers, and found this post:

http://forums.phplist.com/viewtopic.php ... xquestions

but all of the listed links to topics were not working.

When clicking on a link in the sent email the resultant page displays the following:
Database error 1226 while doing query User 'xxxxx' has exceeded the 'max_questions' resource (current value: 50000)
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /xxxxx/lists/admin/mysql.inc on line 165
Not Found
The requested document was not found on this server
Please contact the Administrator
phplist version 2.10.5


The only other suggestion I found was in another post about upgrading to the CVS version of phplist, would this likely fix the problem? if so, are there instructions on how to upgrade from CVS?

Thank you much for an excellent program!
Best,
Amos
amoswright
phpLister
 
Posts: 8
Joined: 4:22pm, Tue 25 Mar, 2008

Re: link tracking and max_questions? database error 1226?

Postby H2B2 » 5:16pm, Tue 25 Mar, 2008

amoswright wrote:Database error 1226 while doing query User 'xxxxx' has exceeded the 'max_questions' resource (current value: 50000)
You host has limited the number of database queries to 50000 per database user. You can either ask your host to increase that limit, or try and see if the workaround of increasing the max_questions limit by adding database users works for you.

In latter case, you could use this code as a starting point. Never needed to do this, so can't say what exactly you'd need to change to make it work with phplist.

One option (if your host won't increase the limit) is to set up multiple database users to spread the load on the database, and allocate thus:

In includes/configure.php and admin/includes/configure.php

Change:

define('DB_SERVER_USERNAME', 'Database User Name');

To:

//Add as many users as you like
$database_user_array[] = "Database User Name 1";
$database_user_array[] = "Database User Name 2";
$database_user_array[] = "Database User Name 3";
$database_user_array[] = "Database User Name 4";

$database_user = $database_user_array[ rand( 0, ( sizeof($database_user_array) -1 ) ) ];

define('DB_SERVER_USERNAME', $database_user);
Source: http://www.vn2designs.com/modules.php?o ... .php&p=490

See also: http://www.karakas-online.de/forum/viewtopic.php?t=4987

With regard to using release 2.11.x, you could give it a try IF you keep in mind that this is currently a development release (NOT a stable release). You will need some coding skills to troubleshoot issues that might arise. If you will be taking this path, I suggest you first install it as a separate sandbox installation with its own separate database and run some tests. If that turns out OK, you can commit to it, after having made a full backup of your current database and 2.10.5 files.
H2B2
Moderator
 
Posts: 7188
Joined: 1:51am, Wed 15 Mar, 2006

Thanks, and follow up question...

Postby amoswright » 6:06pm, Tue 25 Mar, 2008

H2B2, thank you for your clear answer, that is very helpful. I should be able to solve the problem one way or another using those suggestions.

I suspect that my host (startlogic), who is lame, will be unreceptive to modifying server config. If i implement the multiple-users solution, is there any way to estimate how many users I will need? We have about 1000 emails on our list, and I think a pretty good click-through (we encourage green commuters to log their transport, and they thusly register for monthly prizes, so plenty of click-throughs). So, for example, should I be thinking 5 users, or 50?

Thanks again for your quick and expert advise! Hope someday to have enough expertise to help out myself...

Amos Wright
amoswright
phpLister
 
Posts: 8
Joined: 4:22pm, Tue 25 Mar, 2008

Re: Thanks, and follow up question...

Postby H2B2 » 10:00pm, Tue 25 Mar, 2008

amoswright wrote:should I be thinking 5 users, or 50?
Not sure, you might start with 3 or 4 and see if you need to have more.
H2B2
Moderator
 
Posts: 7188
Joined: 1:51am, Wed 15 Mar, 2006


Return to Advanced Answers, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 1 guest