[erlang-questions] fd=NN is larger than the largest allowed fd=255

Manju Hanasi <>
Tue Mar 17 20:42:12 CET 2015


Hi,

We are using an older version of Couchbase Mobile on Android and this one
is erlang based. We use OTP version R14B03. I know it's pretty old and it's
time to upgrade, so bare with me.

Recently we have started getting errors like "fd=NN is larger than the
largest allowed fd=255" where NN is any value greater than 255.

This is not really an OS limitation as the 'ulimit -a' on Android shows
1024 for open file descriptors (as found out by 'adb shell').

Looks like Erlang VM is not allowing file descriptors more than 255.

It would be great if we could set some environment variable or pass a
parameter that can increase this limit (e.g.
https://github.com/couchbase/Android-Couchbase/blob/master/src/com/couchbase/android/CouchbaseService.java#L203
).

We tried setting "ERL_MAX_PORTS" environment variable to 1024, but we still
get the error at 255.

Unfortunately, our version doesn't support +Q parameter for increasing the
number of ports.

Is there any quick and/or hacky way to increase the fd limit beyond 255;
for example increase it to 512 or 1024?

I greatly appreciate any help in resolving this issue.

Thanks
Manju
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150318/25fee667/attachment.html>


More information about the erlang-questions mailing list