title: What might cause a memory error in haystack search when tried in python flask application?
body: <p>I have indexed around 1000 document in elastic search. When I try to query with haystack search it returns files as output but after continuously using for 5 times memory error occurs. and the execution of program stops. I have attached the code that have used here.</p>
  <pre class="lang-py prettyprint-override"><code>document_store = ElasticsearchDocumentStore(host=&quot;localhost&quot;, username=&quot;&quot;, password=&quot;&quot;, index=&quot;document&quot;)
  
  json_object = open(&quot;doc_json_file.json&quot;)
  data_json = json.load(json_object)
  json_object.close()
  document_store.write_documents(data_json)
  
  retriever = TfidfRetriever(document_store=document_store)
  
  reader = FARMReader(model_name_or_path=&quot;deepset/roberta-base-squad2&quot;, use_gpu=True)
  
  pipe = ExtractiveQAPipeline(reader, retriever)
  
  prediction = pipe.run(query=str(query), params={&quot;Retriever&quot;: {&quot;top_k&quot;: 20}, &quot;Reader&quot;: {&quot;top_k&quot;: 20}})
  
  return prediction
  </code></pre>
  <p>Filename and file content are stored in a json file. Below one is the error log</p>
  <pre><code>OSError: [WinError 1455] The paging file is too small for this operation to complete
  from .netcdf import netcdf_file, netcdf_variable
  File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 983, in _find_and_load
  File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 967, in _find_and_load_unlocked
  File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 677, in _load_unlocked
  File &quot;&lt;frozen importlib._bootstrap_external&gt;&quot;, line 724, in exec_module
  File &quot;&lt;frozen importlib._bootstrap_external&gt;&quot;, line 818, in get_code
  File &quot;&lt;frozen importlib._bootstrap_external&gt;&quot;, line 917, in get_data
  MemoryError
  from pandas._libs.interval import Interval
  ImportError: DLL load failed: The paging file is too small for this operation to complete.
  </code></pre>