Wouter de Jong wrote:
> Hello,
>
> For a few servers with > 1000 concurrent connections,
> I've compiled glibc 2.3.3 with a patched STACK_SIZE in
> linuxthreads/descr.h :
>
> #ifndef STACK_SIZE
> #define STACK_SIZE (128 * 1024)
> #endif
>
> instead of #define STACK_SIZE (2 * 1024 * 1024)
>
> This by the hints on the Documentation @ mysql.com
>
> But, now I notice:
>
> 041125 15:15:34 mysqld started
> 041125 15:15:34 Warning: Asked for 196608 thread stack, but got 126976
> 041125 15:15:35 InnoDB: Started
> /usr/local/mysql/libexec/mysqld: ready for connections.
>
>
> Is the 128K STACK_SIZE I've built glibc with too little, and should I
> update it to 256K ?
Originally, MySQL team believed 128K was sufficient. Then some time later it was
discovered that some DNS resolving routines required a 192K stack in some cases.
So for safety reasons, mysqld was modified to request at least 192K stack. In
your case, your modification to glibc makes it impossible for it to have a 192K
stack, which is why you are getting the message. However, if you run mysqld with
--skip-name-resolve (you will need to update your priv tables to use numeric
addresses), glibc DNS routines are never called, so 128K should be sufficient.
Also, with the disclaimer that I have not investigated this issue deeply, from a
quick research + some memory about the incident, I believe the 192K stack
requirement comes from a RedHat patch to libc, and if your version of libc does
have this problem, mysqld will crash right way the moment you try to connect to it.
--
Sasha Pachev
Create online surveys at http://www.surveyz.com/