Giter Site home page Giter Site logo

close-slow-query's Introduction

定时检测是否存在超时 SQL 查询,将其记录到日志文件,并关闭(KILL)查询进程

快速开始

git clone [email protected]:helingfeng/close-slow-query.git

cp config.ini.example config.ini

python run.py

定时执行

crontab -e

# 添加每分钟执行
*/1 * * * * python run.py

配置文件

配置 MYSQL DB 账号密码,任务终止最大时间,结束任务记录

host=localhost
port=3306
user=root
password=123456
execute_time=60
kill_log=./log/slow.log

close-slow-query's People

Contributors

helingfeng avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.