title: When using logstash to index data from MySQL to ElasticSearch,it shows Java heapspace error
body: <p>MySQL table has 191000 rows. When I try the below it runs for a while and shows this error:</p>
  
  <pre><code>logstash/bin/logstash -f /home/vatsa/logs/conts-out.conf  
  </code></pre>
  
  <blockquote>
    <p>java.lang.OutOfMemoryError: Java heap space
    Dumping heap to /home/vatsa/logstash/heapdump.hprof
    Exception flushing buffer at interval! {:error=>"Java heap space", :class=>"Java::JavaLang::OutOfMemoryError", :level=>:warn}
    Error: Your application used more memory than the safety cap of 1G.
    Specify -J-Xmx####m to increase it (#### = cap size in MB).
    Specify -w for full OutOfMemoryError stack trace</p>
  </blockquote>
  
  <p>I dont understand the error. How to fix this.
  Thanks in advance.</p>