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 22:45:40 GMT
    [ http://issues.apache.org/jira/browse/DERBY-443?page=comments#action_12368812 ] 

Daniel John Debrunner commented on DERBY-443:
---------------------------------------------

As the above paper notes OutOfMemoryErrors do not have any stack traces, thus it's harder
to see where the exception was being thrown so as to investigate or to code recovery code.
I did find out that in running under the debugger in Eclipse one can set a break point on
creation of exceptions, including OutOfMemoryErrors. This does allow to see the stack trace
for an OutOfMemoryError.

> 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
items.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message