ANNOUNCEMENT: community.oracle.com is currently Read only due to planned upgrade until 28-Sep-2020 9:30 AM Pacific Time. Any changes made during Read only mode will be lost and will need to be re-entered when the application is back read/write.
We are running APEX 4.2.2.00.11 and the apex listener version 18.104.22.1687.04.27 on WebLogic 10.3.2.
Does the apex listener buffer file downloads from RESTful web services in memory before sending them t o tge browser? I suspect it does, which is in my opinion, a bug because it will not scale for large f iles. Using the "wpg_docload.download_file" PL/SQL call directly in APEX will stream the file directly to the browser with no buffering. That same procedure called from a RESTful web service apears to buffer the file in the memory of the APEX listener before streaming it to the browser.
Is this true, and if so is there a way around it?
The basic PL/SQL code for doing a file download, when called from an APEX application process works great for any file size:
But this same code in a RESTful web service is much slower for large files, and overflows the memory of the APEX listener JVM for really large files. Doing a simple "Media Resource" download from a RWS has the same behavior for extremely large BLOBs too, so I doubt the PL/SQL is at fault.