Details
-
Suggestion
-
Resolution: Unresolved
-
None
-
None
-
0
-
Description
Currently, there's no easy way to check if a node is running a task, such as bulk edit.
It would be useful to have such a screen, including the elapsed time and an option to cancel the task if possible.
A REST API endpoint could also be helpful to show this data.
If we start a full re-index while a bulk edit is running, for example, the bulk edit is severely slowed down and we see errors in the logs such as:
2023-01-30 21:47:47,325-0500 JiraTaskExecutionThread-51 ERROR user1 1234x65432x1 4aadqy 192.168.1.1 /secure/views/bulkedit/BulkEditPerform.jspa [c.a.j.issue.index.DefaultIndexManager] Wait attempt timed out - waited 30000 milliseconds com.atlassian.jira.issue.index.IndexException: Wait attempt timed out - waited 30000 milliseconds at com.atlassian.jira.issue.index.DefaultIndexManager.obtain(DefaultIndexManager.java:905) at com.atlassian.jira.issue.index.DefaultIndexManager.access$600(DefaultIndexManager.java:101) at com.atlassian.jira.issue.index.DefaultIndexManager$IndexLock.tryLock(DefaultIndexManager.java:1247) at com.atlassian.jira.issue.index.DefaultIndexManager.getIndexLock(DefaultIndexManager.java:891)
Workaround
To check if a task is being executed, run the command below, replacing <jira_pid> by the process PID:
sudo jstack <jira_pid> | grep JiraTaskExecutionThread
If the result is empty, there are no tasks in execution.
Otherwise, check the full results of the jstack command and check the stack for the "JiraTaskExecutionThread-#" threads to understand what it is doing.
For example, a bulk edit task stack should have a base that looks like this:
at com.atlassian.jira.bulkedit.operation.BulkEditOperation.perform(BulkEditOperation.java:216) at com.atlassian.jira.web.action.issue.bulkedit.BulkOperationProgress$BulkEditCallable.call(BulkOperationProgress.java:170) at com.atlassian.jira.web.action.issue.bulkedit.BulkOperationProgress$BulkEditCallable.call(BulkOperationProgress.java:140) at com.atlassian.jira.task.TaskManagerImpl$TaskCallableDecorator.call(TaskManagerImpl.java:533) at com.atlassian.jira.task.TaskManagerImpl$TaskCallableDecorator.call(TaskManagerImpl.java:491) at java.util.concurrent.FutureTask.run(java.base@11.0.2/FutureTask.java:264)
If the jstack command is not available, we need to run the kill command as below and check the catalina.out log for the thread dump.
kill -3 <jira_pid>
Attachments
Issue Links
- is related to
-
JRASERVER-74798 Starting a full reindex while a bulk edit is running slows it down severely
- Gathering Impact