Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

MariaDB 10.3 supports automatic KILL to drop uncommitted empty transactions

2025-03-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

The following introduces a parameter innodb_kill_idle_transaction (this is a parameter referenced by Percona XtraDB), which means that when a transaction has not been submitted for a long time, the connection cannot be closed, and the memory is not released. Concurrency is large, resulting in an increase in the number of DB connections, which will affect performance.

The default is 0 seconds, and you can set the threshold according to your situation. Beyond this threshold, the server automatically kills uncommitted idle transactions.

MariaDB removed it in version 10.2.6, as Percona XtraDB was no longer bundled, and split up.

MariaDB added three parameters in version 10.3 to benchmark Percona functionality.

1) idle_transaction_timeout (all transactions)2) idle_write_transaction_timeout (write transactions)3) idle_readonly_transaction_timeout (read-only transactions)

Here are some examples:

Note: Units are seconds. Here, we set the uncommitted time of an empty transaction to 2 seconds. When it exceeds 2 seconds, the system will automatically kill its connection.

Setting this parameter is valid only for new connections, and invalid for ongoing connections.

Reference: mariadb.com/kb/en/library/transaction-timeouts/

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report