makeWebRequest suddenly returns -403

I am working on a new feature that uses 2 web requests. I am testing it for about a week both on a real fr965 and in the simulator. It worked pretty well until yesterday, when in one of the web requests I started to get -403. The response is relatively big (content-length: 5015) but it wasn't a problem until yesterday on the fr965 (It was on some older devices in the simulator). What could have changed?

  • Wow, surprize!
    before web request: memory: free:218920, used:39584, total:258504
    in the beginning of the callback; memory: free:196048, used:62456, total:258504

    So from this I'd guess that the amount of memory used is around 13kB, but according to the memory viewer:

    current use: 38.1kB, peek use: 79.1kB, so here it suggests that 41kB more is used at the peak than after all the processing of the response is finished. All this is to parse a 5kB json that comes from a public api, so I can't reformat / optimize it. But I'll look into it further, because it still doesn't explain why it works at the beginning and then stops working after a few hours.

    And another surprize: back to making the web request in the background app, just ran the app now in a simulator window that was opened not long ago for the purpose of trying the above in the foreground app and it reproduced the problem just now, while the memory usage in the background app is:

    before web request: memory: free:41168, used:20088, total:61256
    in the callback: free:31640, used:29616, total:61256
    and because the problem happens, the responseCode is -403 and the data that is being sent to the callback is null