View Full Version : 1226 error 'max_questions' resource exceeded
Over the last couple months we have been repeatedly running into a problem. A couple times a week (or more), we get a 1226 error message. "User 'xxx' has exceeded the 'max_questions' resource"
We use osCommerce and I'd say we're pretty vanilla. A few mods but nothing major. Anyway, when we get this error, we are normally in the process of doing normal database activities in the Admin tool. We are simply adding customers and orders and printing invoices. Pretty darn basic stuff.
We have not increased our business significantly over the last couple months. If anything, it's decreased a bit (due to the current economy.) So why are we having these problems all of a sudden? I tried searching on '1226' and 'max_questions' with very little success. What I was able to find seemed to indicate Powweb has possibly implemented some SQL limits that are negatively affecting us...?
We are not abusers and I can't imagine our queries being terribly server-intensive, seeing as most of them are standard osCommerce stuff. If there is a new limit being enforced, I'd say it's not realistic. We aren't even close to our resource limits on all measureable indicators which are available for easy viewing in OPS. So what's going on here?
Any ideas? Any suggestions??
To add insult to injury, we can't even view our own website when this happens. So, we can't process orders OR even answer simple customer inquiries using information from the site!! If this is a MySQL problem, why does the error affect our ability to access our website through IE? IE doesn't know I'm user XXX, does it??
There has to be a way around this. We're not talking Best Buy type traffic here. We're pretty small, in the grand scheme of things. Especially, again, when you look at our other key usage statistics...
Dbrazzell
12-12-08, 03:10 PM
yes. There is a 50,000 queries per hour limit on powwebs mysql servers.
This limit is pretty recent. For most customers it has only been active for 2 months or so. Before it was unlimited but we were still monitoring usage.
entrecon
12-12-08, 03:22 PM
To add insult to injury, we can't even view our own website when this happens.
Your site is probably driven through MySQL querries, most dynamic sites are. The error is caused by too many calls to the database. Once the limit is reached, it will not allow any more calls regardless of which user you are.If your traffic isn't that great, you may want to look at your site to see if there is anything you can do to limit the number of querries it generates. You may also want to look at items that may artificially increase traffic such as Google crawls.
Dbrazzell
12-12-08, 03:24 PM
Im going to correct myself. The limit is 75,000 queries per hour.
yes. There is a 50,000 queries per hour limit on powwebs mysql servers.
This limit is pretty recent. For most customers it has only been active for 2 months or so. Before it was unlimited but we were still monitoring usage.
I would argue that the limits are set too low then. As I said, we are not abusers and I can't imagine our queries being terribly server-intensive. We are not that large that we should be having these problems. In reading a little on this subject, it appears there are some disagreements as to whether this particular enforcement is truly accomplishing what is intended...
When we signed up (5+ years ago), we didn't sign up with this restriction. Indeed, we have operated just fine all these years. Now, all of a sudden, a new limit is imposed and we're subject to it when, again, we can't possibly be abusers? Shouldn't we be grandfathered in?
We are a relatively small (in the big picture) eCommerce site doing perfectly benign and normal order-processing activities. We can't possibly have been the true target of these restrictions. Again, we're using osCommerce, which is an incredibly popular eCommmerce package. I refuse to believe it is written that poorly so-as to be a major resource hog and a burden on all the others residing on the same server...
...you may want to look at your site to see if there is anything you can do to limit the number of querries it generates. You may also want to look at items that may artificially increase traffic such as Google crawls.
Any direction on what to do or where to go to research this...?
YvetteKuhns
12-12-08, 04:06 PM
You can create a Google account and go to Webmaster Tools to add your website, verify your account and manage your website "relationship" with Google.
Look at your web stats through PowWeb OPS to see what search engines and other bots are doing to your stats. You can use robots.txt to disallow some files or pages from being indexed on search engines. You can log into Google to remove your images from the images directory.
CrawlTrack (http://www.crawltrack.net/) is a free application (license GNU GPL), which allow to track search-engines crawlers and spiders visits on your website and to follow day after day your position in the main search engines and social bookmarks index.
You can use .htaccess to block bad bots. You may (allegedly) use Google to control the Googlebot crawl rate.
Thanks YvetteKuhns. I see you helping people on these forums all the time. Keep up the good work. It doesn't go unnoticed...
Any opinions on these new restrictions??
YvetteKuhns
12-12-08, 04:56 PM
Thanks YvetteKuhns. I see you helping people on these forums all the time. Keep up the good work. It doesn't go unnoticed...
Thanks!
Any opinions on these new restrictions??
I didn't see any "new" restrictions. They were there for a while, but most people don't know it until they reach the limits. This is normal for shared servers. I think it was 50,000 queries/hour since 2006.
Sometimes the host may not worry about a rare, short spike in visits. They worry about continuous problems like those seen with abused form processing scripts. One of my clients had a form that was abused. We removed the quick form on the home page and everything was fine.
HalfaBee
12-12-08, 05:50 PM
This issue wascommon a few years ago and the answer was to create a few new users for the DB and randomly swap between them.
You could also try using a different DB user when doing admin stuff.
YvetteKuhns
12-12-08, 07:03 PM
You could also try using a different DB user when doing admin stuff.
That is the method I prefer. It is easier. ;)
yes. There is a 50,000 queries per hour limit on powwebs mysql servers.
This limit is pretty recent. For most customers it has only been active for 2 months or so. Before it was unlimited but we were still monitoring usage.
Im going to correct myself. The limit is 75,000 queries per hour.
According to a member of Powweb's staff, it is pretty recent...
This issue wascommon a few years ago and the answer was to create a few new users for the DB and randomly swap between them.
You could also try using a different DB user when doing admin stuff.
I have another user set up in OPS and we have used it when I needed to do a quick look-up or a minor change recently but I have no idea how to switch to it when using the Admin tool in osCommerce. Or would it only be applicable if I was going through OPS? In which case, it would be useless for us. We HAVE to use the Admin tools in osCommerce. It would be a real mess to try to replicate the order entry process through direct manipulation of the database through OPS but, even if we could, we still need to print invoices, etc...
YvetteKuhns
12-15-08, 03:02 PM
Did you use the osCommerce addon to allow multiple admins? I personally prefer Zen Cart over osCommerce, so I haven't worked with osCommerce in a while. You should be able to create new admin logins or edit existing ones through the website admin instead of OPS. Or you can go to phpmyadmin to check the admin table in the database.
HalfaBee
12-15-08, 05:36 PM
I haven't looked at osCommerce, but it should just be a matter of changing part of the config file.
You can just randomly change DB users by using this code for the user name.
... = "myDBusername".rand( 1,3 );
and make the 3 users user1 user2 user3 with the same passwords.
We're also getting maximum number of connection errors too. For what it's worth, <<alternative host>> allows 50 concurrent mySQL connections. (We have an account with some different domains over there.) I have read that many other large hosting providers have a more realistic limit too. It makes Powweb's limit of 10 look ridiculously low. If this continues to happen, we'll have no choice but to look for another hosting provider. We can't have potential customer's getting turned away through no fault of our own. (Other than our choice in hosting providers, I guess.)
To any Powweb staff member who happens to be reading this, I respectfully request you consider raising your concurrent mySQL connection limits...
YvetteKuhns
12-24-08, 05:42 PM
I have dealt with many web hosts. One is cheaper and allows 70 max connections, but I have already had to move Zen Cart to another server 4 times in one year.
PowWeb made CGI faster and increasing connections may make a bottleneck. It is like all those crazy holiday shoppers rushing to the door to buy the gifts at the store. Only one person can enter at a time regardless of how many people are standing side by side like a marathon race.
PowWeb needs to do to reduce errors somehow. But increasing max connections may not be the answer. It would be interesting to try and I think they did try it.
vBulletin v3.6.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.