• linkedu视频
  • 平面设计
  • 电脑入门
  • 操作系统
  • 办公应用
  • 电脑硬件
  • 动画设计
  • 3D设计
  • 网页设计
  • CAD设计
  • 影音处理
  • 数据库
  • 程序设计
  • 认证考试
  • 信息管理
  • 信息安全
菜单
linkedu.com
  • 网页制作
  • 数据库
  • 程序设计
  • 操作系统
  • CMS教程
  • 游戏攻略
  • 脚本语言
  • 平面设计
  • 软件教程
  • 网络安全
  • 电脑知识
  • 服务器
  • 视频教程
  • MsSql
  • Mysql
  • oracle
  • MariaDB
  • DB2
  • SQLite
  • PostgreSQL
  • MongoDB
  • Redis
  • Access
  • 数据库其它
  • sybase
  • HBase
您的位置:首页 > 数据库 >Mysql > Mysql Error Code : 1436 Thread stack overrun

Mysql Error Code : 1436 Thread stack overrun

作者: 字体:[增加 减小] 来源:互联网 时间:2017-05-11

通过本文主要向大家介绍了thread stack overrun,overrun error,迷途猫overrun,迷途猫overrun第二季,overrun是什么意思等相关知识,希望本文的分享对您有所帮助

ERRNO: 256 
TEXT: SQLSTATE[HY000]: General error: 1436 Thread stack overrun: 4904 bytes used of a 131072 byte stack, and 128000 bytes needed. Use 'mysqld -O thread_stack=#' to specify a bigger stack. 

According to the MySQL manual “The default (192KB) is large enough for normal operation. If the thread stack size is too small, it limits the complexity of the SQL statements that the server can handle, the recursion depth of stored procedures, and other memory-consuming actions” .

To resolve this issue you need to change the default value of parameter 'thread_stack' in /etc/my.cnf  in your MySQL configuration file. I use the XAMPP for php/mysql development. 

Once you set this value you need to restart MySQL as this value cannot be set dynamically.

you maybe also encounter with the message when you try to modify the my.cnf

"Cannot open file for writing: Permission denied"

We will try to use the 'chmod' instruction to change permission as usually. I seldom take the concrete permission into consideration, so I use always use the 'chmod 777'. but it resulted in another errors when I use the phpmyadmin, another tools included in XAMPP, after running 'chmod 777'.

After googling it, I get this file (my.cnf) permissions has to be 600. I change its permission and it works well now.

bug info

报错信息:
java.sql.SQLException: Thread stack overrun: 5456 bytes used of a 131072 byte stack, and 128000 bytes needed. Use 'mysqld --thread_stack=#' to specify a bigger stack.

官方相应信息:

The default (192KB) is large enough for normal operation. If the thread stack size is too small, it limits the complexity of the SQL statements that the server can handle, the recursion depth of stored procedures, and other memory-consuming actions

可以使用

show variables where `variable_name` = 'thread_stack';

查询当前数据库的默认线程栈的大小,一般情况下都能正常使用,但是当查询语句或者存储过程复杂时会报Thread stack overrun错误,此时只要修改默认配置就可以。

解决

windows: 修改mysql安装目录下的my-small.ini或者my.ini设置为256k,或者更大,然后重启服务

[mysqld]
thread_stack = 256k
linux: 同样要修改配置文件,但是!!!,不是安装目录下的配置文件,是/etc/my.cnf,只有这个文件才能生效,然后重启服务service mysql restart

[mysqld]
thread_stack = 256k

其实针对32位系统,32G内存,一般设置为512K即可,据国外网站看到的,如果是64位的系统可以适当增加,其实够用就好了,没必须刚开始设置的就很大。

</div>
分享到:QQ空间新浪微博腾讯微博微信百度贴吧QQ好友复制网址打印

您可能想查找下面的文章:

  • Mysql Error Code : 1436 Thread stack overrun

相关文章

  • 2017-09-02MySQL 加锁处理分析
  • 2018-12-05mysql主从同步配置的方法
  • 2018-12-05mysql 5.7更换数据库数据存储位置的实例详解
  • 2018-12-05mysql 不能插入中文问题
  • 2018-12-05用sql获取某字符串中的数字部分的语句
  • 2018-12-05Oracle数据仓库的分层管理器解决方案开发者网络Oracle
  • 2018-12-05SQL server使用自定义函数以及游标
  • 2018-12-05mysql免安装制作使用说明
  • 2018-12-05mysql 全文检索中文解决方法及实例代码分享
  • 2018-12-05 互联网创业的准备数据库:硬盘iops、mysql

文章分类

  • MsSql
  • Mysql
  • oracle
  • MariaDB
  • DB2
  • SQLite
  • PostgreSQL
  • MongoDB
  • Redis
  • Access
  • 数据库其它
  • sybase
  • HBase

最近更新的内容

    • 5个经常犯的数据库设计错误
    • SQLserver 2008将数据导出到Sql脚本文件的方法
    • 使用mysql_fetch_object()函数获取结果集中一行作为对象(PHP操作MySQL数据库的方法五)
    • Mysql 5.5多实例部署步骤_MySQL
    • 关于增删改查的10篇课程推荐
    • MySQL LVS负载均衡
    • mysql的基本命令介绍
    • MySQL架构
    • MSSQL 提取汉字实现语句
    • MySQL 优化设置步骤

关于我们 - 联系我们 - 免责声明 - 网站地图

©2020-2025 All Rights Reserved. linkedu.com 版权所有