Sort aborted Error in MySQL Error Log

现象

[ERROR] lines containing "Sort aborted" are present in the MySQL error log file.

[Warning] Sort aborted : Out of memory (Needed 24 bytes)
[ERROR] Sort aborted 

From MySQL 5.5.11 onward:

[ERROR] mysqld: Out of sort memory; consider increasing server sort buffer size
[ERROR] mysqld: Sort aborted: Query execution was interrupted

原因

There are many possible causes of Sort aborted errors, see details below.

解决方案

From MySQL 5.5.11 the error messages have been made more specific. The 5.5.11 errors have 5.5.11 at the start of the line in this description. In addition in 5.5.11 and later if you turn on --log_warnings = 2 the error messages will give details of the host the client connection is coming from, the user account and the query to assist in diagnosing the cause.

Insufficient disk space in tmpdir prevented tmpfile from being created
Make more space available.
Insufficient memory for sort_buffer_size to be allocated
Add more memory or adjust settings to use less memory.

5.5.11 error: [ERROR] mysqld: Out of sort memory; consider increasing server sort buffer size
Somebody ran KILL in the middle of a filesort

Normal, no action required.

[ERROR] mysqld: Sort aborted: Query execution was interrupted
The server was shut down while some queries were sorting
Normal, no action required.

[ERROR] /opt/mysql/product/mysql/sbin/mysqld: Sort aborted: Server shutdown in progress
A transaction got rolled back or aborted due to lock wait timeout or deadlock
Normal, no action required. The lock wait timeout or deadlock might be something you want to investigate if that is not expected, though it is normal for these to happen sometimes in transactional databases.
Unexpected errors, such as source table or even temporary table was corrupt
Look for possible causes.
Processing of a subquery failed which was also sorting
Possibly look for a cause for the subquery to fail or consider it normal, it could be either.
Wrong number of arguments for a function
Fix the function call.

5.5.11 error: [Warning] Sort aborted : Incorrect number of arguments for FUNCTION test.f1; expected 0, got 1
posted @   Coye  阅读(1341)  评论(0编辑  收藏  举报
编辑推荐:
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
阅读排行:
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· DeepSeek在M芯片Mac上本地化部署
· 葡萄城 AI 搜索升级:DeepSeek 加持,客户体验更智能
点击右上角即可分享
微信分享提示