Thread stack overrun: 8880 bytes used of a 131072 byte stack, and 128000 bytes needed……

在对mysql数据库进行操作时,报错如下

严重: Servlet.service() for servlet [springMVC] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.jdbc.UncategorizedSQLException: 
### Error updating database.  Cause: java.sql.SQLException: Thread stack overrun:  8880 bytes used of a 131072 byte stack, and 128000 bytes needed.  Use 'mysqld --thread_stack=#' to specify a bigger stack.
### The error may involve global.ams.cn.dao.UserGroupMapper.deleteByPrimaryKey-Inline
### The error occurred while setting parameters
### SQL: delete from usergroup     where id = ?
### Cause: java.sql.SQLException: Thread stack overrun:  8880 bytes used of a 131072 byte stack, and 128000 bytes needed.  Use 'mysqld --thread_stack=#' to specify a bigger stack.
; uncategorized SQLException for SQL []; SQL state [HY000]; error code [1436]; Thread stack overrun:  8880 bytes used of a 131072 byte stack, and 128000 bytes needed.  Use 'mysqld --thread_stack=#' to specify a bigger stack.; nested exception is java.sql.SQLException: Thread stack overrun:  8880 bytes used of a 131072 byte stack, and 128000 bytes needed.  Use 'mysqld --thread_stack=#' to specify a bigger stack.] with root cause
java.sql.SQLException: Thread stack overrun:  8880 bytes used of a 131072 byte stack, and 128000 bytes needed.  Use 'mysqld --thread_stack=#' to specify a bigger stack.
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:996)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3887)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3823)
	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2435)
	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2582)
	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2530)
	at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1907)
	at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1199)

错误的关键是这句:Cause: java.sql.SQLException: Thread stack overrun:  8880 bytes used of a 131072 byte stack, and 128000 bytes needed.  Use 'mysqld --thread_stack=#' to specify a bigger stack.

根据提示,把thread_stack改大一点,linux环境下:

vim /etc/my.cnf
thread_stack = 128K#改为512K

然后重启mysql服务,

1、通过rpm包安装的mysql,可以直接:service mysqld restart

2、我这边是直接通过源码包安装的mysql,重启命令如下:

    // linux关闭MySQL的命令
     $mysql_dir/bin/mysqladmin -uroot -p shutdown
    // linux启动MySQL的命令
     $mysql_dir/bin/mysqld_safe &

其中mysql_dir为MySQL的安装目录,mysqladmin和mysqld_safe位于MySQL安装目录的bin目录下

如果上面这两种方法,都不行的话,可以试试简单粗暴的方法:

3、可以通过强行命令:“killall mysql”来关闭MySQL,但是不建议用这样的方式,因为这种野蛮的方法会强行终止MySQL数据库服务,有可能导致表损坏……

 

 

 

 

 

 

 

 

 

 

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值