Solved

max_connections_per_hour

Posted on 2008-10-21
3
1,838 Views
Last Modified: 2012-05-05
Hi,

I have a contact who is using oscommerce, and is having problems with mysql_connect - error message as follows:
Warning: mysql_connect() [function.mysql-connect]: User 'abc' has exceeded the 'max_connections_per_hour' resource (current value: 300) in /data/htdocs/iabc/shop/includes/functions/database.php on line 19
Unable to connect to database server!

From what I can see from the MySQL site, this relates to mysql server administration and specifically granting priveleges on the account. Can you tell me if this is something only the hosting company can control? If not, any help on changing these limits would be much appreciated!

Many thanks,
Daisy
0
Comment
Question by:daisydoos
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 50

Expert Comment

by:Steve Bink
ID: 22772845
See here:

http://dev.mysql.com/doc/refman/5.1/en/user-resources.html

This is something an administrator can change through GRANTs.
0
 

Author Comment

by:daisydoos
ID: 22773882
Hi there,

Many thanks for your response. I found out a bit more yesterday on this. Do you know what the "sensible" level of max conections per hour is? Can we set it at unlimited?

Many thanks,
Daisy
0
 
LVL 50

Accepted Solution

by:
Steve Bink earned 250 total points
ID: 22776379
From the same link:

 To remove an existing limit, set its value to zero. For example, to remove the limit on how many times per hour francis can connect, use this statement:

mysql> GRANT USAGE ON *.* TO 'francis'@'localhost'
    ->     WITH MAX_CONNECTIONS_PER_HOUR 0;


I've never used connection limits in my projects because they weren't necessary.  In the context of a web site hitting a database through a controlled API, a limit like this would cause all sorts of issues.  :/
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

All XML, All the Time; More Fun MySQL Tidbits – Dynamically Generate XML via Stored Procedure in MySQL Extensible Markup Language (XML) and database systems, a marriage we are seeing more and more of.  So the topics of parsing and manipulating XM…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question