Skip Menu |

This queue is for tickets about the DBIx-Class CPAN distribution.

Report information
The Basics
Id: 32654
Status: resolved
Priority: 0/
Queue: DBIx-Class

Owner: Nobody in particular
Requestors: astra_here [...]

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)

Subject: DB handles don't get disconnected even when they go out of scope
Date: Fri, 25 Jan 2008 11:44:37 -0800 (PST)
To: bug-DBIx-Class [...]
From: sowmya swaminathan <astra_here [...]>
Download (untitled) / with headers
text/plain 1.8k
Hi, I have a function which makes a DBIx connect, does some search and returns the results. I have a daemon which repeatedly calls this function once in few seconds. What I observed is that even after function call is done, the DB connections don't close. The connections stays alive and keep increasing and as the max connections limit is reached, the daemon dies because new connection fails. Once the process exits, all the connections get closed and new connections can be made after that. Earlier, I was using DBIx Class 0.07002 and I didn't have this problem. DBIx Class version: 0.08008 Perl version: 5.8.7 Operating system vendor and version: Linux (Red Hat Enterprise Linux AS release 3), 2.4.21- Error message: ========== DBI connect('testcs','test',...) failed: [unixODBC][TimesTen][TimesTen ODBC Driver][TimesTen]TT0702: Connect failed because max number of connections exceeded (max 2048) -- file "db.c", lineno 9050, procedure "sbDbConnect" (SQL-HY000)(DBD: db_login/SQLConnect err=-1) at /usr/local/perl/5.8.7/lib/DBIx/Class/Storage/ line 839 Can't call method "resolve" on an undefined value at /usr/local/perl/5.8.7/lib/DBIx/Class/ line 707. I tried the same with oracle database and found the same issue. Sample code which can reproduce the issue: ============================== sub connect_to_db { my $schema = SchemaClass->connect(); } for (my $i = 0; $i < 10; $i++) { connect_to_db(); } print "Press enter to quit\n"; my $key = <STDIN>; You can check the number of active connections and before providing input to quit. In my case there 6 active connections before running the script and 16 when the script prompted for input. Could someone provide a solution to this issue? Thanks Show quoted text
____________________________________________________________________________________ Never miss a thing. Make Yahoo your home page.
Download (untitled) / with headers
text/plain 335b
Closing tickets as they all seem to be resolved by Please test against latest dev release to confirm the problem is take care of.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to