Jira and PostgreSQL server consuming high CPU after users login

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

The Jira server is consuming high CPU upwards of 100% and the application is unusable once users login and start interacting with issues. Enabling the firewall to prevent user access returns the CPU usage to normal.

Environment

Jira 8.x

PostgreSQL

Diagnosis

The steps in the KB Slow-loading Kanban boards in Jira Software have already been addressed.

  • The behavior is improved when entering Safe Mode manually by removing the contents from the <jira-home>/plugins/installed-pluginsto a staging location and restarting Jira.

  • The degradation returns after enabling a specific app (such as com.pyxis.greenhopper.jira which provides Jira Agile functionality). 

  • The Postgres database server remains at 90+% CPU usage and there are many idle queries on the database server, including the Lexorank balancer tables (AO_60DB71_LEXORANKBALANCER):

1 SELECT * FROM pg_stat_activity where state = 'idle';

Cause

There are too many idle transactions on the Postgres database server (specific tables or the whole database) or queries taking much more time than they should which need to be manually cleaned up.

Solution

Optimize and Improve PostgreSQL Performance with VACUUM, ANALYZE, and REINDEX

To avoid conflicting database updates or corrupted data, it is preferable to run these commands during a maintenance window when the application is stopped.

VACUUM FULL requires exclusive lock on the table it is working on, and therefore cannot be done in parallel with other use of the table.

Updated on February 28, 2025

Still need help?

The Atlassian Community is here for you.