Wildfly: Many open libraries

时间:2016-02-12 20:12:17

标签: java-ee wildfly wildfly-8 lsof

I have an Java EE application which runs fine with wildfly 8.2.0 but after some days uptime there are many open files (170000+). After checking the system with "lsof" I found for many lines with open libraries (jar files).

For example:

lsof | grep "wildfly-jpa-8\.2\.0\.Final\.jar" | wc -l
or
lsof | grep "wildfly-batch-8\.2\.0\.Final\.jar" | wc -l

This gives me 216 lines.

lsof | grep "\.jar" | wc -l

Returns 97092 lines.

This can't be normal. Currently its not possible for me to reproduce this behavior. The page is highly frequently used therefore I run jmeter, on a test-server with the same setup, with 100 threads which navigates through the page for an hour but the open files did not increased more than 65000 open files for the whole system (lsof | wc -l).

1 个答案:

答案 0 :(得分:0)

某些版本的lsof包含一个线程ID。这可以通过输出中明显的TID列标题来确定。这样的输出会引起条目的重复,因为lsof可能会为每个线程显示一个重复的条目。

https://support.datastax.com/hc/en-us/articles/209826153-lsof-shows-Cassandra-is-holding-a-large-amount-of-files-open