Hi Frankie,
I am willing to help you find the cause of this issue but it is important to understand the nature of the issue you are having first. The real problem is that your site is exceeding the max_questions per hour limit for your DB User, and while my plugin is likely a contributing factor to this problem it is highly unlikely that it is even the biggest factor, so you will need to keep an open mind while troubleshooting this issue if you want to find the real cause.
First let’s clarify the meaning of the errors you are getting. The max_questions is referring to the number of queries per hour, not the number of database connections or the number of page loads. The average WordPress site usually has around 30 to 60 “Questions” (or queries) per page load but it is possible for this number to be much higher depending on what plugins you have installed. It is possible that some plugins run a lot of queries during the WordPress init action, but it is also possible that having a lot of plugins that each have a few queries for every page load can add up if you have a lot of page loads in any given hour. Plugins that perform many database actions in wp_cron tasks are the most likely to push you towards your limit.
My plugin uses Ajax calls to run the Complete Scan and typically runs about 12 queries per call for each directory it scans. However, there is also a baseline number of queries that WordPress executes for every Ajax call, and it is highly probable that there are any number of other plugins that run their own queries during each call and all these can add up very quickly if your making hundreds or even thousands of calls per hour. Plus, if any of these Ajax call triggers a wp_cron task that has been queued up to run by another plugin then you might use up a lot or your Questions on those tasks as well.
There are two main approaches to addressing this particular issue. The simplest solution would be to find out where on your server this limit of 75,000 max_questions is being set and change it to a much higher number. But if you don’t have permission to change that setting, because it is not your server and/or your hosting provider does not permit you to make such changes to the MySQL settings or user permissions, then you will have to start looking into which plugins are the major contributors to the number of queries that are executed on every load, particularly on Ajax calls if that is really the only time you are having this issue.
You can also take a closer look at your error_log files to try and isolate any more patterns that might point you in the right direction. For example, the two error messages that you posted here are not directly related to my plugin. The first was caused by the mysqli_set_charset function executed by a WordPress Core file in the wp-includes, which was triggered by a call to the admin-ajax.php file but that does not not mean that it was caused by my plugin as there are many other calls to admin-ajax.php that can come from anywhere. The second error was also triggered by a call to admin-ajax.php but this one was clearly related to the plugin_loaded Filter that initiated the Sync Action for the Jetpack plugin. Perhaps you could deactivate the Jetpack plugin and see if you get less of these errors?
Please let me know what you find and I can see what I can do to help you further.
Aloha,
Eli