<?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>topic Re: Error executing reactive work due to unable to create native thread: possibly out of memory or process/resource limits reached. in ArcGIS GeoEvent Server Questions</title>
    <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/error-executing-reactive-work-due-to-unable-to/m-p/1367536#M4056</link>
    <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/747810"&gt;@JeffYang2023&lt;/a&gt;&amp;nbsp; -- I don't know if this will help. In an unrelated discussion looking at one of GeoEvent Server's processors which can potentially create a large number of threads, I was told that a&lt;SPAN&gt;&amp;nbsp;user can only create so many threads. The commands below were run on a Mac, so I assume there are similar commands you can run within your Linux (?) environment.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="terminal,monaco"&gt;ulimit -u&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;FONT face="terminal,monaco"&gt;5568&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="terminal,monaco"&gt;sysctl kern.num_threads&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;FONT face="terminal,monaco"&gt;kern.num_threads: 40960&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="terminal,monaco"&gt;sysctl kern.num_taskthreads&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;FONT face="terminal,monaco"&gt;kern.num_taskthreads: 8192&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Does this mean that a process owner on a given machine can only instantiate around 5500 threads, while the kernel can handle perhaps 41000 threads?&amp;nbsp; I'm not sure, but the limit for a number of "task" threads is much less, and all three are orders of magnitude less that the 2,000,000 event records you observe being ingest before seeing the&amp;nbsp;DefaultReactiveExecutor engine log the exception.&lt;/P&gt;&lt;P&gt;I was pointed to &lt;A href="https://stackoverflow.com/questions/5253072/java-unable-to-create-new-native-thread" target="_self"&gt;this article&lt;/A&gt; on stackoverflow which suggests that you may have reached a limit on the number of open files, if the process thread(s) are consuming a large number of file descriptors / handles. the article suggests punching the &lt;FONT face="andale mono,times"&gt;ulimit&lt;/FONT&gt; up from 5k to 65k ... but I really don't know what the ramifications of that might be for overall system stability.&lt;/P&gt;&lt;P&gt;You also might take a look at &lt;A href="https://www.mastertheboss.com/jbossas/monitoring/how-to-solve-javalangoutofmemoryerror-unable-to-create-new-native-thread/" target="_self"&gt;this article&lt;/A&gt; from&amp;nbsp;mastertheboss.com which walks through some suggestions for addressing the Java OutOfMemoryError.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;What input have you configured to receive the sensor data?&amp;nbsp; I'm assuming it is either the&amp;nbsp;&lt;EM&gt;Receive JSON on a WebSocket&lt;/EM&gt; or the&amp;nbsp;&lt;EM&gt;Subscribe to an External WebSocket for JSON&lt;/EM&gt; input?&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;&lt;LI&gt;Is the data being ingest by the input in one extremely large batch?&amp;nbsp; Or is the data coming in as several batches with some period of time between batches (and it is not until you eventually reach 2 Million records you see the error)?&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;I'm wondering if the issue is that hundreds-of-thousands of data records received all at once as a single massive batch of data is causing the issue, versus a potential resource leak in the inbound connector you're using where you can receive 250 data records each second and it takes over 2 hours to receive a sufficient number of data records to trigger the exception.&lt;/P&gt;&lt;P&gt;===&lt;/P&gt;&lt;P&gt;I would advise&amp;nbsp;that if you need to use the &lt;FONT face="andale mono,times"&gt;-Xms&lt;/FONT&gt; and &lt;FONT face="andale mono,times"&gt;-Xmx&lt;/FONT&gt; switches to increase the JVM RAM allocation that you set their values the same. This disables dynamic memory allocation. The way Java works, if you set a minimum of 1g and a maximum of 16g, when Java determines the JVM needs to be resized it will instantiate a new (larger) JVM and copy the running state into the new instance. This isn't as much of a problem if the system creates a 4g instance to copy over a currently running 2g instance (temporarily consuming 6 gigs). But if it were trying to dynamically scale 12g to 16g?&amp;nbsp; That's a lot of temporary memory being consumed to copy data from one JVM to another.&lt;/P&gt;&lt;P&gt;It is reportedly more stable, if you really need that much memory, to allocate a minimum (&lt;FONT face="andale mono,times"&gt;-Xms&lt;/FONT&gt;) to 16g and set the maximum (&lt;FONT face="andale mono,times"&gt;-Xmx&lt;/FONT&gt;) to 16g as well -- to prevent the dynamic resizing.&lt;/P&gt;</description>
    <pubDate>Mon, 08 Jan 2024 19:54:10 GMT</pubDate>
    <dc:creator>RJSunderman</dc:creator>
    <dc:date>2024-01-08T19:54:10Z</dc:date>
    <item>
      <title>Error executing reactive work due to unable to create native thread: possibly out of memory or process/resource limits reached.</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/error-executing-reactive-work-due-to-unable-to/m-p/1360768#M4044</link>
      <description>&lt;P&gt;Hello, everyone:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;I keep reading data from a websocket interface, and after about 2,000,000 events recieved, We will have&amp;nbsp; an error in the log which was reported by "&lt;SPAN&gt;org&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;apache&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;camel&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;impl&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;engine&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;DefaultReactiveExecutor"&amp;nbsp;&lt;/SPAN&gt;:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;Error&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;executing&amp;nbsp;reactive&amp;nbsp;work&amp;nbsp;due&amp;nbsp;to&amp;nbsp;unable&amp;nbsp;to&amp;nbsp;create&amp;nbsp;native&amp;nbsp;thread&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;possibly&amp;nbsp;out&amp;nbsp;of&amp;nbsp;memory&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;or&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;process&lt;/SPAN&gt;&lt;SPAN&gt;/&lt;/SPAN&gt;&lt;SPAN&gt;resource&amp;nbsp;limits&amp;nbsp;reached&lt;/SPAN&gt;&lt;SPAN&gt;.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;This&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;exception&amp;nbsp;is&amp;nbsp;ignored&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;java&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;lang&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;OutOfMemoryError&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;unable&amp;nbsp;to&amp;nbsp;create&amp;nbsp;native&amp;nbsp;thread&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;possibly&amp;nbsp;out&amp;nbsp;of&amp;nbsp;memory&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;or&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;process&lt;/SPAN&gt;&lt;SPAN&gt;/&lt;/SPAN&gt;&lt;SPAN&gt;resource&amp;nbsp;limits&amp;nbsp;reached&amp;nbsp;at&amp;nbsp;java&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;lang&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;Thread&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;start0&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Native&lt;/SPAN&gt; &lt;SPAN&gt;Method&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;I increased the memory limit in the GeoEvent/etc/ArcGISGeoEvent-wrapper.cfg&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;# Minimum and Maximum Java Heap Sizes&lt;BR /&gt;wrapper.java.additional.15=-Xms1g&lt;BR /&gt;wrapper.java.additional.16=-Xmx16g&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;the above error still exist.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;is there any other settings I can modify to elimiate the above outofmemory error?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks a lot.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jan 2024 17:57:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/error-executing-reactive-work-due-to-unable-to/m-p/1360768#M4044</guid>
      <dc:creator>JeffYang2023</dc:creator>
      <dc:date>2024-01-08T17:57:34Z</dc:date>
    </item>
    <item>
      <title>Re: Error executing reactive work due to unable to create native thread: possibly out of memory or process/resource limits reached.</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/error-executing-reactive-work-due-to-unable-to/m-p/1361254#M4045</link>
      <description>&lt;P&gt;full exception trace is here, thanks a lot:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Error&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;executing&amp;nbsp;reactive&amp;nbsp;work&amp;nbsp;due&amp;nbsp;to&amp;nbsp;unable&amp;nbsp;to&amp;nbsp;create&amp;nbsp;native&amp;nbsp;thread&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;possibly&amp;nbsp;out&amp;nbsp;of&amp;nbsp;memory&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;or&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;process&lt;/SPAN&gt;&lt;SPAN&gt;/&lt;/SPAN&gt;&lt;SPAN&gt;resource&amp;nbsp;limits&amp;nbsp;reached&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt; &lt;SPAN&gt;This&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;exception&amp;nbsp;is&amp;nbsp;ignored&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;java&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;lang&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;OutOfMemoryError&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;unable&amp;nbsp;to&amp;nbsp;create&amp;nbsp;native&amp;nbsp;thread&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;possibly&amp;nbsp;out&amp;nbsp;of&amp;nbsp;memory&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;or&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;process&lt;/SPAN&gt;&lt;SPAN&gt;/&lt;/SPAN&g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lt;/SPAN&gt;&lt;SPAN&gt;?&lt;/SPAN&gt;&lt;SPAN&gt;]&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;at&amp;nbsp;java&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;lang&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;Thread&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;run&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Unknown&lt;/SPAN&gt; &lt;SPAN&gt;Source&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt; &lt;SPAN&gt;[&lt;/SPAN&gt;&lt;SPAN&gt;?&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;?&lt;/SPAN&gt;&lt;SPAN&gt;]&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2023 01:10:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/error-executing-reactive-work-due-to-unable-to/m-p/1361254#M4045</guid>
      <dc:creator>JeffYang2023</dc:creator>
      <dc:date>2023-12-15T01:10:59Z</dc:date>
    </item>
    <item>
      <title>Re: Error executing reactive work due to unable to create native thread: possibly out of memory or process/resource limits reached.</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/error-executing-reactive-work-due-to-unable-to/m-p/1367536#M4056</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/747810"&gt;@JeffYang2023&lt;/a&gt;&amp;nbsp; -- I don't know if this will help. In an unrelated discussion looking at one of GeoEvent Server's processors which can potentially create a large number of threads, I was told that a&lt;SPAN&gt;&amp;nbsp;user can only create so many threads. The commands below were run on a Mac, so I assume there are similar commands you can run within your Linux (?) environment.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="terminal,monaco"&gt;ulimit -u&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;FONT face="terminal,monaco"&gt;5568&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="terminal,monaco"&gt;sysctl kern.num_threads&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;FONT face="terminal,monaco"&gt;kern.num_threads: 40960&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="terminal,monaco"&gt;sysctl kern.num_taskthreads&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;FONT face="terminal,monaco"&gt;kern.num_taskthreads: 8192&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Does this mean that a process owner on a given machine can only instantiate around 5500 threads, while the kernel can handle perhaps 41000 threads?&amp;nbsp; I'm not sure, but the limit for a number of "task" threads is much less, and all three are orders of magnitude less that the 2,000,000 event records you observe being ingest before seeing the&amp;nbsp;DefaultReactiveExecutor engine log the exception.&lt;/P&gt;&lt;P&gt;I was pointed to &lt;A href="https://stackoverflow.com/questions/5253072/java-unable-to-create-new-native-thread" target="_self"&gt;this article&lt;/A&gt; on stackoverflow which suggests that you may have reached a limit on the number of open files, if the process thread(s) are consuming a large number of file descriptors / handles. the article suggests punching the &lt;FONT face="andale mono,times"&gt;ulimit&lt;/FONT&gt; up from 5k to 65k ... but I really don't know what the ramifications of that might be for overall system stability.&lt;/P&gt;&lt;P&gt;You also might take a look at &lt;A href="https://www.mastertheboss.com/jbossas/monitoring/how-to-solve-javalangoutofmemoryerror-unable-to-create-new-native-thread/" target="_self"&gt;this article&lt;/A&gt; from&amp;nbsp;mastertheboss.com which walks through some suggestions for addressing the Java OutOfMemoryError.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;What input have you configured to receive the sensor data?&amp;nbsp; I'm assuming it is either the&amp;nbsp;&lt;EM&gt;Receive JSON on a WebSocket&lt;/EM&gt; or the&amp;nbsp;&lt;EM&gt;Subscribe to an External WebSocket for JSON&lt;/EM&gt; input?&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;&lt;LI&gt;Is the data being ingest by the input in one extremely large batch?&amp;nbsp; Or is the data coming in as several batches with some period of time between batches (and it is not until you eventually reach 2 Million records you see the error)?&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;I'm wondering if the issue is that hundreds-of-thousands of data records received all at once as a single massive batch of data is causing the issue, versus a potential resource leak in the inbound connector you're using where you can receive 250 data records each second and it takes over 2 hours to receive a sufficient number of data records to trigger the exception.&lt;/P&gt;&lt;P&gt;===&lt;/P&gt;&lt;P&gt;I would advise&amp;nbsp;that if you need to use the &lt;FONT face="andale mono,times"&gt;-Xms&lt;/FONT&gt; and &lt;FONT face="andale mono,times"&gt;-Xmx&lt;/FONT&gt; switches to increase the JVM RAM allocation that you set their values the same. This disables dynamic memory allocation. The way Java works, if you set a minimum of 1g and a maximum of 16g, when Java determines the JVM needs to be resized it will instantiate a new (larger) JVM and copy the running state into the new instance. This isn't as much of a problem if the system creates a 4g instance to copy over a currently running 2g instance (temporarily consuming 6 gigs). But if it were trying to dynamically scale 12g to 16g?&amp;nbsp; That's a lot of temporary memory being consumed to copy data from one JVM to another.&lt;/P&gt;&lt;P&gt;It is reportedly more stable, if you really need that much memory, to allocate a minimum (&lt;FONT face="andale mono,times"&gt;-Xms&lt;/FONT&gt;) to 16g and set the maximum (&lt;FONT face="andale mono,times"&gt;-Xmx&lt;/FONT&gt;) to 16g as well -- to prevent the dynamic resizing.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jan 2024 19:54:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/error-executing-reactive-work-due-to-unable-to/m-p/1367536#M4056</guid>
      <dc:creator>RJSunderman</dc:creator>
      <dc:date>2024-01-08T19:54:10Z</dc:date>
    </item>
  </channel>
</rss>

