Couple days ago I got following error from MySQL database:
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.
All documentation that I found says, that:
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.
I set the variable thread_stack to 256K, but it was just a random value. For now it solved the problem, but i'd really like to know how big should it be, get some example values, or usages. E.g.:
MySQL uses a formula, with a maximum of 100: 8+ (max_connections / 100). MariaDB 10.2 uses the smaller value out of 256 or the max_connections size. The thread_stack is the stack size for each thread.
The default is the semicolon character ( ; ). The delimiter string can be specified as an unquoted or quoted argument on the delimiter command line.
System variables can be set at server startup using options on the command line or in an option file. Most of them can be changed dynamically while the server is running by means of the SET statement, which enables you to modify operation of the server without having to stop and restart it.
On MySQL website net_read_timeout is describe as "The number of seconds to wait for more data from a connection before aborting the read" .
Just ran into a similar error today. The MySQL documentation about the variable provides a hint for default values which should be enough (192K for 32 bit systems and 256K for 64 bit systems), as well as to look at the MySQL Benchmark suite.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With