I'm getting the following error for a DB I have.
“1226 (42000): User ‘?????????’ has exceeded the ‘max_connections_per_hour’ resource (current value: 85)”
I did create a simple script that opens and closes the database connection to try and troubleshoot, which I was able to replicate.
What can I do to increase max connections per hour?
The DB is managed through AWS RDS. Most of the solutions that I read about include upgrading the instance.
85 connections in an hour doesn't seem like much so there has to be another solution.
Related
When creating an Amazon AWS RDS MySQL 5.7 db instance using Terraform "terraform-aws-modules/rds/aws" module, I started getting a strange error after > 1 hour. In other contexts in the past the same script worked (even more involved versions creating cross-region read replica in 2 other regions (3 in total).
When I tried to deploy to a different VPC recently I started getting an error after spending ~1 hour on the db options group resource (so not even reaching db deploy).
The error message is:
aws_db_option_group.this: Error creating DB Option Group: InternalFailure: An internal error has occurred. Please try your query again at a later time.
status code: 500 root.rds-virginia.db.db_option_group: eval: *terraform.EvalSequence
How to resolve or work around this?
Creating a dummy db option group (even though we don't need it for this use case) seems to work around this issue:
resource "aws_db_option_group" "some-option-group" {
name = "dummy-mysql-option-group"
option_group_description = "Dummy Mysql option group"
engine_name = "mysql"
major_engine_version = "5.7"
}
Terraform db option group docs: https://www.terraform.io/docs/providers/aws/r/db_option_group.html
I have followed the procedure on this tutorial:
https://www.youtube.com/watch?v=Bz-4wTGD2_Q
but for some reason I get an error when I reach minute 5:03. See attached error. Could it be due to security groups? In the video it only says 'wide open'
I know this question has been asked on here before, but it seems like I've tried everything suggested in this answer and this answer, and still no luck. I'm trying to use MySQL Workbench 6.3 on a Windows 10 client, connecting to a Linux MySQL server hosted by GoDaddy/cPanel.
I can connect to the MySQL server with no problems, and usually I have time to run a query or two. Then, within a minute of inactivity between Workbench and the server, I'll run into Error 2013: Lost connection to MySQL server during query. This even happens when running the exact same query, back to back about a minute apart, as shown here (even when the original query is quick; only 0.03 seconds to run):
The same problem persists when I run select sleep(60) immediately upon connecting to the MySQL Server; the connection is usually lost between 30-40 seconds into the execution of the query:
I've checked the MySQL docs, but with no luck. I don't think the problem can be related to packet size, as others have suggested (since the same query will work and then fail later), and my Workbench timeout settings look okay:
Anyone have any idea? The only other thing I can think of is maybe the wait_timeout variable listed in the MySQL docs needs to be increased too, but I guess that would be somewhere on the server side (some have mention my.ini) and I can't find where any MySQL Server files live in the cPanel hosting admin interface. There's a MySQL online client provided through cPanel (phpMyAdmin I think), but it's not nearly as robust and is becoming cumbersome to use. Any help would be appreciated!
I was having the same problem, using MySQL Workbench 6.3.6 on Win10 to connect to a MySQL server on a shared hosting system (Arvixe).
In addition to to the problem described by the OP (lost connection to server), I was also getting an error when attempting to import data from a prior export (similar to what is described here):
Unhandled exception: Error querying security information: Error executing 'SELECT * FROM mysql.user WHERE user = '[username]' and Host = '[host]' ORDER BY User, Host' SELECT command denied to user '[username]'#'[host]' for table 'user' SQL Error: 1142
Apparently, a bug was introduced in MySQL Workbench 6.3.5 (bug report). From the bug report:
It appears the problem arise if connecting with an user with no privileges on the mysql schema.
In other words: users connecting to a shared hosting system.
The proposed solution is to uninstall MySQL Workbench 6.3.6, and install 6.3.4 instead. (6.3.4 can be found in the archives). This solution worked for me.
I have a D8 google mysql instance. I'm running an etl process trying to push about 100GB of data in but the script keep stopping because of the error.
In order to get it working I have to restart the mysql instance and then re run the process from where it failed. Any help is greatly appreciated. I haven't found anything on google.
This error tends to mean the connection to the MySQL server was lost at some point. As mentioned in this 'Lost connection to MySQL server' article, this error may be encountered when writing a significant number or rows.
The article suggests setting the net_read_timeout to something greater than the default value of 30 seconds. You may also want to consider breaking up your write tasks as well.
I'm facing a really weird problem to me.
I'm trying to connect with an user to my mysql 5.5 instance but it keep saying to me that user already exceeded the max_user_connections
ERROR 1226 (42000): User 'xpto' has exceeded the 'max_user_connections' resource (current value: 100)
But,
show processlist
doesn't shows any connection used by that user. I'm pretty sure that user is not using any connection at all.
If i increase the current value to 110 for example i can connect. Then if i lower i can't connect.
EDIT: the global connections usage is 500 and only a few (10/20) are being used.
Any clue?
The server has too many open connections already. A MySQL server can only handle a specific number of open connections before refusing to allow any more, and this limit is shared amongst all users of the server. It's usually set quite high, although it's easily possible for someone to effectively DoS a MySQL server by making lots of connections.
If you got the error message (code 1226) indicates that the entire MySQL server has run out of connection slots - this is the DoS scenario.
Your database must have a user ‘A’ using which you have configured your wordpress blog.
Now the problem is that user ‘A’ has exceeded maximum_questions resource (current value: 40)
Create a new user ‘B’ in your database through your domain control panel and update the same user name you wp-config.php file in
wordpress installation directory.
Now you got the problem fixed in few minutes. It will not disturb the database or the posts you have in your wordpress or phpbb.
Copied from neuronring blog
Are you on MySQL 5, and you've set the user's MAX_USER_CONNECTIONS, and the user recently disconnected?
From MySQL docs:
For the MAX_USER_CONNECTIONS limit, an edge case can occur if the
account currently has open the maximum number of connections permitted
to it: A disconnect followed quickly by a connect can result in an
error (ER_TOO_MANY_USER_CONNECTIONS or ER_USER_LIMIT_REACHED) if the
server has not fully processed the disconnect by the time the connect
occurs. When the server finishes disconnect processing, another
connection will once more be permitted.