MySQLのエラー – ‘max__questions’リソースを超えました(現在の値:1000)
MySQLデータベースの何百万ものデータをシミュレーションしてほんのわずかなテストをしている間、私のプログラムは数秒後に次のようなエラーに遭遇しました。
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: User 'mkyong' has exceeded the 'max__questions' resource (current value: 1000) at com.mysql.jdbc.Util.handleNewInstance(Util.java:406) at com.mysql.jdbc.Util.getInstance(Util.java:381) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1030) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3536) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3468) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1957) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2107) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2648) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2086) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2371) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2289) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2274) ... 49 more
これは、データベースのリソースを監視するMySQLの機能です。 「max__questions」は「ユーザーが1時間以内に実行できるクエリの数」を意味します。明らかに、ユーザーアカウントは1時間以内に1000件のクエリしか実行できません。私はこれが、生産中のMySQLがリソースのスパムを止めるのに非常に優れた機能だと信じていますが、ボリュームテストのための良い機能ではありません:p