Subject: | File descriptor leak with DBD-Oracle |
Date: | Mon, 14 Dec 2009 09:12:00 -0600 (CST) |
To: | bug-DBD-Oracle [...] rt.cpan.org |
From: | brookepb [...] mchsi.com |
Description:
There appears to be a file descriptor leak for every oracle connection (even when using ora_dbh_share) when using DBD-Oracle in perl scripts using threads, threads::shared.
To recreate the problem:
1) at start of a minimal perl script, using the libs noted above along with DBD::Oracle.
print STDERR "Pre oracle connection open files:" . `ls -l /proc/$$/fd/ | wc -l` . "\n";
2) open a new database connection
3) check open file descriptor count
print STDERR "open oracle connection open files:" . `ls -l /proc/$$/fd/ | wc -l` . "\n";
3) disconnect the connection
print STDERR "Post oracle connection open files:" . `ls -l /proc/$$/fd/ | wc -l` . "\n";
One file descriptor remains open, at least on my machine after every call. In a single threaded application this is not an issue but in one that spawns thousands of threads which use Oracle, the maximum number of open filehandles available to the user account running the program is quickly exceeded and it is unable to complete. I had hoped that using ora_dbh_share would solve the problem but no beans.
System:
Linux myhost 2.6.18-128.1.1.el5 #1 SMP Mon Jan 26 13:58:24 EST 2009 x86_64 x86_64 x86_64 GNU/Linux
Perl: 5.10.0
DBD-Oracle: $DBD::Oracle::VERSION = '1.23';
I apologize if I missed this bug in those listed on CPAN
Thanks,
bpb