New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add queue system for the API and security logs #39

merged 8 commits into from Jun 29, 2017


None yet
2 participants

cixtor commented Jun 28, 2017

This pull-request implements a primitive queue system that allows the plugin to store the security logs in the local server and send them to the API with a scheduled task which will run every 24 hours. Due to limitations of some web servers, the plugin will only send a handful of logs per batch, the number is determined by the max_execution_time setting in the PHP installation times 500, for example, in a regular installation with a maximum execution time of 30 seconds the plugin will send a maximum of 15,000 logs every time the scheduled task runs. Users can send the logs in the queue manually by clicking a link at the bottom of the "Audit Logs" panel, each time the link is clicked the plugin will send a new batch of logs and delete them from the queue.

This is one of many improvements applied to the code to free some resources in the API server and to reduce the slowness of the websites during a brute force attack. Recently, during an update this proved to be a requirement and finally we have a working implementation to be released to the public.

@cixtor cixtor changed the title from Add queue system for the security logs and cache improvement to Add queue system for the API and security logs Jun 29, 2017

@dcid dcid merged commit b1e8647 into Sucuri:master Jun 29, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment