title: How to rebuild an elasticsearch index for lots of data without it getting "Killed" after 15 hours or so
body: <p>I have about 130 million articles in my Postgres database on AWS. I am trying to index them with elasticsearch. In a screen, I entered:</p>
  
  <pre><code>python manage.py search_index --rebuild -f --parallel --model [APP NAME].[MODEL NAME]
  </code></pre>
  
  <p>Everything began correctly. The output was</p>
  
  <pre><code>Deleting index '[MODEL NAME]'
  Creating index '[MODEL NAME]'
  Indexing 129413202 'MODEL NAME' objects (parallel)
  </code></pre>
  
  <p>But after about 15 hours, the output was "Killed". I was running this on a t2.xlarge EC2 instance, which has 16 GBs of memory. Interestingly, the "Killed" message happened after I saw that the connection to the AWS server was broken, but that shouldn't matter if the process was run in a screen. Any idea what the issue is? Do I just need to get an even larger EC2 instance?</p>