0

My application uses Hikari DB Pool. I run the application on one of my local machines (it's home network) but application uses remote database hosted by other company.

The application inserts some records every 5 minutes to the DB so it is in constant use.

Everything works fine, but from time to time (completely undeterministic), the database blocks my IP saying:

message from server: "Host 'xxx' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'

Before that happens - I do not notice any strange behaviour.

So here is my question (I do not ask how to unblock it!! :)):

  • How can I find an error - is this a problem with my application or maybe it's caused because of remote connection?
  • In any case, how to detect and prevent such connection errors before DB will block my IP again?

I use java + spring data + hibernate + hikari db pool.

Mariusz.v7
  • 2,322
  • 2
  • 16
  • 24
  • 1
    It sounds like perhaps too many threads are taking connections from the pool without releasing them. – Tim Biegeleisen Dec 18 '16 at 08:18
  • how is this related to connection error on DB host side? Furthermore I think, spring handles connection releasing automatically. Correct me if I'm wrong. – Mariusz.v7 Dec 18 '16 at 08:34
  • @Mariusz.v7 That depends on how you are using Spring and database connections. I wouldn't just count on it: make sure it does. – Mark Rotteveel Dec 18 '16 at 12:16

0 Answers0