When performing an AIP ingest on a large batch set of AIPs, each created/restored DSpaceObject is kept in memory. This causes the ingest process to be very memory intensive for large restorations.
The offending class is the AbstractDSpaceIngester, which stores a DSpaceObject for every object that it successfully restores/replaces/ingests:
Past versions of DSpace also had this problem...for example in DSpace 4.x:
Since DSpaceObjects can be large, the more successfully ingested content the more memory will be necessary to complete the ingestion.
PR coming shortly to fix this issue and instead just store the successfully ingested object's identifier (i.e. Handle), rather than the entire object.