<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: OutofMemory with GetmongoDB in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/OutofMemory-with-GetmongoDB/m-p/179604#M61461</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/10685/thierryvernhet.html" nodeid="10685"&gt;@Thierry Vernhet&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Try setting the Batch Size property to 1000, and see if that helps.&lt;/P&gt;</description>
    <pubDate>Fri, 19 May 2017 19:51:31 GMT</pubDate>
    <dc:creator>Wynner</dc:creator>
    <dc:date>2017-05-19T19:51:31Z</dc:date>
    <item>
      <title>OutofMemory with GetmongoDB</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/OutofMemory-with-GetmongoDB/m-p/179603#M61460</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I try to get &lt;STRONG&gt;2,500,000&lt;/STRONG&gt; records from a MongoDB collection with &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1. these parameters in bootstrap.conf&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;# JVM memory settings &lt;/P&gt;&lt;P&gt;java.arg.2=-Xms6144m &lt;/P&gt;&lt;P&gt;java.arg.3=-Xmx6144m&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2.the following properties processor&lt;/STRONG&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;SSL Context Service
No value set&lt;/P&gt;&lt;P&gt;
Client Auth NONE&lt;/P&gt;&lt;DIV&gt;Query
No value set &lt;/DIV&gt;&lt;DIV&gt;Projection
No value set &lt;/DIV&gt;&lt;DIV&gt;Sort
No value set &lt;/DIV&gt;&lt;DIV&gt;Limit No value set &lt;/DIV&gt;&lt;DIV&gt;Batch Size
No value set &lt;/DIV&gt;&lt;DIV&gt;and with &lt;STRONG&gt;2 concurrent tasks scheduling&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;I've tried wtih 4Go, then 6Go for the memory settings. Nifi failed with OutofMemory errors&lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt;&lt;STRONG&gt;With 4Go  -  Starting GetMongo processor at 09:05 and Error at 09:24&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;2017-05-19 09:24:40,150 ERROR [Timer-Driven
Process Thread-4] o.a.nifi.processors.mongodb.GetMongo
GetMongo[id=4ee5171c-1006-115b-5dc0-6ef54c1e9a73]
GetMongo[id=4ee5171c-1006-115b-5dc0-6ef54c1e9a73] failed to process due to
java.lang.OutOfMemoryError: Java heap space; rolling back session:
java.lang.OutOfMemoryError: Java heap space&lt;/P&gt;&lt;P&gt;2017-05-19 09:24:40,167 ERROR [Timer-Driven
Process Thread-4] o.a.nifi.processors.mongodb.GetMongo java.lang.OutOfMemoryError : Java heap space&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;With 6Go &lt;/STRONG&gt;&lt;STRONG&gt;-  Starting GetMongo processor at 09:42 and Error at 10:28&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;2017-05-19
10:28:50,336 ERROR [NiFi logging handler] org.apache.nifi.StdErr&lt;/P&gt;&lt;P&gt;2017-05-19
10:28:50,337 ERROR [NiFi logging handler] org.apache.nifi.StdErr Exception:
java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread
"pool-2-thread-1"&lt;/P&gt;&lt;P&gt;Do you have any suggestions to help me ?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 19 May 2017 16:17:28 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/OutofMemory-with-GetmongoDB/m-p/179603#M61460</guid>
      <dc:creator>thierry_vernhet</dc:creator>
      <dc:date>2017-05-19T16:17:28Z</dc:date>
    </item>
    <item>
      <title>Re: OutofMemory with GetmongoDB</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/OutofMemory-with-GetmongoDB/m-p/179604#M61461</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/10685/thierryvernhet.html" nodeid="10685"&gt;@Thierry Vernhet&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Try setting the Batch Size property to 1000, and see if that helps.&lt;/P&gt;</description>
      <pubDate>Fri, 19 May 2017 19:51:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/OutofMemory-with-GetmongoDB/m-p/179604#M61461</guid>
      <dc:creator>Wynner</dc:creator>
      <dc:date>2017-05-19T19:51:31Z</dc:date>
    </item>
    <item>
      <title>Re: OutofMemory with GetmongoDB</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/OutofMemory-with-GetmongoDB/m-p/179605#M61462</link>
      <description>&lt;P&gt;I've set it to 100 or 1000 or 2000. After about 10 minutes, the processor reads with success all the collection but in one shot and whatever the value of the propoerty. Is it normal ?&lt;/P&gt;</description>
      <pubDate>Fri, 19 May 2017 21:53:32 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/OutofMemory-with-GetmongoDB/m-p/179605#M61462</guid>
      <dc:creator>thierry_vernhet</dc:creator>
      <dc:date>2017-05-19T21:53:32Z</dc:date>
    </item>
    <item>
      <title>Re: OutofMemory with GetmongoDB</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/OutofMemory-with-GetmongoDB/m-p/179606#M61463</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/10685/thierryvernhet.html" nodeid="10685"&gt;@Thierry Vernhet&lt;/A&gt;&lt;P&gt;So, you are saying it works with Batch Size set, but it does not matter what you set the value to?&lt;/P&gt;</description>
      <pubDate>Sat, 20 May 2017 00:56:07 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/OutofMemory-with-GetmongoDB/m-p/179606#M61463</guid>
      <dc:creator>Wynner</dc:creator>
      <dc:date>2017-05-20T00:56:07Z</dc:date>
    </item>
    <item>
      <title>Re: OutofMemory with GetmongoDB</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/OutofMemory-with-GetmongoDB/m-p/179607#M61464</link>
      <description>&lt;P&gt;Exactlty&lt;/P&gt;&lt;P&gt;The queue after GetMongo has 2,500,000,evt (1,3GB). The following processor (MergeContent) can not empty this queue. &lt;/P&gt;&lt;P&gt;And I don't understand why ?&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2017 17:04:09 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/OutofMemory-with-GetmongoDB/m-p/179607#M61464</guid>
      <dc:creator>thierry_vernhet</dc:creator>
      <dc:date>2017-05-22T17:04:09Z</dc:date>
    </item>
    <item>
      <title>Re: OutofMemory with GetmongoDB</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/OutofMemory-with-GetmongoDB/m-p/179608#M61465</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/10685/thierryvernhet.html" nodeid="10685"&gt;@Thierry Vernhet&lt;/A&gt;&lt;P&gt;How are the properties set in the MergeContent processor?&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2017 18:53:00 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/OutofMemory-with-GetmongoDB/m-p/179608#M61465</guid>
      <dc:creator>Wynner</dc:creator>
      <dc:date>2017-05-22T18:53:00Z</dc:date>
    </item>
    <item>
      <title>Re: OutofMemory with GetmongoDB</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/OutofMemory-with-GetmongoDB/m-p/179609#M61466</link>
      <description>&lt;P&gt;&lt;A href="https://community.hortonworks.com/questions/103680/outofmemory-with-getmongodb.html#"&gt;@Wynner&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thanks for your feddback, &lt;/P&gt;&lt;P&gt;Here are the properties (I've also tried with 200MB before but it doesn't work). &lt;/P&gt;&lt;P style="margin-left: 40px;"&gt;Merge
Strategy  Bin-Packing
Algorithm&lt;/P&gt;&lt;P style="margin-left: 40px;"&gt;Merge
Format  Binary
Concatenation&lt;/P&gt;&lt;P style="margin-left: 40px;"&gt;Attribute
Strategy  Keep Only Common
Attributes&lt;/P&gt;&lt;P style="margin-left: 40px;"&gt;Correlation
Attribute Name  No value set&lt;/P&gt;&lt;P style="margin-left: 40px;"&gt;Minimum
Number of Entries  1&lt;/P&gt;&lt;P style="margin-left: 40px;"&gt;Maximum
Number of Entries  No value set&lt;/P&gt;&lt;P style="margin-left: 40px;"&gt;Minimum
Group Size   20 MB&lt;/P&gt;&lt;P style="margin-left: 40px;"&gt;Maximum
Group Size   20 MB&lt;/P&gt;&lt;P style="margin-left: 40px;"&gt;Max Bin Age
  5 min&lt;/P&gt;&lt;P style="margin-left: 40px;"&gt;Maximum
number of Bins   100&lt;/P&gt;&lt;P style="margin-left: 40px;"&gt;Delimiter
Strategy   Text&lt;/P&gt;&lt;P style="margin-left: 40px;"&gt;Header  No value set&lt;/P&gt;&lt;P style="margin-left: 40px;"&gt;Footer    No
value set&lt;/P&gt;&lt;P style="margin-left: 40px;"&gt;Demarcator&lt;/P&gt;&lt;P style="margin-left: 40px;"&gt;Compression
Level  1&lt;/P&gt;&lt;P style="margin-left: 40px;"&gt;Keep Path  false&lt;/P&gt;&lt;P style="margin-left: 20px;"&gt;&lt;/P&gt;&lt;P&gt;After an hour Nifi fails with a outOfmemory&lt;/P&gt;&lt;P style="margin-left: 20px;"&gt;2017-05-22 12:35:44,770 WARN [NiFi Web Server-22-acceptor-0@2c439296-ServerConnector@ccf1486{HTTP/1.1,[http/1.1]}{0.0.0.0:28080}] o.eclipse.jetty.server.AbstractConnector
java.lang.OutOfMemoryError: Java heap space
2017-05-22 12:35:44,784 WARN [NiFi Web Server-21] org.eclipse.jetty.servlet.ServletHandler Error for /nifi-api/flow/controller/bulletins
java.lang.OutOfMemoryError: Java heap space
        at java.lang.StringBuilder.toString(StringBuilder.java:407) ~[na:1.8.0_66]
        at java.net.Inet4Address.numericToTextFormat(Inet4Address.java:373) ~[na:1.8.0_66]
        at java.net.Inet4Address.getHostAddress(Inet4Address.java:328) ~[na:1.8.0_66]
        at org.eclipse.jetty.server.Request.getRemoteAddr(Request.java:1193) ~[na:na]
        at javax.servlet.ServletRequestWrapper.getRemoteAddr(ServletRequestWrapper.java:275) ~[javax.servlet-api-3.1.0.jar:3.1.0]
        at org.apache.nifi.web.filter.RequestLogger.doFilter(RequestLogger.java:62) ~[classes/:na]
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1676) ~[na:na]
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:316) ~[spring-security-web-4.0.3.RELEASE.jar:4.0.3.RELEASE]&lt;/P&gt;&lt;P style="margin-left: 40px;"&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2017 20:14:52 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/OutofMemory-with-GetmongoDB/m-p/179609#M61466</guid>
      <dc:creator>thierry_vernhet</dc:creator>
      <dc:date>2017-05-22T20:14:52Z</dc:date>
    </item>
    <item>
      <title>Re: OutofMemory with GetmongoDB</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/OutofMemory-with-GetmongoDB/m-p/179610#M61467</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/10685/thierryvernhet.html" nodeid="10685"&gt;@Thierry Vernhet&lt;/A&gt;&lt;P&gt;Try putting a larger range between the minimum and maximum group size, like 25 MB and 50 MB.&lt;/P&gt;&lt;P&gt;How much memory have you allocated to the NiFi JVM? The default is 512MB, it is set in the bootsrrap.conf file.&lt;/P&gt;&lt;P&gt;# JVM memory settings &lt;/P&gt;&lt;P&gt;java.arg.2=-Xms512m, change to 2g or 4g if you have the memory available on your system&lt;/P&gt;&lt;P&gt;java.arg.3=-Xmx512m, change to 2g or 4g if you have the memory available on your system&lt;/P&gt;&lt;P&gt;Since you are dealing with 1.3 GB in the MergeContent processor, make sure to at least allocate double that for the NiFi JVM, because the MergeContent processor uses the JVM memory to build it merged flow files.  In addition I would set the number of Concurrent Tasks to 3.&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2017 22:01:09 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/OutofMemory-with-GetmongoDB/m-p/179610#M61467</guid>
      <dc:creator>Wynner</dc:creator>
      <dc:date>2017-05-22T22:01:09Z</dc:date>
    </item>
    <item>
      <title>Re: OutofMemory with GetmongoDB</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/OutofMemory-with-GetmongoDB/m-p/179611#M61468</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/286/dwynne.html" nodeid="286"&gt;@Wynner&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Memory settings already to 8Go for both.&lt;/P&gt;&lt;P&gt;This morning I tried to set Number min and max of Entries and it works !!! &lt;/P&gt;&lt;P&gt;Thanks for your help Wynner.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Parameters set (so the merge create about 1000 files)&lt;/P&gt;&lt;P style="margin-left: 20px;"&gt;Minimum Number of Entries
&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;1&lt;/PRE&gt;
&lt;/DIV&gt;&lt;P style="margin-left: 20px;"&gt;Maximum Number of Entries
&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;2500&lt;/PRE&gt;
&lt;/DIV&gt;&lt;P style="margin-left: 20px;"&gt;Minimum Group Size
&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;0 B&lt;/PRE&gt;
&lt;/DIV&gt;&lt;P style="margin-left: 20px;"&gt;Maximum Group Size
No value set
Max Bin Age
&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;5 min&lt;/PRE&gt;
&lt;/DIV&gt;&lt;P style="margin-left: 20px;"&gt;Maximum number of Bins
&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;100&lt;/PRE&gt;
&lt;/DIV&gt;&lt;P style="margin-left: 20px;"&gt;Delimiter Strategy
&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;Text&lt;/PRE&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 23 May 2017 13:23:07 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/OutofMemory-with-GetmongoDB/m-p/179611#M61468</guid>
      <dc:creator>thierry_vernhet</dc:creator>
      <dc:date>2017-05-23T13:23:07Z</dc:date>
    </item>
  </channel>
</rss>

