[unixODBC-support] pthread and unixODBC problem

José M. Puyal josemaria.puyal at dialcom.com
Fri Oct 14 10:25:15 BST 2005

Hi Nick

Thanks for all, the key seems to be what you say, we must increase the
thread stack size in order to get the ideal value.

Thanks again and regards.


El vie, 14-10-2005 a las 09:29 +0100, Nick Gorham escribió:
> José M. Puyal wrote:
> >Hi Nick,
> >
> >We need more than 300 concurrent threads, our tests run about 4000
> >concurrent threads (in red hat 8). Until these days we don't have any
> >problems because our database connection pool created the connections
> >out of the threads, but nowadays sometimes when all the connections of
> >the pool are in use, a thread can create a new one on demand.
> >
> >what do you mean with  " Maybe there is a figure >16k that will work and
> >allow you to create more threads" Could you explain it, please?
> >  
> >
> Well, if the driver and driver manager need more than 16k in stack size 
> you will need to increase that. I am guessing that with 16k you have 
> enough memory to run your 4000 threads.  That makes 64mb used in stack 
> to me. If you don't explicitly set the stack size, the system will set 
> some value for you (I don't know what, maybe 64k). What I am suggesting 
> is there may be a value larger than 16k which will allow the driver to 
> connect, but small enough to allow the number of processes you need.
> You could also check to see if there are any system limits to the total 
> stack size that could be increased.
> A google search found quite a few pages that discuss the limits of 
> stacks and threads, for example
> http://www.kegel.com/stackcheck/

More information about the unixODBC-support mailing list