Subject | RE: [Firebird-Java] How to make the garbage collector collect |
---|---|
Author | Rick Debay |
Post date | 2005-11-28T16:27:08Z |
How do you have 300,000 XSQLVARs? Are the PreparedStatement's SQL
identical, or are each of the 3000 statements different?
-----Original Message-----
From: Firebird-Java@yahoogroups.com
[mailto:Firebird-Java@yahoogroups.com] On Behalf Of Markus Plail
Sent: Friday, November 25, 2005 3:30 AM
To: Firebird-Java@yahoogroups.com
Subject: Re: [Firebird-Java] How to make the garbage collector collect
"Roman Rokytskyy" <rrokytskyy@...> writes:
in my database, I have mor than 300000 XSQLVARs lying around and I am
getting short of heap space.
regards
Markus
------------------------ Yahoo! Groups Sponsor --------------------~-->
Get fast access to your favorite Yahoo! Groups. Make Yahoo! your home
page http://us.click.yahoo.com/dpRU5A/wUILAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
identical, or are each of the 3000 statements different?
-----Original Message-----
From: Firebird-Java@yahoogroups.com
[mailto:Firebird-Java@yahoogroups.com] On Behalf Of Markus Plail
Sent: Friday, November 25, 2005 3:30 AM
To: Firebird-Java@yahoogroups.com
Subject: Re: [Firebird-Java] How to make the garbage collector collect
"Roman Rokytskyy" <rrokytskyy@...> writes:
>> I am writing webapps, that use Firebird databases. I have on db forVery good to know, thanks :-)
>> every service and wanted to know if there is any possibility to get
>> my XSQLVARs garbage collected other than to shutdown my
>> FBWrappingDataSource und create a new instance.
>
> By default pool has also statement pooling switched on. That means
> that even after closing the pooled connection, physical connection
> will reference prepared statements and ready for use. Set the
> "maxStatements" property to 0, it will switch the statement pooling
> off. In this case closing the prepared statement will also deallocate
> all structures incl. XSQLVAR and XSQLDA.
> But my question is: do they cause any troubles in your application?When there are hundreds of thousand, yes. After inserting 3000 entries
in my database, I have mor than 300000 XSQLVARs lying around and I am
getting short of heap space.
>> Btw. it's not possible to:A simple restart didn't free the XSQLVARs. I had to shutdown().
>> FBWrappingDataSource fbWrapDs = new FBWrappingDataSource();
>> fbWrapDs.setDatabase("//" + URL + ":" + PORT + "/" + db = new
>> Firebird(fbWrapDs.getConnection());
>> ... do smth ...
>> fbWrapDs.getConnection().close();
>> fbWrapDs.shutdown();
>> fbWrapDs.restart();
>
> If I'm not mistaken, simple restart() should be enough.
> But the NullPointerException is clear bug and should not be there.Will do so.
> Please fill a bug report, I will fix this in next point release.
regards
Markus
------------------------ Yahoo! Groups Sponsor --------------------~-->
Get fast access to your favorite Yahoo! Groups. Make Yahoo! your home
page http://us.click.yahoo.com/dpRU5A/wUILAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links