Sort aborted Error in MySQL Error Log

来源:互联网 发布:firemonkey 动画源码 编辑:程序博客网 时间:2024/05/12 16:49

mysql> show VARIABLES like'log_err%';
+---------------+-----------------------------------------------+
| Variable_name | Value                                         |
+---------------+-----------------------------------------------+
| log_error     | /home/dbmysql/mysql/data/CNMYSQLDB.err |
+---------------+-----------------------------------------------+
1 row in set (0.19 sec)

 

检查mysql的日志时发现日志中有下述错误:

120115 10:46:09 [ERROR] /home/dbmysql/mysql/bin/mysqld: Sort aborted

 

比较常见的有tmpdir空间不足,sort_buffer_size ,read_rnd_buffer_size、read_buffer_size 设置不合理,
含有order by,groupy by 等需要排序sql性能比较低下需要优化,等其它原因。

以下是官方文档中对Sort aborted的解释:
Cause
There are many possible causes of Sort aborted errors, see details below.

Solution
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] bin-dbg/sql/mysqld: Out of sort memory; consider increasing server sort buffer size

Somebody ran KILL in the middle of a filesortNormal, no action required.

5.5.11 error, verbose version: [ERROR] Sort aborted. By KILL command: YES SQL: update t1 set j = 6 order by i desc, j asc


The server was shut down while some queries were sorting
Normal, no action required.

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

 

原创粉丝点击
热门问题 老师的惩罚 人脸识别 我在镇武司摸鱼那些年 重生之率土为王 我在大康的咸鱼生活 盘龙之生命进化 天生仙种 凡人之先天五行 春回大明朝 姑娘不必设防,我是瞎子 一脚刹车踩到底怎么办 p53基因型cc型该怎么办 人不小心掉进火山怎么办 奥林巴斯相机相片被锁了怎么办 文明53格外的奢侈品怎么办 答应了要请客钱不够怎么办 在家里面着急没办法干活怎么办 1岁宝宝脾气暴躁怎么办 档案不在中国海峡人才市场怎么办 海丰西中街吃鸡钱包给拿了怎么办? 朝鲜成为经济强国中国怎么办 窗户上有哈气水怎么办 阳台下水管声音好大怎么办 一开水龙头会响怎么办 海里遇到暗流怎么办贴吧 东海通忘记客户号怎么办 证券客户号忘了怎么办 热收缩机有空气怎么办 韩国国籍签证到期想回国怎么办 休闲裤裤脚长了怎么办 电大本科统考考不过怎么办 一案涉及两个法律关系怎么办 法院调解书被告不执行怎么办 电视cas授权已过期怎么办 网贷逾期被仲裁怎么办 word所选内容无效怎么办 wps批注不显示了怎么办 船舶挂靠船务公司去要怎么办 被螃蟹扎了肿了怎么办 手指被海鲜刺了怎么办 被海鲜刺进去了怎么办 手被海鲜扎了怎么办 环评设备写错了怎么办 物业对高空抛物怎么办 如果法官不公平判案我该怎么办? 民事案夸省审理案件不公平怎么办 积目头像未通过审核怎么办 电压不稳空调带不动怎么办 孩子吃了塑料珠怎么办 美的电压力锅打不开盖子怎么办 瓶盖打不开怎么办 瓶子是玻璃的