OpenRefine / OpenRefine/OpenRefine
Handle OOM errors better
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 12k
- Forks
- 2.2k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 27
Description
Handling this is tricky, but when we're doing memory intensive operations, we may want to try to try to deallocate big structures, warn user, and given them a chance to save their work.
java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:2219)
at java.util.ArrayList.grow(ArrayList.java:213)
at java.util.ArrayList.ensureCapacityInternal(ArrayList.java:187)
at java.util.ArrayList.add(ArrayList.java:411)
at com.google.refine.browsing.util.NumericBinIndex.processValue(NumericBinIndex.java:265)
at com.google.refine.browsing.util.NumericBinIndex.processRow(NumericBinIndex.java:225)
at com.google.refine.browsing.util.NumericBinRecordIndex.iterate(NumericBinRecordIndex.java:64)
at com.google.refine.browsing.util.NumericBinIndex.(NumericBinIndex.java:83)
at com.google.refine.browsing.util.NumericBinRecordIndex.(NumericBinRecordIndex.java:46)
at com.google.refine.browsing.facets.RangeFacet.computeChoices(RangeFacet.java:254)
at com.google.refine.browsing.Engine.computeFacets(Engine.java:229)
at com.google.refine.commands.browsing.ComputeFacetsCommand.doPost(ComputeFacetsCommand.java:55)
at com.google.refine.RefineServlet.service(RefineServlet.java:179)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
at org.mortbay.servlet.UserAgentFilter.doFilter(UserAgentFilter.java:81)
at org.mortbay.servlet.GzipFilter.doFilter(GzipFilter.java:132)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:938)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:755)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with NumericBinIndex.processValue and NumericBinRecordIndex.iterate in the stack trace, then trace how RangeFacet.computeChoices reaches Engine.computeFacets and ComputeFacetsCommand.doPost. The issue is done when memory-intensive operations handle the reported Java heap-space failure by attempting cleanup, warning the user, and providing a way to save work, but the exact behavior still needs definition.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100