Seems I am facing a similar issue of inconsistently running out of memory when using makeWebRequest. Wondering if anyone has found some solution?
In my case, the transmitted data is below 100 Bytes of json in the request and below 100 Bytes of plain text in the response, yet I am inconsistently getting -102 BLE_reqest_too_large, -402 Network_reponse_too_large and -403 Network_response_out_of_memory errors. The data field is huge and uses more than 100K but the background process should be quite small using the (:background) annotation as it only passes data and the preparation of the request and the decoding of the reponse is done in the main process.
Jim - thanks for the advice. One of the difficulties I had was that the error occurred only on actual devices and never in the simulator. Added code to log free memory into the log files ... and for whatever reason now it seems to be working fine with about 1k plain text.
I had a similar problem. When receiving json data, I returned it raw Bg.exit (1219 bytes) - an OUT MEMORY error occurred even in the simulator.
I solved this problem by parsing this data in the "onReceive" method, leaving only the necessary ones. Perhaps in the same method you can save this data using App.Storage.setValue.