The problem here is what I told you about the eventual consistency of the database. Since there are hundreds of requests coming in at the same time, all these requests will NOT see that other requests being processed concurrently (at the same time) have already blocked that IP address. They will also not see that other concurrently processed requests have sent emails, therefore the sending limits will not be enforced.
The best thing you can do is disable sending emails for each blocked request.
It might sound counter-intuitive but this will result in the IP of the attacker getting blocked faster in this case (after several dozen requests instead of several hundred). The reason is that sending emails takes up a lot of server resources. By sending emails you make everything slower as there's only so much a server can do in a given amount of time – the limit is hard i.e. imposed by the capabilities of the hardware and the physical network it's connected on.
Also keep in mind that sending emails for blocked requests is something we only recommend as a troubleshooting step. It is very useful when you have just set up Admin Tools to see why you keep getting blocked when you do not have the experience which tells you the exact same information is available in Admin Tools, Web Application Firewall, Blocked Requests Log. This is the reason this feature exists and why it's enabled by default. It's training wheels. Once you get the hang of it, you are meant to disable it because it has an adverse impact on the performance of your site and the effectiveness of the WAF during a real world attack.
I am going to add a permanent backend notification when this feature is enabled, letting you know it's a set of training wheels and let you disable it with a single click in the next version of Admin Tools (well, and an option to hide the message because some people want to do the wrong thing despite all warnings; as per the cardinal UNIX rule, my job is not to ask the user why they want to shoot their feet, but to provide the biggest, meanest gun which will shoot both of their feet clean off the first time).
Moreover, I am trying a workaround to this issue in another piece of software we make, Panopticon. I am using a database trick which should prevent this kind of situation by providing a more consistent view of the database. The key word here is “should”. The MySQL documentation uses rather cagey wording describing how table locking will perform under these conditions. I want to see it in action with a more technical audience before using the implicit transaction for InnoDB tables trick in a product aimed at the general market like Admin Tools. That is to say, I have not given up on this kind of issue just because database servers work in a certain way, I am doing my research and development. If I am right about what I am trying here, issues like that will no longer exist with Admin Tools by Q1 2025.
Nicholas K. Dionysopoulos
Lead Developer and Director
🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!