[erlang-questions] ei_connect fails sometimes with EIO
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
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 <>
> 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:
> 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?
> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions