<div dir="ltr">Hello,<div><br></div><div>I believe that that limitation is determined by this piece of code: <a href="https://github.com/erlang/otp/blob/maint/erts/emulator/sys/common/erl_poll.c#L2308-L2320">https://github.com/erlang/otp/blob/maint/erts/emulator/sys/common/erl_poll.c#L2308-L2320</a></div><div><br></div><div>So you have to figure what is defined on Android and check that. Basho has a guide which tells you some of the more common places to look for what could be causing this limit: <a href="http://docs.basho.com/riak/latest/ops/tuning/open-files-limit/">http://docs.basho.com/riak/latest/ops/tuning/open-files-limit/</a>.</div><div><br></div><div>I would first check sysconf and make sure that you are allowed to open as many fd's as you want.</div><div><br></div><div>Lukas</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 17, 2015 at 8:42 PM, Manju Hanasi <span dir="ltr"><<a href="mailto:hanasim@gmail.com" target="_blank">hanasim@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi,<br><br>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.<br><br>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.<br><br>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').<br><br>Looks like Erlang VM is not allowing file descriptors more than 255.<br><br>It would be great if we could set some environment variable or pass a parameter that can increase this limit (e.g. <a href="https://github.com/couchbase/Android-Couchbase/blob/master/src/com/couchbase/android/CouchbaseService.java#L203" rel="nofollow" target="_blank">https://github.com/couchbase/Android-Couchbase/blob/master/src/com/couchbase/android/CouchbaseService.java#L203</a>).<br><br>We tried setting "ERL_MAX_PORTS" environment variable to 1024, but we still get the error at 255.<br><br></div>Unfortunately, our version doesn't support +Q parameter for increasing the number of ports.<br><div><br>Is there any quick and/or hacky way to increase the fd limit beyond 255; for example increase it to 512 or 1024?<br><br>I greatly appreciate any help in resolving this issue.<br><br>Thanks<span class="HOEnZb"><font color="#888888"><br>Manju</font></span></div></div>
<br>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div><br></div></div>