db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel John Debrunner (JIRA)" <derby-...@db.apache.org>
Subject [jira] Created: (DERBY-443) Make Derby engine robust in case of OutOfMemoryError exceptions
Date Wed, 06 Jul 2005 20:06:10 GMT
Make Derby engine robust in case of OutOfMemoryError exceptions

         Key: DERBY-443
         URL: http://issues.apache.org/jira/browse/DERBY-443
     Project: Derby
        Type: Task
    Reporter: Daniel John Debrunner
    Priority: Minor

Derby currently treats an OutOfMemoryError as a virtual machine exception, terminal failure
and shuts down.
However in many cases Derby could (possibly) recover gracefully by just disallowing the requested
Examples are
   - reject  a connection request
   - throw an exception on a new compilation (e.g. prepareStatement or executeQuery)
   - not increase the size of  a cache
    - don't boot the database

I think the only case where recovery is not possible is an exception during a rollback, in
this case the database needs to be shutdown and recovery will correctly handle the situation.

In addition a system wide facility could be added that  is called upon low memory and tries
to reduce memory usage by Derby, e.g. reduce the size of various caches. An initial version
of this could be very simple, just calling System.gc().

I was thinking this could be the high level task, and sub tasks could be added for individual
pieces of work, e.g. connection handling, statement handling etc. as people wanted to address

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message