HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

error: Java maximum number of allowed open files: 2048

 
nancy rippey
Trusted Contributor

error: Java maximum number of allowed open files: 2048

Receiving the following in syslog
Java: Maximum number of allowed open files: 2048 and don't know why.

LSOF shows the number of open files to only be 103.

Currently 130 threads

Ulimit -a of the user running the job is:
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) 1048576
stack(kbytes) 131072
memory(kbytes) unlimited
coredump(blocks) 4194303

Kernel parameters are set to:
max_thread_proc 256
maxdsiz 0X40000000
maxdsiz_64bit 0X40000000
maxfiles 2048
maxfiles_lim 2048
maxssiz 0X8000000
maxssiz_64bit 0X8000000
maxswapchunks 16384
maxtsiz 0X8000000
maxtsiz_64bit 0X40000000
maxuprc 2000
maxusers 1024
maxvgs 64
msgmax 65565
msgmnb 65565
msgmni 1200
msgseg 7168
msgssz 1024
msgtql 2048
nfile 40000
nflocks 2048
nproc 4096
npty 1024
nstrpty 300
nstrtel 256
semaem 32767
semmni 8192
semmns 15000
semmnu 2048
semume 2048
semvmx 65535
shmmax 0X80000000
shmmni 750


I can not see any reason why this is being received
nrip
3 REPLIES
Alex Glennie
Honored Contributor

Re: error: Java maximum number of allowed open files: 2048

http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=949603

references why lsof may not be picking this up.

Sorry not an expert in this area, but would suggest posting outputs from lsof and also detailing java app etc .... read that previous post too.

kevin_m
Valued Contributor

Re: error: Java maximum number of allowed open files: 2048

I ran into this same issue a while back and increased maxfiles_lim to 4096. There's been no complaints since then but I don't recall if the application admin needed to restart the Java process or not. Fortunately that particular kernel parameter can be changed dynamically.
Matti_Kurkela
Honored Contributor

Re: error: Java maximum number of allowed open files: 2048

Java can use a *lot* of network sockets, and they are counted as equivalent to files in the maxfiles limits.

The original error message actually has a subtle clue about this:

> "java.net.SocketException: Too many open files"

The standard error message text was "Too many open files". But the exception was java.net.SocketException, which obviously deals with network sockets, rather than files.

MK
MK