[ 
https://issues.apache.org/jira/browse/NIFI-9572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17528846#comment-17528846
 ] 

Joe Witt commented on NIFI-9572:
--------------------------------

For anyone that has issues with max open files what we need in each case is:
1. The specific version of apache nifi.
2. The specific os/kernel version in use (uname -a)
3. The specific java runtime actually being used by nifi
4. A dump from 'lsof -p <pid of actual nifi process>'
5. What is your ulimit for files?  (ulimit -a)

If the lsof dump doesn't equate to a very large number (close to your systems 
max) then the process your listing it for isnt the right one.  Or nifi isn't 
the one leaking.  Or the leaked resources are no longer bound to the nifi 
process.

Running out of file handles happens.  It has occurred due to bugs in nifi 
historically.  It has occurred due to bugs in the JVM.  And it has happened due 
to bugs in custom components people created.

The most common cause has been socket leaks rather than file leaks.  The good 
thing about that is it is almost always easy to tie it to something in 
code/system/etc.. (except the JVM issue which honestly was a brutal nightmare).

So please in each case share those things and we can help pinpoint root cause.

> Failed to index Provenance Events and (Too many Files)
> ------------------------------------------------------
>
>                 Key: NIFI-9572
>                 URL: https://issues.apache.org/jira/browse/NIFI-9572
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core UI
>    Affects Versions: 1.15.2
>            Reporter: mayki
>            Priority: Major
>         Attachments: bootstrap.conf, nifi-app.log, nifi-app.log.tar.gz, 
> nifi.properties, nifi_691106_pid.tar.gz
>
>
> Hello
> I have upgraded NIFI 1.15.2 since 2022/01/05
> No issue until this night 2022/01/13
>  * nifi version 1.15.2
>  * jdk-1.8.0_311
> And the limit is high
> {code:java}
> Last login: Fri Jan 14 09:57:06 CET 2022 on pts/2
> -bash-4.2@nifi$ ulimit -a
> core file size          (blocks, -c) 0
> data seg size           (kbytes, -d) unlimited
> scheduling priority             (-e) 0
> file size               (blocks, -f) rg
> pending signals                 (-i) 63278
> max locked memory       (kbytes, -l) 64
> max memory size         (kbytes, -m) unlimited
> open files                      (-n) 50000
> pipe size            (512 bytes, -p) 8
> POSIX message queues     (bytes, -q) 819200
> real-time priority              (-r) 0
> stack size              (kbytes, -s) 8192
> cpu time               (seconds, -t) unlimited
> max user processes              (-u) 10000
> virtual memory          (kbytes, -v) unlimited
> file locks                      (-x) unlimited
>  {code}
>  
> We got a lot error about provenance_repository, it fill our filesystem logs ..
>  
> {code:java}
> 2022-01-14 10:19:00,963 ERROR [Index Provenance Events-2] 
> o.a.n.p.index.lucene.EventIndexTask Failed to index Provenance Events
> org.apache.lucene.store.AlreadyClosedException: this IndexWriter is closed
>         at 
> org.apache.lucene.index.IndexWriter.ensureOpen(IndexWriter.java:877)
>         at 
> org.apache.lucene.index.IndexWriter.ensureOpen(IndexWriter.java:891)
>         at 
> org.apache.lucene.index.IndexWriter.updateDocuments(IndexWriter.java:1468)
>         at 
> org.apache.lucene.index.IndexWriter.addDocuments(IndexWriter.java:1444)
>         at 
> org.apache.nifi.provenance.lucene.LuceneEventIndexWriter.index(LuceneEventIndexWriter.java:70)
>         at 
> org.apache.nifi.provenance.index.lucene.EventIndexTask.index(EventIndexTask.java:202)
>         at 
> org.apache.nifi.provenance.index.lucene.EventIndexTask.run(EventIndexTask.java:113)
>         at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>         at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>         at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>         at java.lang.Thread.run(Thread.java:748)
> Caused by: java.nio.file.FileSystemException: 
> /data/nifi/provenance_repository/lucene-8-index-1642145908399/_4_Lucene80_0.dvd:
>  Too many open files
>  {code}
>  
>  
> We expect upgrade all nifi instances to 1.15.2 to avoid log4j vulnerability. 
> But it is impossible to do that if we got this error.
>  
> Thanks for you help.
>  
> Regards 
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to