Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Real device app crash on uploading files due to memory leaks #746

Open
GaraGentor opened this issue Sep 5, 2019 · 4 comments
Open

Real device app crash on uploading files due to memory leaks #746

GaraGentor opened this issue Sep 5, 2019 · 4 comments

Comments

@GaraGentor
Copy link

Whats my Problem:
The app crash while uploading serval files with some mbs. The total size of all files is 2,8gb. The app crashes due to a memory issue. Tested on a real iPad with 2 gb of memory. The files are pdfs.

What I have tested:
1.
I tried to upload file after file and the memory of the device stacked after each file, the size of the file itself. So it crashed on the 30 file because my iPad hadn't that much memory space left.

Image of the simulator memory stack
https://ibb.co/4gjM3Jq

I also tried to upload all Files at once. The App crashed instantly because the memory of my device was instant full.

Image of the simulator memory stack
https://ibb.co/wCPV0mL

I also tried to reinitialize RNFS and nullified the existing one. But the memory does not shrink to its original size. In that case my app always will crash after doing some uploads.

Enviroment:
react: 16.6.3
react-native: 0.57.8
react-native-fs: 2.13.3

@sarevok89
Copy link

I'm currently struggling with the same issue. Using the RNFS.read() method in a loop doesn't release the memory for some reason. There's a linear growth in memory usage with each read/uploaded file chunk.

@mayander30
Copy link

any solution ?

@H4mxa
Copy link

H4mxa commented Oct 2, 2023

@sarevok89 @mayander30, Have you found a solution?

@mayander30
Copy link

No, I am doing the uploads for large files with Webview..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants