codeling / bfstop

Brute Force Stop Plugin (for Joomla!)
https://bfstop.bfroehler.info
GNU General Public License v3.0
36 stars 20 forks source link

Not logging to database #109

Closed AlphaCharlie-AU closed 7 years ago

AlphaCharlie-AU commented 9 years ago

Hi. I have found a number of these messages in the plg_system_bfstop.log.php file:

--- paste --- 2015-03-19T00:58:28+00:00 DEBUG Failed login attempt from IP address 146.0.78.8 2015-03-19T00:58:28+00:00 ERROR Brute Force Stop: Database error (#2006) occured: MySQL server has gone away SQL=INSERT INTO bfstop_failedlogin (ipaddress,logtime,error,username,origin) VALUES ('146.0.78.8','2015-03-18 17:58:28','Username and password do not match or you do not have an account yet.','admin','1') 2015-03-19T00:58:28+00:00 ERROR Brute Force Stop: Database error (#2006) occured: MySQL server has gone away SQL=SELECT COUNT(_) FROM failedlogin t WHERE t.logtime between DATESUB('2015-03-18 17:58:28', INTERVAL 1440 MINUTE) AND '2015-03-18 17:58:28' AND ipaddress = '146.0.78.8' AND handled = 0 2015-03-19T00:58:28+00:00 DEBUG Failed logins: 0; allowed: 5 2015-03-19T00:58:28+00:00 ERROR Brute Force Stop: Database error (#2006) occured: MySQL server has gone away SQL=SELECT COUNT() FROM bfstop_failedlogin t WHERE t.logtime between DATE_SUB('2015-03-18 17:58:28', INTERVAL 1440 MINUTE) AND '2015-03-18 17:58:28' 2015-03-19T00:58:28+00:00 INFO Sent email to , subject: Failed login attempt at http:///; successful 2015-03-19T00:58:28+00:00 ERROR Brute Force Stop: Database error (#2006) occured: MySQL server has gone away SQL=SELECT COUNT(*) FROM bfstop_failedlogin t WHERE t.logtime between DATE_SUB('2015-03-18 17:58:28', INTERVAL 1440 MINUTE) AND '2015-03-18 17:58:28' AND ipaddress = '146.0.78.8' AND handled = 0 --- snip ---

The file itself is huge, but there are zero records in the bfstop_failedlogin table.

codeling commented 9 years ago

Database error (#2006) occured: MySQL server has gone away

This suggests a problem with your database server - apparently bfstop (using joomla's database layer) can't reach it. The rest of your site is working without problems? I'm not a database expert but I think this message could mean that the database server is overloaded.

AlphaCharlie-AU commented 9 years ago

OK Thanks. Yep, everything else works just fine.

codeling commented 9 years ago

Could you check your database server log file if there's any indications in there why this happens?

Could you check the size of your bfstop_failedlogin table? Could be that you have that many failed login attempts logged that querying them overloads your mysql server. In that case it might help to enable the feature to delete old entries (via the plugin settings).

codeling commented 8 years ago

Have you checked your database server log file? Have you configured the feature to delete old entries? Without additional information I cannot help you and will have to close the issue.

codeling commented 7 years ago

@AlphaCharlie-AU since there hasn't been any response on my questions here, and since there haven't been any other reports like this, I am closing this issue. If you should still encounter it and can provide information regarding my questions above, please comment here or open a new issue.