Subject | Fwd: [Bpi_bugdiscussion] Re: HUGE MEMORY LEAK in Interbase makes product completely unusable |
---|---|
Author | Ann W. Harrison |
Post date | 2001-06-26T15:43:29Z |
I'm sure you've been following this mess, but on the off chance
you haven't... The situation is quite simple:
try
{
Connection con = /* Create JDBC connection here using
"interbase.interclient.Driver" */
for( int i = 0; i < 1000; i++ )
{
int newVal = (int)(Math.random() * 100000);
Statement st = con.createStatement();
st.executeUpdate( "update foo set foocol = " + newVal + " where
foocol > 0" );
st.close();
con.commit();
}
con.close();
}
catch( Exception e )
{
e.printStackTrace();
}
Both InterServer and IBServer consume major quantities of memory.
Reply-To: "Chris Smith" <chrissmi@...>
Ann
www.ibphoenix.com
We have answers.
you haven't... The situation is quite simple:
try
{
Connection con = /* Create JDBC connection here using
"interbase.interclient.Driver" */
for( int i = 0; i < 1000; i++ )
{
int newVal = (int)(Math.random() * 100000);
Statement st = con.createStatement();
st.executeUpdate( "update foo set foocol = " + newVal + " where
foocol > 0" );
st.close();
con.commit();
}
con.close();
}
catch( Exception e )
{
e.printStackTrace();
}
Both InterServer and IBServer consume major quantities of memory.
Reply-To: "Chris Smith" <chrissmi@...>
>From: "Chris Smith" <chrissmi@...>Regards,
>To: bpi_bugdiscussion@...
>Subject: [Bpi_bugdiscussion] Re: HUGE MEMORY LEAK in Interbase makes
>product completely unusable
>Date: Mon, 25 Jun 2001 19:40:56 -0700
>
>After reading replies to this bug all day long, I decided that I might take
>a look at the source for interclient/interserver myself. As some of you
>remarked it is probably a defect in the interclient/interserver portion of
>the database (my thoughts as well).
>
>I think the defect lies at line Line 264 of Statement.java (2.0 version of
>interclient.jar). The line states the following:
>
>openOnServer_ = false;
>
>However, if you look at all the other portions of the code that make calls
>to the server, this variable is always set to true. Only when the statement
>is closed is "openOnServer_" set to false. For fun, I went ahead and changed
>this line to "openOnServer_ = true". Guess what? No more memory leaks.
>
>If you look in the close() method of the same file, you will see that if
>"openOnServer_" is true, the server resources are released, otherwise they
>are not.
>
>I am not sure that this is the proper fix, but it seems to stop memory from
>leaking on my machine. I am also not sure what the process is to get this
>included in the next build of Interclient. So, please let me know (if this
>is indeed a bug and the appropriate fix).
>
>Thanks.
>
>--Chris.
>
>
>_______________________________________________
>Bpi_bugdiscussion mailing list
>Bpi_bugdiscussion@...
>http://mers.com/mailman/listinfo/bpi_bugdiscussion
Ann
www.ibphoenix.com
We have answers.