I don't use DBD::Oracle with threads myself so I can't help much.
Gerald Richter [CC'd] contributed the ora_dbh_share code so he may
be able to help.

Does anyone else use DBD::Oracle with threads?

Tim.

On Fri, Jan 02, 2004 at 03:29:09PM +0000, Sean Kelly wrote:
> Hi,
> 
>   I am having major problems getting DBD::Oracle to work in a threaded
> environment on Perl 5.8.2 (compiled using GCC 2.95.3 on Solaris 8 for sparc
> - modules are DBI 1.39 and DBD::Oracle 1.14, database is Oracle 9i).
> 
>   I see from the DBD::Oracle documentation that I should be able to use
> threads.  I also see from a previous post by Tim Bunce (26/Mar/03, archived
> at
> http://groups.google.com/groups?q=dbd::oracle+thread+group:perl.dbi.users&hl=en&lr=&ie=UTF-8&oe=UTF-8&group=perl.dbi.users&selm=20030326165715.GC76589%40dansat.data-plan.com&rnum=10)
> that things should work.
> 
>   I conducted two tests to see how things would work.  The first test was to
> create 50 threads, each making its own connection to the database (code at
> http://shortestpath.org/threads1.html) and the second test was for each of
> the 50 threads to make a database connection using ora_dbh_share (code at
> http://shortestpath.org/threads2.html).
> 
>   Both pieces of code failed to work as expected.
> 
>   The first piece of code started all 50 threads but then dumped core when
> calling the first "join".  I checked the process list and 50 separate
> database connections were opened.
> 
>   The second piece of code would start 2, 3 or 4 threads and then dump core.
>  I checked the process list and only 1 database connection was ever opened.
> 
>   Removing the database calls the program makes the code work fine so I
> assume that I haven't made some silly mistake with the threading calls.
> 
>   Could someone please offer some advice?
> 
> -- 
> Sean Kelly <[EMAIL PROTECTED]>
> 

Reply via email to