[erlang-questions] ei_connect fails sometimes with EIO

Wei Cao cyg.cao@REDACTED
Tue Nov 29 10:20:26 CET 2011

I had similar problems before, when I read user information inside mnesia
times to times from a proxy written in C. Each time, I acquire a connection
via ei_connect()
and close it after user info is read.

After tracing, I found the reason to my problem, erl_connect use select()
when fd is larger than 1024, the fd_set structure on stack gets corrupted,
and the process
behavior becomes undetermined.

I post the patch here:

Hope it solves your problem too.

2011/11/26 Andre Nathan <andre@REDACTED>

> Hello
> I have a C node doing RPC on my Erlang cluster. From time to time I get
> Input/Output errors from ei_connect.
> I've found this thread which reports something similar, but apparently
> no solution was found:
>  http://erlang.org/pipermail/erlang-questions/2007-July/027711.html
> Since EIO is a kind of "generic error" in erl_interface, I was wondering
> if there is anything else I can do to try to find what's happening.
> One thing that I thought could be the cause of the problem is that I'm
> running the Erlang cluster with inet_dist_listen_min =
> inet_dist_listen_max = 9100; while I've had no problems with the Erlang
> cluster itself, I figured that maybe I was limiting its ability to
> handle concurrent connections by using a single port. However, changing
> inet_dist_listen_max to 9110 didn't solve the problem, so I guess it's
> something else.
> Does anyone have any idea about this?
> Thanks,
> Andre
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions



Wei Cao
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20111129/5e4f2827/attachment.htm>

More information about the erlang-questions mailing list