audit4j / audit4j-core

An open source auditing framework.
http://audit4j.org
Apache License 2.0
126 stars 76 forks source link

IOException on Solaris, as .audit files are not getting closed #50

Open srrprasad opened 7 years ago

srrprasad commented 7 years ago

On Solaris 10 with Weblogic 12c and audit4j 2.3.1, when load tests are run, we are seeing IOException due to too many open files. java.io.FileNotFoundException: /audit/Audit_Log-2016-12-14.audit (Too many open files) at java.io.RandomAccessFile.open0(Native Method) at java.io.RandomAccessFile.open(RandomAccessFile.java:316) at java.io.RandomAccessFile.(RandomAccessFile.java:243) at java.io.RandomAccessFile.(RandomAccessFile.java:124) at org.audit4j.core.handler.file.ZeroCopyFileWriter.write(ZeroCopyFileWriter.java:88)

When looked at the open files using pfiles -F command, we are seeing many .audit files in open mode as below: pfiles -F | grep -i audit .... removed audit jar files ... /audit/Audit_Log-2016-12-15.audit /audit/Audit_Log-2016-12-15.audit This makes the number of open files grow very quickly to more than the allowed 65k files, causing the error. Our code is very simple: private static AuditManager manager = AuditManager.getInstance(); //create builder with data manager.audit(builder.build());