Page 1 of 1
Middle Tier error question
Posted: Mon Jan 27, 2020 10:45 am
by wjstarck
I am getting the following error in the Middle Tier
Code: Select all
An unhandled exception of type 'MySql.Data.MySqlClient.MySqlException' occurred in OpenDentBusiness.dll
Additional information: Host 'DESKTOP-01EAGQM' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'
On methods like this:
Code: Select all
public static DataTable RefreshCache(long anestheticRecordNum) {
//No need to check RemotingRole; Calls GetTableRemotelyIfNeeded().
string command = "SELECT * FROM anesthmedsgiven WHERE AnestheticRecordNum ='" + anestheticRecordNum + "'"+ " ORDER BY DoseTimeStamp DESC"; //most recent at top of list
DataTable table=Cache.GetTableRemotelyIfNeeded(MethodBase.GetCurrentMethod(),command);
table.TableName="AnesthMedsGiven";
FillCache(table);
return table;
}
I don't think this is related to MySQL because I still get the error even after a mysqladmin flush-hosts.
This code block was written quite a few years ago. Is it wrong now?
Re: Middle Tier error question
Posted: Mon Jan 27, 2020 11:41 am
by cmcgehee
We see this MySQL error every so often for various offices. Our solution is to add:
max_connect_errors=999999999
to your my.ini file and restart MySQL.
Re: Middle Tier error question
Posted: Mon Jan 27, 2020 12:52 pm
by wjstarck
I tried that, but still get the error.

Re: Middle Tier error question
Posted: Mon Jan 27, 2020 2:26 pm
by cmcgehee
What version of MySQL are you using? If it's >= 5.6, can you run this query and show the results?
select * from performance_schema.host_cache
Re: Middle Tier error question
Posted: Mon Jan 27, 2020 4:35 pm
by wjstarck
I was on 5.5 but just installed 5.6 and still get the error
That query returns no results
Re: Middle Tier error question
Posted: Mon Jan 27, 2020 5:52 pm
by wjstarck
I just looked in there again after a few more tries and now I have:
Code: Select all
-<RECORDS>
-<RECORD>
<IP>115.230.124.21</IP>
<HOST/>
<HOST_VALIDATED>YES</HOST_VALIDATED>
<SUM_CONNECT_ERRORS>0</SUM_CONNECT_ERRORS>
<COUNT_HOST_BLOCKED_ERRORS>0</COUNT_HOST_BLOCKED_ERRORS>
<COUNT_NAMEINFO_TRANSIENT_ERRORS>0</COUNT_NAMEINFO_TRANSIENT_ERRORS>
<COUNT_NAMEINFO_PERMANENT_ERRORS>1</COUNT_NAMEINFO_PERMANENT_ERRORS>
<COUNT_FORMAT_ERRORS>0</COUNT_FORMAT_ERRORS>
<COUNT_ADDRINFO_TRANSIENT_ERRORS>0</COUNT_ADDRINFO_TRANSIENT_ERRORS>
<COUNT_ADDRINFO_PERMANENT_ERRORS>0</COUNT_ADDRINFO_PERMANENT_ERRORS>
<COUNT_FCRDNS_ERRORS>0</COUNT_FCRDNS_ERRORS>
<COUNT_HOST_ACL_ERRORS>1</COUNT_HOST_ACL_ERRORS>
<COUNT_NO_AUTH_PLUGIN_ERRORS>0</COUNT_NO_AUTH_PLUGIN_ERRORS>
<COUNT_AUTH_PLUGIN_ERRORS>0</COUNT_AUTH_PLUGIN_ERRORS>
<COUNT_HANDSHAKE_ERRORS>0</COUNT_HANDSHAKE_ERRORS>
<COUNT_PROXY_USER_ERRORS>0</COUNT_PROXY_USER_ERRORS>
<COUNT_PROXY_USER_ACL_ERRORS>0</COUNT_PROXY_USER_ACL_ERRORS>
<COUNT_AUTHENTICATION_ERRORS>0</COUNT_AUTHENTICATION_ERRORS>
<COUNT_SSL_ERRORS>0</COUNT_SSL_ERRORS>
<COUNT_MAX_USER_CONNECTIONS_ERRORS>0</COUNT_MAX_USER_CONNECTIONS_ERRORS>
<COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS>0</COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS>
<COUNT_DEFAULT_DATABASE_ERRORS>0</COUNT_DEFAULT_DATABASE_ERRORS>
<COUNT_INIT_CONNECT_ERRORS>0</COUNT_INIT_CONNECT_ERRORS>
<COUNT_LOCAL_ERRORS>0</COUNT_LOCAL_ERRORS>
<COUNT_UNKNOWN_ERRORS>0</COUNT_UNKNOWN_ERRORS>
<FIRST_SEEN>27/1/2020 19:34:32</FIRST_SEEN>
<LAST_SEEN>27/1/2020 19:34:32</LAST_SEEN>
<FIRST_ERROR_SEEN>27/1/2020 19:34:32</FIRST_ERROR_SEEN>
<LAST_ERROR_SEEN>27/1/2020 19:34:32</LAST_ERROR_SEEN>
</RECORD>
</RECORDS>
Re: Middle Tier error question
Posted: Tue Jan 28, 2020 8:19 am
by cmcgehee
Can you post the result of this query:
SHOW VARIABLES LIKE 'max_connect_errors'
Re: Middle Tier error question
Posted: Tue Jan 28, 2020 8:49 am
by wjstarck
That shows MaxConnectErrors set to 999999999
Re: Middle Tier error question
Posted: Tue Jan 28, 2020 9:00 am
by cmcgehee
I don't have any further ideas without remote connecting to your environment. I would recommend calling support next.
Re: Middle Tier error question
Posted: Tue Jan 28, 2020 9:32 am
by wjstarck
OK
Thanks