Timesheet pretty duration format crashes JIRA!

Issue #484 wontfix
Torsten Weck created an issue

Timesheet 2.7.6, JIRA 6.1.4 on MySQL 5.5

with no manual changing of the timesheet configuration everything runs smoothly, but after enabling the 'pretty duration format' JIRA constantly crashes (OOM) while displaying the timesheet gadget. Increasing heap did not help!

Strangely, just disabling it again on the configuration page (after restarting JIRA) did also not solve it. After deleting the timesheet-settings from the propertyentry-table (&restarting JIRA) it seems to be back in a working state.

UPDATE: I was able to get some more details: Occurs after a user added the gadget with default settings to a dashboard. After switching from 'All Roles' to a specific User-Role the Gadget seems to work normally.

2014-02-10 18:35:21,437 http-bio-8080-exec-15 INFO clxbot 1115x734x1 qgau9n 0:0:0:0:0:0:0:1 /rest/timesheet-gadget/1.0/timesheet.json [plugin.report.timesheet.TimesheetService] Searching worklogs created since 'Mon Feb 10 00:00:00 CET 2014', till 'Mon Feb 17 00:00:00 CET 2014'
2014-02-10 18:35:22,343 http-bio-8080-exec-15 INFO clxbot 1115x734x1 qgau9n 0:0:0:0:0:0:0:1 /rest/timesheet-gadget/1.0/timesheet.json [plugin.report.timesheet.TimeBaseService] Processed 137 worklogs
2014-02-10 18:35:31,008 http-bio-8080-exec-12 ERROR clxbot 1115x733x2 qgau9n 0:0:0:0:0:0:0:1 /rest/timesheet-gadget/1.0/timesheet.json [common.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service
java.lang.OutOfMemoryError: Java heap space
    at java.util.Arrays.copyOf(Arrays.java:2367)
    at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:130)
    at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:114)
    at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:535)
    at java.lang.StringBuffer.append(StringBuffer.java:322)
    at java.io.StringWriter.write(StringWriter.java:94)
    at java.io.Writer.write(Writer.java:127)
    at org.apache.velocity.runtime.parser.node.ASTText.render(ASTText.java:85)
    at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336)
    at org.apache.velocity.runtime.directive.Parse.render(Parse.java:263)
    at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:175)
    at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
    at org.apache.velocity.runtime.parser.node.ASTElseIfStatement.render(ASTElseIfStatement.java:92)
    at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:106)
    at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
    at org.apache.velocity.runtime.directive.Foreach.performIteration(Foreach.java:393)
    at org.apache.velocity.runtime.directive.Foreach.render(Foreach.java:316)
    at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:175)
    at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336)
    at org.apache.velocity.runtime.directive.Parse.render(Parse.java:263)
    at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:175)
    at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
    at org.apache.velocity.runtime.directive.Foreach.performIteration(Foreach.java:393)
    at org.apache.velocity.runtime.directive.Foreach.render(Foreach.java:316)
    at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:175)
    at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
    at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:87)
    at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
    at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:87)
    at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336)
    at org.apache.velocity.Template.merge(Template.java:328)
    at org.apache.velocity.Template.merge(Template.java:235)

Comments (6)

  1. Andriy Zhdanov

    Hi Torsten,

    It happens because of very huge report, so it does not fit into memory. Unfortunately this is design limitation. Similar problem is described in Issue#169. Sorry.

  2. Torsten Weck reporter

    wow, okay...

    but sorry, somehow I refuse to believe that 137 worklogs for the 7 Days period is already too much for the timesheet gadget to handle :-(

    especially, when it only occurs with 'just' an setting of an output-format while otherwise it works just fine

  3. Andriy Zhdanov

    Hm, yes, I agree, 137 worklogs is not that much, but symptoms does not allow me to think of anything else. Note, I'm also working on new approach, client-side rendering this should hopefully eliminate this problem, for the cost of some new, probably.

  4. Torsten Weck reporter

    just for reference (and without any deeper investigation): this is no longer happening after upgrading to JIRA 6.2.1 & Timesheet 2.7.8.1

  5. Log in to comment