Regarding this question... In one day our wiki has crashed again due to hitting the 80K connections/hour limit. If anyone has any suggestions on how to debug this I would really appreciate it.
Michelle
Our ISP-served wiki (running MediaWiki 1.3.11) went down due to this error:
SQL error: User 'our_wiki' has exceeded the 'max_questions' resource (current value: 50000)
The ISP support assured me we did indeed exceed 50K questions/connections in one hour, and that this went on for over 12 hours until they increased our limit to 80K questions/hour.
Is this an expected level of database connections for a wiki with 1500 articles and about 400 visitors/day?
Would the number of connection requests be any lower using release 1.4.x?
The ISP suggested we create a second db user and change the code to switch between them for accesses so that we avoid hitting the limit. I guess this would mean changing Database.php but it seems very kludgy. Any thoughts on that would be appreciated.
Michelle
Michelle wrote:
Regarding this question... In one day our wiki has crashed again due to hitting the 80K connections/hour limit. If anyone has any suggestions on how to debug this I would really appreciate it.
I get the same error periodically, most recently this morning --
_________________________________________ A database error has occurred Query: BEGIN Function: Database::begin Error: 1226 User 'wolfandt_wiki' has exceeded the 'max_questions' resource (current value: 50000) (localhost)
Backtrace:
* GlobalFunctions.php line 513 calls wfbacktrace() * Database.php line 383 calls wfdebugdiebacktrace() * Database.php line 333 calls databasemysql::reportqueryerror() * Database.php line 1377 calls databasemysql::query() * Database.php line 1347 calls databasemysql::immediatebegin() * Database.php line 307 calls databasemysql::begin() * Database.php line 1445 calls databasemysql::query() * LoadBalancer.php line 582 calls databasemysql::getlag() * LoadBalancer.php line 117 calls loadbalancer::getlagtimes() * LoadBalancer.php line 172 calls loadbalancer::getrandomnonlagged() * LoadBalancer.php line 329 calls loadbalancer::getreaderindex() * DatabaseFunctions.php line 52 calls loadbalancer::getconnection() * User.php line 519 calls wfgetdb() * User.php line 472 calls user::loadfromdatabase() * Setup.php line 246 calls user::loadfromsession() * index.php line 26 calls require_once() ________________________________________________
Previous enquiries both to my host company and this list yielded nothing particularly useful. When this happens I've found that if I go into my host's control panel (vDeck) and edit the database user's permissions (don't need to change anything, just hit edit and then okay) all is suddenly well with the world and my Wiki.
FWIW...
Myria
Gee, I wonder if you're using iPower as your ISP too? :-)
Your fix worked for me right away, at least until the next time. Thanks very much.
Michelle
On Jun 29, 2005, at 10:00 AM, Myria wrote:
Previous enquiries both to my host company and this list yielded nothing particularly useful. When this happens I've found that if I go into my host's control panel (vDeck) and edit the database user's permissions (don't need to change anything, just hit edit and then okay) all is suddenly well with the world and my Wiki.
FWIW...
By the way, if anyone else gets the "max_questions exceeded" error persistently from their ISP, the way I got around it was this:
1) set a Crawl-delay parameter in my robots.txt file (I used 30 secs), and
2) create a second mysql user with complete access to the same wiki database, then make this inelegant hack (php newbie here) to LocalSettings.php to switch randomly between users:
Replace: $wgDBuser = "wiki_user";
with:
$rand = mt_rand( 1, 2 ); if ( $rand == 1 ) { $wgDBuser = "wiki_user"; } else { $wgDBuser = "wiki_user2"; }
This spreads the 'questions' across 2 users to give you twice the capacity.
Both changes were necessary to avoid crashes; the wiki has stayed up for 3 days now.
Michelle
mediawiki-l@lists.wikimedia.org