Error Medic

Jira Configuration Guide: Troubleshooting Connection Refused, Timeouts, and Slow Performance

Comprehensive troubleshooting guide for Jira configuration issues, including 'Connection Refused', performance degradation, and timeouts. Fix your Jira setup to

Last updated:
Last verified:
968 words
Key Takeaways
  • Database connection exhaustion or misconfigured max pool size often causes Jira timeouts and 'Connection Refused' errors.
  • Insufficient JVM memory allocation (Heap space) leads to frequent garbage collection, resulting in slow performance or crashes (OutOfMemoryError).
  • Reverse proxy (Nginx/Apache) misconfigurations can block API requests or cause websocket failures, disrupting real-time updates.
  • Corrupted indexes or outdated plugins are common culprits for UI sluggishness and search failures.
Fix Approaches Compared
MethodWhen to UseTimeRisk
Increase JVM Heap SizeFrequent OutOfMemory errors, constant high CPU from GC5 minsLow (Requires restart)
Tune DB Connection PoolLog shows 'Timeout waiting for idle object', DB bottleneck10 minsMedium (DB config change)
Rebuild Jira IndexesSearch is broken, issues missing from boards, general slowness1-4 hoursHigh (Impacts performance during build)
Verify Proxy SettingsWebsocket errors, 'Base URL mismatch' warnings in UI15 minsLow

Understanding Jira Configuration Errors

Jira is a complex Java application relying heavily on a relational database and often sits behind a reverse proxy. When users report that "Jira is not working" or "Jira is slow," the root cause usually lies within the interaction of these three components.

Common Symptoms and Error Messages

  1. The 'Connection Refused' Error:

    • Symptom: Users cannot access the UI, or API calls fail instantly.
    • Log Snippet: java.net.ConnectException: Connection refused or org.apache.catalina.connector.ClientAbortException: java.io.IOException: Broken pipe
    • Cause: The Jira Tomcat server is down, the port is blocked by a firewall, or the reverse proxy is misconfigured and cannot reach the upstream Jira server.
  2. Jira Slow Performance and Timeouts:

    • Symptom: Page loads take 10+ seconds, bulk operations fail, or dashboards timeout.
    • Log Snippet: WARNING: Query took longer than expected or java.util.concurrent.TimeoutException or The Tomcat connector configured to listen on port 8080 failed to start.
    • Cause: Database connection pool exhaustion, insufficient JVM heap memory causing 'Stop-the-World' garbage collection pauses, or un-optimized third-party plugins.
  3. Jira Crash (OutOfMemoryError):

    • Symptom: Jira becomes completely unresponsive and the Java process terminates or hangs indefinitely.
    • Log Snippet: java.lang.OutOfMemoryError: Java heap space or java.lang.OutOfMemoryError: GC overhead limit exceeded
    • Cause: Jira has exhausted its allocated memory. This often happens during massive exports, complex JQL queries, or due to memory leaks in poorly written apps.

Step 1: Diagnose the Bottleneck

Before changing configurations, you must identify the bottleneck.

  1. Check the Logs: The atlassian-jira.log and catalina.out are your best friends. Look for ERROR and FATAL entries.
  2. Monitor JVM Resources: Use tools like jstat, jcmd, or APM tools (AppDynamics, New Relic) to monitor garbage collection activity. If the JVM is spending >10% of its time in GC, you have a memory issue.
  3. Database Metrics: Check your database server's CPU, IOPS, and active connection count. A slow database will make Jira appear slow.

Step 2: Implement Configuration Fixes

Fix A: Tuning the JVM Memory

If you see OutOfMemoryError, you need to adjust the setenv.sh (Linux) or setenv.bat (Windows) file.

Locate JVM_MINIMUM_MEMORY and JVM_MAXIMUM_MEMORY.

  • Rule of thumb: Don't allocate more than 50% of the system RAM to Jira to leave room for the OS and filesystem cache.
  • Set Xms (minimum) and Xmx (maximum) to the same value to prevent heap resizing overhead.
Fix B: Database Connection Pool Adjustment

If you see Timeout waiting for idle object in atlassian-jira.log, your Tomcat connection pool is exhausted. Edit dbconfig.xml in the Jira Home directory.

Increase <pool-max-size>. The default is usually 20, which is too low for enterprise environments. Try 50 or 100, but ensure your database backend can handle the increased maximum connections from all Jira nodes.

Fix C: Rebuilding Indexes

If performance is slow but CPU/Memory look fine, corrupted Lucene indexes are likely the culprit. Navigate to Administration > System > Indexing and perform a Full Re-Index. Warning: Background indexing is safer but slower. A foreground re-index locks Jira but finishes faster.

Frequently Asked Questions

bash
# 1. Check if Jira port (default 8080) is listening
netstat -tulpn | grep 8080

# 2. Search logs for OutOfMemory errors
grep -i "OutOfMemoryError" /var/atlassian/application-data/jira/log/atlassian-jira.log

# 3. Check Tomcat Access Logs for slow requests (requests taking > 5 seconds)
awk '$NF > 5000' /opt/atlassian/jira/logs/localhost_access_log.*.txt

# 4. Example setenv.sh JVM memory tuning snippet
# Edit: /opt/atlassian/jira/bin/setenv.sh
JVM_MINIMUM_MEMORY="8192m"
JVM_MAXIMUM_MEMORY="8192m"

# 5. Example dbconfig.xml pool adjustment
# Edit: /var/atlassian/application-data/jira/dbconfig.xml
# <pool-max-size>100</pool-max-size>
# <pool-min-size>20</pool-min-size>

# 6. Restart Jira service to apply changes
sudo systemctl restart jira
E

Error Medic Editorial

The Error Medic Editorial team consists of senior Site Reliability Engineers and DevOps practitioners dedicated to solving enterprise infrastructure challenges.

Sources

Related Articles in Jira

Explore More Enterprise Software Guides