Here is the output of the same command on my machine as well as the contents of 
/etc/security/limits.conf:

hw12203:/Users/alopresto/Workspace/nifi (pr1763) alopresto
🔓 300s @ 14:37:42 $ launchctl limit
        cpu         unlimited      unlimited
        filesize    unlimited      unlimited
        data        unlimited      unlimited
        stack       8388608        67104768
        core        0              unlimited
        rss         unlimited      unlimited
        memlock     unlimited      unlimited
        maxproc     709            1064
        maxfiles    256            unlimited
hw12203:/Users/alopresto/Workspace/nifi (pr1763) alopresto
🔓 159954s @ 08:03:38 $ more /etc/security/limits.conf
*  hard  nofile  50000
*  soft  nofile  50000
hw12203:/Users/alopresto/Workspace/nifi (pr1763) alopresto
🔓 15s @ 08:03:54 $

Andy LoPresto
[email protected]
[email protected]
PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4  BACE 3C6E F65B 2F7D EF69

> On May 7, 2017, at 12:21 AM, Buntu Dev <[email protected]> wrote:
> 
> I tried increasing the limit to 200000 following the steps mentioned here for 
> OSX:
>   https://superuser.com/a/1171026 <https://superuser.com/a/1171026>
> 
> $ launchctl limit
>       cpu         unlimited      unlimited
>       filesize    unlimited      unlimited
>       data        unlimited      unlimited
>       stack       8388608        67104768
>       core        0              unlimited
>       rss         unlimited      unlimited
>       memlock     unlimited      unlimited
>       maxproc     2048           2048
>       maxfiles    200000         200000
> 
> I even tried to reduce the `nifi.flowfile.repository.partitions`, but still 
> keep running into "Too many open files".
> Would greatly appreciate if there are any other suggestions on how to 
> increase open file limit on Mac OSX (Sierra), thanks!
> 
> 
> On Fri, May 5, 2017 at 11:07 AM, Andy LoPresto <[email protected] 
> <mailto:[email protected]>> wrote:
> Please follow the configuration best practices [1] to raise the open file 
> handle limit on your system.
> 
> [1] 
> https://nifi.apache.org/docs/nifi-docs/html/administration-guide.html#configuration-best-practices
>  
> <https://nifi.apache.org/docs/nifi-docs/html/administration-guide.html#configuration-best-practices>
> 
> 
> Andy LoPresto
> [email protected] <mailto:[email protected]>
> [email protected] <mailto:[email protected]>
> PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4  BACE 3C6E F65B 2F7D EF69
> 
>> On May 5, 2017, at 2:00 PM, Buntu Dev <[email protected] 
>> <mailto:[email protected]>> wrote:
>> 
>> I was able to build from master branch but when starting Nifi on Mac, I run 
>> into "Too many open files" error.
>> 
>> $ ulimit -n
>> 2048
>> 
>> Any suggestions on how to fix this error?
>> 
>> ~~~~~
>> org.apache.nifi.web.server.JettyServer Failed to start web server... 
>> shutting down.
>> org.apache.nifi.web.NiFiCoreException: Unable to start Flow Controller.
>>      at 
>> org.apache.nifi.web.contextlistener.ApplicationStartupContextListener.contextInitialized(ApplicationStartupContextListener.java:88)
>>      at 
>> org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:876)
>>      at 
>> org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:532)
>>      at 
>> org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:839)
>>      at 
>> org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:344)
>>      at 
>> org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1480)
>>      at 
>> org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1442)
>>      at 
>> org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:799)
>>      at 
>> org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:261)
>>      at 
>> org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:540)
>>      at 
>> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
>>      at 
>> org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131)
>>      at 
>> org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:113)
>>      at 
>> org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
>>      at 
>> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
>>      at 
>> org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131)
>>      at 
>> org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:105)
>>      at 
>> org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
>>      at 
>> org.eclipse.jetty.server.handler.gzip.GzipHandler.doStart(GzipHandler.java:290)
>>      at 
>> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
>>      at 
>> org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131)
>>      at org.eclipse.jetty.server.Server.start(Server.java:452)
>>      at 
>> org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:105)
>>      at 
>> org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
>>      at org.eclipse.jetty.server.Server.doStart(Server.java:419)
>>      at 
>> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
>>      at org.apache.nifi.web.server.JettyServer.start(JettyServer.java:695)
>>      at org.apache.nifi.NiFi.<init>(NiFi.java:160)
>>      at org.apache.nifi.NiFi.main(NiFi.java:267)
>> Caused by: java.io.FileNotFoundException: 
>> ./flowfile_repository/partition-110/1.journal (Too many open files)
>>      at java.io.FileOutputStream.open0(Native Method)
>>      at java.io.FileOutputStream.open(FileOutputStream.java:270)
>>      at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
>>      at java.io.FileOutputStream.<init>(FileOutputStream.java:162)
>>      at 
>> org.wali.MinimalLockingWriteAheadLog$Partition.endRecovery(MinimalLockingWriteAheadLog.java:1076)
>>      at 
>> org.wali.MinimalLockingWriteAheadLog.recoverFromEdits(MinimalLockingWriteAheadLog.java:487)
>>      at 
>> org.wali.MinimalLockingWriteAheadLog.recoverRecords(MinimalLockingWriteAheadLog.java:301)
>>      at 
>> org.apache.nifi.controller.repository.WriteAheadFlowFileRepository.loadFlowFiles(WriteAheadFlowFileRepository.java:381)
>>      at 
>> org.apache.nifi.controller.FlowController.initializeFlow(FlowController.java:712)
>>      at 
>> org.apache.nifi.controller.StandardFlowService.initializeController(StandardFlowService.java:953)
>>      at 
>> org.apache.nifi.controller.StandardFlowService.load(StandardFlowService.java:534)
>>      at 
>> org.apache.nifi.web.contextlistener.ApplicationStartupContextListener.contextInitialized(ApplicationStartupContextListener.java:72)
>>      ... 28 common frames omitted
>> ~~~~~~
>> 
>> Thanks!
> 
> 

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

Reply via email to