Hi folks,
I have a large process that does the following:
- Get data in CSV format from tree external systems
- Select relevant data and ave the data as XL
- Compare the different XLs and create a difference report
The first step picks up rather large (70k - 150k rows) and emails them to the process.
Step two opens the CSVs with OLEDB, splits the data and saves it as XL in different files
The last step opens whatever XLs have to be compared and does a lot of filtering and comparing collections
Note that I did run the process on a clean and freshly rebooted VDI, running nothing else than required by the process (a mainframe terminal and outlook). Checking the memory in TaskManager revealed BP being the memory pirate peaking at 940Mb just prior to the process became the proverbial dead parrot. The Mainframe terminal traditionally uses almost no memory, and outlook remained idling most of the time.
Having had problems with this process for a longer time, we've managed to move all data selection possible to the mainframe server. So the data being emailed into step two is at a minimum today. But it still can be 70k - 150k rows.
Step one runs fine, as does (most of the time) step three. Step two usually ends in an OutOfMemory error. To tackle this, I did the following:
- Use OLEDB wherever possible
- Split filtering collection data in chunks of max 15k rows
- Close (kill) XL after each use
- Empty collections after each use
With the problem in step two still present I assume the next thing to be tackled would be to release memory occupied by the large collections. I do already clear all data in these collections, but assume this does not free up memory.
Now to my questions:
How do I cleanup memory being used in:
- No longer needed collections?
- CSV files previously read in process?
- XL files previously read in process?
- Is there a limit (eg. 1Gb) on BP and its processes?
Happy coding!
---------------
Paul
Sweden
Happy coding!
Paul, Sweden
(By all means, do not mark this as the best answer!)