The MySQL + PHP mode often causes a large number of zombie processes in MySQL under high concurrency pressure, resulting in service downtime. In order to automatically kill these processes, a script is created and automatically executed on the
Pt-kill is a very simple tool to kill MySQL threads and queries. The main purpose is to prevent some long queries from consuming system resources for long periods of time, while affecting the online business.
Main function:
Get the connection that
How do I check every 10 seconds to kill a query that exceeds 100 seconds for a specified user?Pt-kill--no-version-check--host 127.0.0.1--port 3306--user ' xxxxxx '--password ' xxxxxx '--charset UTF8--match-command Query--match-user The specified
1 seconds to kill business analysis
Normal e-business process
(1) Inquiry goods, (2) Create Order, (3) deduct inventory, (4) Update order, (5) payment, (6) Seller issue
The characteristics of the second kill business
(1) Low price, (2) Large
in a production environment, DB servers are often hung by concurrent slow queries, so it is important to do SQL audits beforehand to avoid bad SQL. Wan accidentally slow SQL or run to the line, and concurrency is not small, this is the DBA will
Batch kill SQL statements that run for a long time in mysql, killmysql
KILL syntax
KILL [CONNECTION | QUERY] thread_idEach connection to mysqld runs in an independent thread. You can use the show processlist statement to check which threads are
This article mainly introduces the parameters of common pt-kill processes. if you need it, refer to pt-kill, which is an excellent tool for kill MySQL connection and part of percona toolkit, when the maximum number of connections is exceeded due to
A good tool for connecting to killMySQL is part of perconatoolkit. when there are many idle connections, the maximum number of connections is exceeded, and a problematic SQL statement causes high mysql load, you need to kill some connections. This
Percona utility-Introduction to pt-kill, perconapt-kill
Pt-kill is an excellent tool for kill MySQL connection and is part of percona toolkit, when the maximum number of connections is exceeded due to a large number of idle connections and a
Pt-kill is an excellent tool for connecting to killMySQL. it is part of perconatoolkit. when many idle connections cause the maximum number of connections to be exceeded and a problematic SQL statement causes high mysql load, all of them need to
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.