Unable to limit data for the plugin

Issue #811 resolved
Nikolay Vinogradov created an issue

We have 300k+ issue JIRA instance with several dozen of projects and ~500 users.

At some point someone created a timesheet gadget that accessed following URL: <JIRA_BASE_URL>/rest/timesheet-gadget/1.0/timesheet.json?baseUrl=<JIRA_BASE_URL>&gadgetTitle=My+time+track&startDate=&targetUser=&targetGroup=&collapseFieldGroups=false&excludeTargetGroup=&numOfWeeks=1&reportingDay=2&projectOrFilter=&projectid=11180|10781|10170|10080|11982|10340|10070|13682|13681|10051|13580|13181|10580|13680|10780|10360|12281|10191|10184|10041|10300|10120|11281|10290|10180|11583|10031|10240|10020|11282|12480|10192|10188|10185|10189|10187|10181|10190|10182|12984|13280|11082|13284|10000|13380|11880&filterid=&projectRoleId=&weekends=true&showDetails=true&sumSubTasks=true&showEmptyRows=true&groupByField=&moreFields=&offset=0&monthView=false&sum=

After several retries from Dashboard's AJAX, JIRA stopped responding completely. Worklog limit in the plugin settings was set to 5000. CPU usage at that time was 700+% (it ate 7 cores out of 8 in the system).

In sandbox we have 16 cores and 6G RAM. Running this query ended up with:

Our question(s) are: - how to scale this plugin to our JIRA size correctly? - if it is not possible, then how to prevent users from building such queries? (We're not going to split them into classes: ones who able to see timetracking and ones who don't, because even ones who able could break JIRA in the same way)

Comments (12)

  1. Andriy Zhdanov

    Hi,

    Well, such case does not look heavy, it's rather basic and should work normally, I'm surprised it takes 700% CPU. I can only suggest to try if unselecting projects will have any difference, but it should not. There must be something else that causing OOM.

    Is it working better if accessing Time Sheet Report?

    Thank you.

  2. Nikolay Vinogradov reporter

    Hi,

    No, same thing. Sandbox crashes with out of space, high CPU usage before that.

  3. Nikolay Vinogradov reporter

    And i still think that the load is pretty heavy, because it selects many big projects and showEmptyRows=true.

  4. Andriy Zhdanov

    Ah, sorry, I did not notice showEmptyRows. Yes, with many selected projects it may cause the problem, I will add preventive check for this. But with no projects selected it should not cause a problem. Is it?

  5. Nikolay Vinogradov reporter

    I think everything is fine without it. But we liked this option for small queries and it should be ok to use it so.

    Please help :)

  6. Log in to comment