Why jira is using multiple java processes?

Tejas Naik June 15, 2023

Hi Team,

We seem to like running out of ram (16gigs) memory for the 350K issues, 700 custom fields
, 40+ workflows, 2K users Jira server. Is this 16gigs of RAM enough or should we increase the RAM size?

And I have observed Jira user is using multiple Java processes


Server details
# free -m
           total    used    free   shared   buffers cached
Mem: 15935  15770   165      0           8          334
-/+ buffers/cache: 15427 508
Swap: 5118     2904  2214

# top | grep java
106321 jira 20 0 19.7g 9.3g 87m S 3.9 59.6 469:04.11 java
101190 jira 20 0 17.7g 5.2g 7424 S 2.0 33.7 44:33.64 java

Thanks and Regards
Tejas

2 answers

2 accepted

1 vote
Answer accepted
Mohamed Benziane
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 16, 2023
Tejas Naik June 16, 2023

@Mohamed Benziane Thanks

Do you know, why Jira user is using multiple Java processes?

# top | grep java
106321 jira 20 0 19.7g 9.3g 87m S 3.9 59.6 469:04.11 java
101190 jira 20 0 17.7g 5.2g 7424 S 2.0 33.7 44:33.64 java

Regards
Tejas

0 votes
Answer accepted
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 17, 2023

Welcome to the Atlassian Community!

Java can handle multiple threads running the same thing, and "top" might not be reporting as you guess it would.  Depending on your distribution, try "htop" and "systemctl status", they may give you more detail on what is happening.

Your "top" just tells us that there are two Java (not necessarily Jira) processes are running, so you need to look at more detail on both of them to find out what it is doing.

If it's not a systemd install and you don't have htop, try "ps -ef | grep -i java" - that should tell you what the two java processes are (only one of them will be Jira-on-tomcat unless you've managed to configure two)

Tejas Naik June 26, 2023

Hi @Nic Brough -Adaptavist- 

Thanks for the reply, so sorry for my delayed response, I was fallen sick.

I tried running the command "ps -ef | grep -i java" and I do see two Java processes running the same Jira process, not sure if this is expected or if I have done any configuration issues during the last upgrade.

Result:
root      72008  71977  0 06:45 pts/0    00:00:00 grep -i java


jira     101190      1  0 Jun26 ?        00:53:19 /opt/gtnexus/jdk-11.0.4+11/bin/java

-Djava.util.logging.config.file=/opt/gtnexus/atlassian-jira/conf/logging.properties

-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Xms6144m -Xmx7168m -XX:InitialCodeCacheSize=32m -XX:ReservedCodeCacheSize=512m

-Djava.awt.headless=true -Datlassian.standalone=JIRA -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true -Dmail.mime.decodeparameters=true

-Dorg.dom4j.factory=com.atlassian.core.xml.InterningDocumentFactory -Dcom.arsenalesystems.dataplane.db.maxConnections=40 -Dmail.debug=true

-Djava.net.preferIPv4Stack=true -XX:-OmitStackTraceInFastThrow -Djava.locale.providers=COMPAT -Djdk.tls.ephemeralDHKeySize=2048

-Djava.protocol.handler.pkgs=org.apache.catalina.webresources

-Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Xlog:gc*:file=/opt/gtnexus/atlassian-jira/logs/atlassian-jira-gc-%t.log:tags,time,uptime,level:

filecount=5,filesize=20M -XX:+ExplicitGCInvokesConcurrent

-Dignore.endorsed.dirs= -classpath /opt/gtnexus/atlassian-jira/bin/bootstrap.jar:/opt/gtnexus/atlassian-jira/bin/tomcat-juli.jar

-Dcatalina.base=/opt/gtnexus/atlassian-jira -Dcatalina.home=/opt/gtnexus/atlassian-jira

-Djava.io.tmpdir=/opt/gtnexus/atlassian-jira/temp org.apache.catalina.startup.Bootstrap start

jira     106321      1 14 Jun26 ?        13:24:15 /opt/gtnexus/jdk-11.0.4+11/bin/java 

-Djava.util.logging.config.file=/opt/gtnexus/atlassian-jira/conf/logging.properties

-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Xms6144m -Xmx7168m -XX:InitialCodeCacheSize=32m -XX:ReservedCodeCacheSize=512m

-Djava.awt.headless=true -Datlassian.standalone=JIRA -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true -Dmail.mime.decodeparameters=true

-Dorg.dom4j.factory=com.atlassian.core.xml.InterningDocumentFactory -Dcom.arsenalesystems.dataplane.db.maxConnections=40 -Dmail.debug=true

-Djava.net.preferIPv4Stack=true -XX:-OmitStackTraceInFastThrow -Djava.locale.providers=COMPAT -Djdk.tls.ephemeralDHKeySize=2048

-Djava.protocol.handler.pkgs=org.apache.catalina.webresources

-Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Xlog:gc*:file=/opt/gtnexus/atlassian-jira/logs/atlassian-jira-gc-%t.log:tags,time,uptime,level:

filecount=5,filesize=20M -XX:+ExplicitGCInvokesConcurrent

-Dignore.endorsed.dirs= -classpath /opt/gtnexus/atlassian-jira/bin/bootstrap.jar:/opt/gtnexus/atlassian-jira/bin/tomcat-juli.jar

-Dcatalina.base=/opt/gtnexus/atlassian-jira -Dcatalina.home=/opt/gtnexus/atlassian-jira

-Djava.io.tmpdir=/opt/gtnexus/atlassian-jira/temp org.apache.catalina.startup.Bootstrap start

Regards
Tejas

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 26, 2023

That looks like you are running Jira twice, which should not be possible for more than a few seconds (the first one running should have created lock data that would prevent the second starting up).

I strongly recommend shutting them all down completely, and starting it again.  I'd also want to investigate why the duplicate-detection didn't work.

Like Tejas Naik likes this
Teja
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 27, 2023

Hi Nic,

Thanks for the reply,

Sure, let me stop and start.

Regards
Tejas

Suggest an answer

Log in or Sign up to answer