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] Commented: (DERBY-443) Make Derby engine robust in case of OutOfMemoryError exceptions
Date Fri, 03 Mar 2006 00:58:07 GMT
    [ http://issues.apache.org/jira/browse/DERBY-443?page=comments#action_12368627 ] 

Daniel John Debrunner commented on DERBY-443:

Interesting paper on handling out of memory situations


> 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
>   Components: Services
>     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 operation.
> 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