db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jose de Castro <jose.decas...@voxeo.com>
Subject Re: strange out of memory exception
Date Fri, 05 Jan 2007 02:54:53 GMT
The best balance of performance and reliability will come from using a 
database connection pool.

Here are a couple of good ones:

DBCP - http://jakarta.apache.org/commons/dbcp/
c3p0 - http://www.mchange.com/projects/c3p0/index.html


Amir Michail wrote:
> On 1/4/07, Amir Michail <amichail@gmail.com> wrote:
>> Hi,
>>
>> I'm getting this exception:
>>
>> java.sql.SQLException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ040,
>> SQLERRMC: Failed to start database 'myDB', see the next exception for
>> details.::SQLSTATE: XJ001Java exception: 'Java heap space:
>> java.lang.OutOfMemoryError'.
>>
>
> Please ignore. I solved the problem.
>
> BTW, how long should a servlet hold on to a db connection? Should it
> open a connection for each request? Or is it sufficient to just open a
> connection once? Does it matter in terms of reliability of the db,
> resource limits, etc.?
>
> Amir
>
>> Any ideas on how to debug this and/or increase the memory available?
>>
>> There isn't much data in the db btw.
>>
>> Amir
>>

Mime
View raw message