# ResetSession does not reduce memory usage for Paraview 5.11 RC1-MPI

**URL:** https://discourse.paraview.org/t/resetsession-does-not-reduce-memory-usage-for-paraview-5-11-rc1-mpi/10571
**Category:** ParaView Support
**Tags:** python
**Created:** [October 21, 2022, 5:07pm UTC](https://discourse.paraview.org/t/resetsession-does-not-reduce-memory-usage-for-paraview-5-11-rc1-mpi/10571 "2022-10-21T17:07:29Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![lucasmyers97](https://discourse.paraview.org/user_avatar/discourse.paraview.org/lucasmyers97/32/9704_2.png) [@lucasmyers97](https://discourse.paraview.org/u/lucasmyers97)
#### Post date: [October 21, 2022, 5:07pm UTC](https://discourse.paraview.org/t/resetsession-does-not-reduce-memory-usage-for-paraview-5-11-rc1-mpi/10571/1 "2022-10-21T17:07:29Z")

</div>

I am trying to query data values at various points in a statically distributed unstructured mesh (pvtu file). I’m doing this by using `mpiexec` to launch `pvbatch`. This is a time series, and if I just read in each of the time steps as different readers using the time step filenames, then `top` shows me that the memory usage increases until the program is killed. To try to fix this problem, I’ve put `ResetSession()` at the end of my loop which does the data processing on each individual pvtu file. Additionally, I am using 5.11 RC1 because in prior versions that command hangs. However, even when I include `ResetSession()` the memory usage still continues to go up. The workaround suggested of using `Disconnect()` and `Reconnect()` also does not work because that just causes the program to hang.

Is there _any_ possible way to keep the script from continuing to store all of the readers in memory?

– Lucas  
[two\_defect\_core\_structure.py](https://discourse.paraview.org/uploads/short-url/jnCHAM4QWXK0TjxJTWxczmPExRX.py) (7.4 KB)  
[paraview.py](https://discourse.paraview.org/uploads/short-url/dMScOhgxMSWLQwwYBTN59dUWjOw.py) (7.7 KB)  
[nematics.py](https://discourse.paraview.org/uploads/short-url/8VvMkwBeXAWYf6f2FRNccMxfXxG.py) (1.3 KB)

---

<div class="post-metadata">

### Author: ![spyridon97](https://discourse.paraview.org/user_avatar/discourse.paraview.org/spyridon97/32/11569_2.png) [@spyridon97](https://discourse.paraview.org/u/spyridon97)
#### Post date: [October 22, 2022, 5:16am UTC](https://discourse.paraview.org/t/resetsession-does-not-reduce-memory-usage-for-paraview-5-11-rc1-mpi/10571/2 "2022-10-22T05:16:09Z")

</div>

There could be a memory leak at the reader. What kind of files are you trying to read ?

---

<div class="post-metadata">

### Author: ![lucasmyers97](https://discourse.paraview.org/user_avatar/discourse.paraview.org/lucasmyers97/32/9704_2.png) [@lucasmyers97](https://discourse.paraview.org/u/lucasmyers97)
#### Post date: [October 24, 2022, 3:14pm UTC](https://discourse.paraview.org/t/resetsession-does-not-reduce-memory-usage-for-paraview-5-11-rc1-mpi/10571/3 "2022-10-24T15:14:23Z")

</div>

@spyridon97 am using an `XMLPartitionedUnstructuredGridReader` to read `.pvtu` files. I searched the particular reader on the issues page and no issues (closed or open) come up.
