0

Is there any way to set system wide nofiles(descriptors) limit - like editing /etc/security/limits.conffile in linux?

I have root access to system - so access rights is not problem

Art
  • 903
  • 9
  • 20

1 Answers1

0

I have not found any solution to do this system wide, but found terminal command prlimit ${PID} 7 SOFT HARD where PID is Process ID of your app. SOFT and HARD are soft and hard limits.

But be careful - there are some software in android which will not work if you have too much opened FD. I personnally met such kind of errors (for chromium web view):

Abort message: 'FORTIFY: FD_SET: file descriptor >= FD_SETSIZE'

But decreasing limit works good for me allowing to meet "Too many open files" much quicker =)

Art
  • 903
  • 9
  • 20