Java Out of Memory Issue

In my application, I am trying to upload an excel. It has huge data around 45000. It is taking around 3:30 to 4 hrs. to get uploaded. While uploading, in the microflow, a select query is getting executed on the table having huge data, which in turn is causing Out of memory issue. I have increased the resources changing my plan from Strato to Meso. But the issue is not resolved.  Please help in solving this.
1 answers

Without knowing what you are exactly doing, is it an option to create 2 steps in the process?

First upload the excel data into a table and then process the data to the actual application table that you are now trying to get the data in? This would give you more control over the processing by processing in batches e.g.