when you use BULK COLLECT you should limit your arraysize, i.e instead of collecting 1.5 million rows and process it you should do array fetch of 100

something like

FETCH ... BULK COLLECT INTO ... [LIMIT rows];

if you try to store 1.5 million rows in an array you probably get worse performance and too large PGA or the problem you are having, out of memory