title: Appium forces JavaScript heap out of memory
body: <p>Running autotests by pagefactory + testng + maven
  1) start selenium grid:</p>
  
  <pre><code>java -jar \selenium-server-standalone-2.53.0.jar -role hub
  </code></pre>
  
  <p>2) start appium servers:</p>
  
  <pre><code>appium -a 127.0.0.1 -p 4723 --bootstrap-port 4720 -U 3b06c2a2 --nodeconfig node_config_1.json
  
  appium -a 127.0.0.1 -p 4725 --bootstrap-port 4729 -U LenovoTAB2A8 --nodeconfig node_config_2.json
  </code></pre>
  
  <p>3) Start tests:  mvn test</p>
  
  <p>appium version: 1.6.3 / 1.5.3 /1.4 - checked on all versions.
  node version: js node-v7.7.4-x64.msi
  java 1.8 , Windows 7 x64</p>
  
  <p>After 30minutes second appium (-p 4725) uses too mush RAM ~1.3Gb, when first one usese less RAM (-p 47253) ~300Mb</p>
  
  <p>And after some time, appium(-p 4725) goes douwn</p>
  
  <pre><code>&lt;--- Last few GCs ---&gt;
  
  2558249 ms: Mark-sweep 1371.3 (1434.9) -&gt; 1371.3 (1434.9) MB, 1745.2 / 0.0 ms [
  allocation failure] [GC in old space requested].
  2559995 ms: Mark-sweep 1371.3 (1434.9) -&gt; 1372.8 (1408.9) MB, 1745.4 / 0.0 ms [
  last resort gc].
  2561685 ms: Mark-sweep 1372.8 (1408.9) -&gt; 1374.8 (1408.9) MB, 1689.8 / 0.0 ms [
  last resort gc].
  
  &lt;--- JS stacktrace ---&gt;
  
  ==== JS stack trace =========================================
  
  Security context: 000002B7252CFB61 
  1: onread [net.js:530] [pc=000001837B14847C] (this=000000AC5570A169 &lt;a Pipe
  with map 0000008EE91F9D21&gt;,nread=410,buffer=00000073E9AE60B9 &lt;an Uint8Array with
  map 0000008EE91F8671&gt;)
  2: arguments adaptor frame: 3-&gt;2
  
  ==== Details ================================================
  
  [net.js:530] [pc=000001837B14847C] (this=000000AC5570A169 &lt;a Pipe wi
  th map 0000008EE91F9D21&gt;,nread...
  
  FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memo
  ry
  </code></pre>