configuration - MySQL 服务器的 thread_stack 参数 - 它是什么?它应该有多大?

标签 configuration mysql-management mysql

几天前,我从 MySQL 数据库中收到以下错误:

Thread stack overrun: 68744 bytes used of a 196608 byte stack, and 128000 bytes needed. Use 'mysqld -O thread_stack=#' to specify a bigger stack.

我找到的所有文档都说:

The default is 64KB before MySQL 4.0.10 and 192KB thereafter. 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.

我将变量 thread_stack 设置为 256K,但它只是一个随机值。现在它解决了这个问题,但我真的很想知道它应该有多大,得到一些示例值或用法。例如:

  • 我可以用 96KB (x KB) 的线程堆栈做什么,不能做什么?
  • 如何计算我需要多大的线程堆栈?

最佳答案

今天刚遇到类似的错误。 MySQL documentation关于变量提供默认值的提示,默认值应该足够(32 位系统为 192K,64 位系统为 256K),以及查看 MySQL Benchmark suite .

关于configuration - MySQL 服务器的 thread_stack 参数 - 它是什么?它应该有多大?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2919558/

相关文章:

mysql - 如何让Mysql数据库支持阿拉伯语?

Mysql - 将所有表和列重命名为小写?

MySQL:重命名 auto_increment 列时遇到问题

MySQL round() 无法按预期使用 sum()

configuration - Hadoop/Hive 集群。只有一个节点利用率

java - 使用 Log4j 创建每日日志?

iphone - 如何使用 Ruby 加密和签署 iphone 移动配置文件

mysql - 安装 dbweb 时没有远程存储库

mysql - Nagios/check_mysql_query - 显示变量

configuration - Powershell:如何使用不同的用户名/密码映射网络驱动器