Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#1818 closed Bug (answered)

Host is blocked because of many connection errors

Reported by: charlesso Owned by:
Priority: normal Milestone: Piwik 1.1
Component: Core Keywords:
Cc: Sensitive: no


Hi Piwik experts,

I'm getting

SQLSTATE[HY000] Host '' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'

after leaving the admin user logged in for a few hours. Only the admin is in the database, and Piwik is monitoring 1 site.

I'm testing the 1.0 install, enabled GeoIP, and enabled most of the plugins.

How can I check what is wrong with the application?

Change History (7)

comment:1 Changed 3 years ago by vipsoft (robocoder)

  • Milestone set to 1.1 - Piwik 1.1
  • Resolution set to answered
  • Status changed from new to closed

comment:2 Changed 3 years ago by charlesso

Hi vipsoft

I agree one solution is to increase the value in MySQL. However, it seems that if there are connection errors (not running out of connections), then we should fix the problem, instead of increasing the value.

FYI, I tried to simulate it again, it occurred again even though NO ONE is logged in.

Should I reopen this issue?

comment:3 Changed 3 years ago by vipsoft (robocoder)

You probably don't have privileges to re-open this ticket. I understand these are connection errors, but I don't currently believe this is within our scope of support, but I'll help you diagnose this as best I can.

Execute "show global status like '%abort%';".

comment:4 Changed 3 years ago by charlesso

The return result is :

mysql> show global status like '%abort%';
| Variable_name | Value |
| Aborted_clients | 2 |
| Aborted_connects | 581 |
2 rows in set (0.00 sec)

comment:5 Changed 3 years ago by vipsoft (robocoder)

I think the MySQL page is incomplete.

The MySQL server increments Aborted_clients when:

  • The client program did not call mysql_close() before exiting.
  • The client had been sleeping more than wait_timeout or interactive_timeout second without issuing any requests to the server.
  • The client program ended abruptly in the middle of a data transfer.

The MySQL server increments Aborted_connects when:

  • A client doesn't have privileges to connect to a database.
  • A client uses an incorrect password.
  • A connection packet doesn't contain the right information.
  • It takes more than connect_timeout seconds to get a connect packet.

comment:6 Changed 3 years ago by charlesso

Sorry. I don't understand what you mean by 'I think the MySQL page is incomplete.'

Do you mean the info I provide is incomplete, or the documentation is incomplete?

Either way, I believe somethin on the Piwik side is triggering this problem. All my other web apps currently using MySQL does not trigger this issue.

How should I go about debugging Piwik?

comment:7 Changed 3 years ago by charlesso

I take my statement back.

I found something fishy in the server hosting Piwik, and am looking into it now. Thanks alot!

Note: See TracTickets for help on using tickets.