Subject: | Memory Leak with update to CLOB column |
Date: | Thu, 17 Jan 2008 16:03:04 -0500 |
To: | bug-DBD-Oracle [...] rt.cpan.org |
From: | David_Kershaw [...] vwr.com |
Hello,
Our website is experiencing a memory when running a query that updates a
CLOB oracle column. Here is an example script that reproduces the issue.
#!/usr/local/bin/perl
use strict;
use DBI;
use DBD::Oracle qw(:ora_types);
my $dbh = DBI->connect("dbi:Oracle:webdev", "web_user", "web_user",
{AutoCommit=>0, RaiseError=>1});
my $sql = q{
UPDATE sessinfo.cgi_sessions SET
timestamp = sysdate,
data = :data,
session_type_id = :type
WHERE id = :id
};
while (1) {
my $sth = $dbh->prepare($sql);
$sth->bind_param(':id', 'R455XwwUN40AAFNZhX0');
$sth->bind_param(':data','yo mama',{'ora_type'=>ORA_CLOB()});
$sth->bind_param(':type',1);
$sth->execute();
$sth->finish();
$dbh->commit;
my $cmd = "grep VmRSS /proc/$$/status";
print `$cmd`;
}
$dbh->disconnect();
Here is an example output:
-bash-2.05b$ ./test_leak.pl
VmRSS: 8516 kB
VmRSS: 8540 kB
VmRSS: 8544 kB
VmRSS: 8556 kB
VmRSS: 8564 kB
VmRSS: 8568 kB
VmRSS: 8568 kB
VmRSS: 8572 kB
VmRSS: 8576 kB
VmRSS: 8580 kB
VmRSS: 8588 kB
VmRSS: 8592 kB
VmRSS: 8596 kB
VmRSS: 8600 kB
VmRSS: 8600 kB
VmRSS: 8608 kB
VmRSS: 8612 kB
VmRSS: 8616 kB
VmRSS: 8620 kB
VmRSS: 8624 kB
... and goes on
Version Info
DBD::Oracle 1.19 & 1.15
DBI version 1.50, 1.58, & 1.601
perl v5.8.3
Redhat ES 3.0 (2.4.21-47.ELsmp)
Show quoted text
_________________________________
Dave Kershaw
Lead Application Developer, e-Business/Technology
VWR International, http://www.vwr.com
Phone: 610.429.5558
The information contained in this e-mail message may be privileged,
confidential and protected from disclosure. If you are not the intended
recipient, any dissemination, distribution or copying is strictly
prohibited. If you think that you have received this e-mail message in
error please e-mail the sender and delete the message. Thank you.