Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can anyone confirm this issue (limited number of file descriptors on some Android devices)?

Tags:

android

galaxy

I'm currently working on a cool Android game which was about to be released real soon. Some of our beta testers started complaining that the game crashes with the “too many open files” error message. I've tried simulating this problem on the AVD emulator but couldn't reproduce the error.

Afterwards, I realized that only our Galaxy S3 and Asus Nexus 7 testers were complaining. I found this bug issue on Android's bug tracker and it sounds quite similar to what is happening to me.

This sounds like a serious architecture problem which effects all internal SD card devices. These devices are limited to only 1024 file descriptors! Can anybody confirm this problem?

like image 566
user1804847 Avatar asked Nov 07 '12 02:11

user1804847


People also ask

What is file descriptor in Android?

Instances of the file descriptor class serve as an opaque handle to the underlying machine-specific structure representing an open file, an open socket, or another source or sink of bytes. The main practical use for a file descriptor is to create a FileInputStream or FileOutputStream to contain it.

Where are my media files?

On Android, media files are automatically saved in your WhatsApp/Media/folder.

What are media files on Android?

What Is Media Storage on Android. Media Storage is a system process that is needed when you view, download, play, and stream images, videos, audio files, and other media files.


1 Answers

Actually it is not relevant whether this app is opening a lot of files or not. What's troubling is that the entire device is limited to 1024 open files. Take for instance a Galaxy S3 device running 100 apps each opening 10 files concurrently(properties, databases and the like). This is extremely close to the limit.

If you check the max open files limit (/proc/sys/fs/file-max) on most devices it is well over 50K.

like image 52
alechko Avatar answered Oct 10 '22 21:10

alechko