无法在 mysql 中设置线程堆栈大小 [英] Could not set thread-stack size in mysql
问题描述
我正在尝试增加 线程堆栈 变量.我可以使用命令行选项成功地做到这一点:
I'm trying to increase thread-stack variable. I can do it successfully using command-line option as such:
/usr/sbin/mysqld --thread-stack=256k
我也可以使用配置文件 /etc/init/mysql.conf
或 /etc/init.d/mysql
:
I can also do it using configuration files /etc/init/mysql.conf
or /etc/init.d/mysql
:
thread_stack=262144
thread_stack=256k
thread-stack=256k
thread-stack=262144
但是,通过/etc/mysql/my.cnf
设置不起作用.show variables like '%thread_stack%';
仍然显示默认的 196608
.
However, setting through /etc/mysql/my.cnf
doesn't work. show variables like'%thread_stack%';
still shows the default 196608
.
为什么通过/etc/mysql/my.cnf
设置不起作用?
我该如何解决这个问题?
How do I fix this?
(MySQL 5.5,5.5.38-0ubuntu0.14.04.1-log.)
(MySQL 5.5, 5.5.38-0ubuntu0.14.04.1-log.)
推荐答案
问题是为 mysql 运行的多个进程(线程).问题中 pgrep
的输出使我使用 kill -15 -1
.
The issue was multiple processes(threads) running for mysql. The output of pgrep
in the question led me to use kill -15 -1
.
这会杀死应用程序的所有活动进程.然后我不得不重新启动 mysql 和 apache 并且我更新了值.
This kills all the active processes for applications. Then I had to restart mysql and apache and I had the value updated.
这篇关于无法在 mysql 中设置线程堆栈大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!