How to change Android max file open limit per user/process

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to change Android max file open limit per user/process

Din Assegaf
I try to do stop; and start; again android but stuck at too many open files error,


X00TD:/# cat /proc/self/limits                                      
Limit                     Soft Limit           Hard Limit           Units     
Max processes             10077                10077                processes 
Max open files            1024                 4096                 files     


1|X00TD:/# ulimit -a
...
-n: nofiles(descriptors)  1024

I want to try to modify android kernel config/settings, source code too if possible, but this config is not exist : 

X00TD:/ # ls /system/etc/security/limits.conf                        
ls: /system/etc/security/limits.conf: No such file or directory

1|X00TD:/ # ls /etc/security/limits.conf                             
ls: /etc/security/limits.conf: No such file or directory

how to change the limit 1024 of that ?

--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/android-platform/1ae2cd1f-77ab-478f-a1bf-c4a4652838d8n%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: How to change Android max file open limit per user/process

Rafał Kanus
Hi,

You could try to use init.rc  setrlimit  command
https://android.googlesource.com/platform/system/core/+/master/init/README.md

Maybe there are parameters which will allow to change that limit.
I was able to modify NICE parameter to run my process as realtime

Example:
"[Set Resource Limit]" # set RLIMIT_NICE to allow priorities from 19 to -20 
 setrlimit 13 40 40  




wtorek, 23 lutego 2021 o 01:03:39 UTC+1 [hidden email] napisał(a):
I try to do stop; and start; again android but stuck at too many open files error,


X00TD:/# cat /proc/self/limits                                      
Limit                     Soft Limit           Hard Limit           Units     
Max processes             10077                10077                processes 
Max open files            1024                 4096                 files     


1|X00TD:/# ulimit -a
...
-n: nofiles(descriptors)  1024

I want to try to modify android kernel config/settings, source code too if possible, but this config is not exist : 

X00TD:/ # ls /system/etc/security/limits.conf                        
ls: /system/etc/security/limits.conf: No such file or directory

1|X00TD:/ # ls /etc/security/limits.conf                             
ls: /etc/security/limits.conf: No such file or directory

how to change the limit 1024 of that ?

--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/android-platform/365a3e0e-e8b5-4d8f-81e0-93978e7ab93dn%40googlegroups.com.