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

MySQL error mysqldump Error 3024: how to solve the problem with Query execution was interrupted

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces "MySQL error mysqldump Error 3024: Query execution was interrupted how to solve". In daily operation, I believe many people have doubts about MySQL error mysqldump Error 3024: Query execution was interrupted how to solve the problem. Xiaobian consulted all kinds of information and sorted out simple and easy operation methods. I hope to answer "MySQL error mysqldump Error 3024: Query execution was interrupted How to solve the "query is helpful! Next, please follow the small series to learn together!

Database version: MySQL 5.7.16

mysqldump complete error:

mysqldump: Error: Query execution was interrupted, maximum statement execution time exceeded when trying to dump tablespaces

mysqldump: Error 3024: Query execution was interrupted, maximum statement execution time exceeded when dumping table `$tb_name` at row: 25002

It is also possible to report this error during SELECT:

ERROR 3024 (HY000): Query execution was interrupted, maximum statement execution time exceeded

Check the bug library and find the same problem:

https://bugs.mysql.com/bug.php? id=83339

The max_execution_time setting is too small.

Recurrence:

Set max_execution_time to a small value and execute mysqldump (essentially SELECT) or SELECT:

[17:23:01] root@localhost [(none)]> SET GLOBAL max_execution_time=10;

Query OK, 0 rows affected (0.00 sec)

[17:23:11] root@localhost [(none)]> SELECT * FROM test.t1 LIMIT 100000;

ERROR 3024 (HY000): Query execution was interrupted, maximum statement execution time exceeded

mysqldump -uxxx -pxxx -S -A > /tmp/a.sql

mysqldump: Error 3024: Query execution was interrupted, maximum statement execution time exceeded when dumping table `$tb_name` at row: 0

Solution:

① Increase the value of N through hints (the document says that in the use of hints, change N to 0 for unlimited, but I measured it does not take effect, can be set to a larger value such as 99999 solution)

SELECT /*+ MAX_EXECUTION_TIME(N) */ * FROM t1 LIMIT 100000;

② Modify the max_execution_time value, set it to a higher value, or set it to 0 (unlimited)

Related parameters:

max_execution_time

This parameter 5.7.8 was added in ms, dynamic parameter, default is 0.

When set to 0, it means SELECT timeout is not set (no timeout is limited).

Does not work on SELECT statements in stored procedures, and only works on read-only SELECT, such as INSERT... SELECT ... It's not going to work.

At this point, the study of MySQL error mysqldump Error 3024: Query execution was interrupted is over, hoping to solve everyone's doubts. Theory and practice can better match to help everyone learn, go and try it! If you want to continue learning more relevant knowledge, please continue to pay attention to the website, Xiaobian will continue to strive to bring more practical articles for everyone!

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