-
Re: Crash due to low free RAM available while uploading file
Claude31 Jun 27, 2019 12:38 AM (in response to talbigvu)You cannot control the ram available, but you may have information about it.
https://stackoverflow.com/questions/5012886/determining-the-available-amount-of-ram-on-an-ios-device
In such a case, I would:
- determine how much rAM you need
- test for RAM before downloading
- if less than needed, alert user that due to its low RAM, app may fail.
- if he/she takes the risk, he/she is informed.
- Or he/she can free some space.
-
Re: Crash due to low free RAM available while uploading file
talbigvu Jun 27, 2019 11:14 AM (in response to Claude31)I found out that its not the user's device issue but the s3 upload that consumes very large amount of memory,
But thanks for your reply!
-
-
Re: Crash due to low free RAM available while uploading file
eskimo Jun 27, 2019 1:30 AM (in response to talbigvu)In most cases free RAM is a meaningless concept. I had a post about this on the old DevForums, but that’s no longer available, so I created a new and improved version that you can find here. Please read it through to learn why you should ignore this particular statistic.
You wrote:
In our app, we use AWS s3 services to upload videos.
and:
I used Instruments to check it and I saw that it does consume more resources … however, there is not much I can do about it, because that's what the upload requires.
In general, uploading a video shouldn’t consume significant amounts of memory. Videos are sufficiently large that you should always upload them from a file, and such uploads have a constant, relatively low, memory usage (data is streamed from the file to the network, and thus you just need a few buffers).
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardwarelet myEmail = "eskimo" + "1" + "@apple.com"
-
Re: Crash due to low free RAM available while uploading file
talbigvu Jun 27, 2019 11:26 AM (in response to eskimo)Thanks alot,
If anyone is interested or finding it helpful,
I found out that its not the user's device issue but the s3 upload that consumes very large amount of memory (I used instruments to check what happens when Im trying to upload much bigger files than I tried before and saw that the usage of memory is much bigger than I thought).
After some more research I found that the way that aws is uploading the files, when using multipart upload is to cut the files to smaller chunks and upload them.
The operation of cutting the file to small chunks consume very much memory and thats what caused the crashes.
Waiting for aws reply.
-