7

I have a stored procedure on mysql. It worked on my local MAMP environment, the procedure worked well, but when I moved it to a linode server/host it does not run. I'm getting a "Thread Stack Overrun" error. I have tried upping the thread stack up from an initial value 64K. I changed the value to 128K then to 256K. but the problem still occurs.

i am working on a lucid ubuntu 512MB linode server. I am running on linode's suggested configuration in my mysql/my.cnf file:

key_buffer = 16K
max_allowed_packet = 1M
thread_stack = 64K 
table_cache = 4
sort_buffer = 64K
net_buffer_length = 2K

Can anyone help? Can you suggest different configurations?

tjones
  • 357
  • 2
  • 6
  • 23

2 Answers2

10

I was an idiot. I reset the thread_stack to a higher number, but i didn't restart the server. restarting resolved the problem.

tjones
  • 357
  • 2
  • 6
  • 23
5

If you're using Ubuntu 14.04 you can increase your MySQL thread stack here:

/etc/mysql/my.cnf

and change this value thread_stack which might have a value like this, for example:

thread_stack = 192K

After that you need to restart MySQL like so:

sudo service mysql restart

Refer to the Ubuntu 14.04, MySQL documentation for more info.

racl101
  • 3,760
  • 4
  • 34
  • 33
  • 1
    In Ubuntu-16.04.3 the file location and name changed. I had to run `sudo gedit /etc/mysql/mysql.conf.d/mysqld.cnf` to change the value of `thread_stack`. – Joe Sep 27 '17 at 18:06
  • Also, on Ubuntu 16.04 restart MySQL with: `sudo systemctl restart mysql.service` – racl101 Mar 14 '18 at 19:48
  • I already had this in my my.cnf but the value was too low. Setting it to 192 fixed it so thanks for the direction! – Antony Feb 02 '21 at 09:06