Thread Limit Error doesn't seem valid?

Mike Sheehan January 11, 2018

Please help,

I’m getting a Thread Limit error (see Result below). But when I check the current limit (ulimit –a) (see result below), it shows I have plenty (31154). Just to be sure I modified the limits in "/etc/security/limits.d/90-nproc.conf" (My OS in CentOS 6) but that didn't help, I got the same error. Can you help me resolve this?

Result

The maximum number of processes for the user account running JIRA is currently 1024, which can cause performance issues. We recommend increasing this to at least 4,096.

 

[root@dfw0hipower01 jira]# ulimit -a

core file size          (blocks, -c) 0

data seg size           (kbytes, -d) unlimited

scheduling priority             (-e) 0

file size               (blocks, -f) unlimited

pending signals                 (-i) 31154

max locked memory       (kbytes, -l) 64

max memory size         (kbytes, -m) unlimited

open files                      (-n) 1024

pipe size            (512 bytes, -p) 8

POSIX message queues     (bytes, -q) 819200

real-time priority              (-r) 0

stack size              (kbytes, -s) 10240

cpu time               (seconds, -t) unlimited

max user processes              (-u) 31154

virtual memory          (kbytes, -v) unlimited

file locks                      (-x) unlimited

1 answer

0 votes
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 11, 2018

What version of Jira are you using?  There was a known bug about this health check throwing false positives for this specific health check a few versions back as I recall.

If that doesn't help, there is a KB on this kind of error in Health Check: Thread Limit.  That specific KB talks about ways to fix this problem.

Also what user account are you using to start/run jira?  I have seen some weirdness where Jira can generate these kinds of health check errors when running the application as root.   If that's the case, I would recommend creating a separate user to run Jira that is not the root account itself.

Mike Sheehan January 12, 2018

I'm using version 7.7.

As I've mentioned, I've modified "/etc/security/limits.d/90-nproc.conf" with this correct values but I'm not sure if/when that will take affect.

I also tried to add "ulimit -u 4096" to the jira/bin/setenv.sh file but that didn't work either.

The only way that I've found to make it work is to set the limit as user "jira", and then start jira (as user "jira").

I need to know how to add this setting (to one of the startup scripts) so that we don't have to manually set the limit (from the command line) before starting JIRA.

Thank you,

Mike.

Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 22, 2018

Hi Mike,

Sorry for the delay in response, but from what you have stated so far, that makes sense.  If Jira is being started by another user like root, this system thread limitation can behave differently for the root user versus other user accounts.   We would recommend that you have a separate user account specifically to run Jira aside from the root account itself.

Perhaps you can use the guide in How to set the user JIRA runs as in Linux in order to setup your Linux instance to use this jira user account even as a service when starting jira.   This way you can start Jira with this other account, and in turn you should not have to set this value each time before starting Jira to make this work correctly.

Please let me know the results.

Andy

Mike Sheehan January 23, 2018

Hi Andy,

Already have "jira" user and using that to start JIRA. The issue here is setting the "max user process limit" before starting JIRA.

I need to know how/where to add this setting (maybe one of the startup scripts in JIRA_INSTALLATION/bin) so that we don't have to manually set the limit from the command line before starting JIRA (see previous response). I tried adding it to the "setenv.sh" file without success.

Help. Thanks,

Mike

Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 25, 2018

Hi Mike,

Our documentation recommends setting this value permanently on the system. I understand if you are wanting to only do this on a per user basis, or only when Jira starts up, but I think it would be better to set this system wide once and for all and be done with it. That way we don't have to worry about trying to change this value upon each restart of the system.   You mentioned trying to set this in the /etc/security/limits.d/90-nproc.conf

However our guides seem to indicate this should actually be in /etc/security/limits.conf for RHL/CentOS. Although I admit I'm not running a CentOS 6 instance to see if this is the exact file/path for that OS.   Perhaps our own documentation is not yet clear enough on this topic.

In turn I did some searching and came across another guide that seems to be more specific for this OS.  Please check out CentOS/RHEL: Ulimit And Maximum Number Of Open Files.

Try following those steps to try to change this limit on the OS and let me know if this helps.

Andy

Suggest an answer

Log in or Sign up to answer