[unixODBC-support] pthread and unixODBC problem

Jason Pump jason at healthdash.com
Fri Oct 14 19:18:49 BST 2005


If all 4000 threads are not holding results or cursors or are active at 
once, then you might be able to create a pool of odbc connections, say 
50, wrap it with an appropriate mutex, and just reserve/return the odbc 
connections from the pool.

José M. Puyal wrote:

>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.
>
>Josemari
>
>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/
>>
>>    
>>
>
>
>_______________________________________________
>unixODBC-support mailing list
>unixODBC-support at easysoft.com
>http://mail.easysoft.com/mailman/listinfo/unixodbc-support
>  
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.unixodbc.org/pipermail/unixodbc-support/attachments/20051014/e1cdecc5/attachment.html>


More information about the unixODBC-support mailing list