[unixODBC-support] pthread and unixODBC problem

Nick Gorham nick.gorham at easysoft.com
Thu Oct 13 17:01:32 BST 2005

José M. Puyal wrote:

>Hi Nick,
>We have found the problem,
>In our pthreads we have defined 
>pthread_attr_setstacksize( &tAttr, 16384 ); 
>With this attribute for the stack size the aplication fails when the
>thread creates a new connection or database handle, maybe because the
>memory space needed to allocate the handle (we are not sure). If we
>comment that line all works fine, but we can only create about 300
>threads, after that no new threads can be created.
>¿Do you know anything about this?
Well I would guess something (I suspect the driver) is requireing more 
than 16K on the stack. I expect the limit of threads is your available 
memory. Maybe there is a figure >16k that will work and allow you to 
create more threads.

Do you mean you want 300 concurrent threads, or are you creating and 
ending threads?


More information about the unixODBC-support mailing list