<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I see that there are a different thread where Jesper answered as well. Sorry I missed that one.<div><div>And there you mention that you are using Ubuntu, then you can check using netstat if you have any un-acked data (Send-Q)? </div><div>Unless you have done that already.</div><div><br></div><div>Or if you analyze the connection on both sides using wireshark or such tool, as Jesper mentioned, to see if there are any missing packets / acks or other things happening.</div><div><br></div><div>Do you have some sort of NAT or state full firewall between the hosts?</div><div>Do you enable keepalive on the TCP connection?</div><div><br></div><div>Jonas</div><div><br></div><div><br><div><div><div><div>On Sep 24, 2013, at 6:43 , <a href="mailto:hellkvist@gmail.com">hellkvist@gmail.com</a> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="content-type" content="text/html; charset=utf-8"><div dir="auto"><div>Yes, data was sent (and also received at the other end) some time before. Then the connection just idled for quite some time (hours) and then this happened.</div><div><br></div><div>Stefan<br><br>___<div><pre style="word-wrap: break-word; "><font face=".Helvetica NeueUI"><span style="white-space: normal; background-color: rgba(255, 255, 255, 0);">main(i){putchar((1312900435>>((i-1)/2|i>5)*8)+!(1&i|i>4))^78&&main(++i);}</span></font><span style="white-space: pre-wrap; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); -webkit-text-size-adjust: auto; ">
</span></pre></div><div><br></div></div><div><br>24 sep 2013 kl. 00:33 skrev Jonas Falkevik <<a href="mailto:jonas.falkevik@mobilearts.com">jonas.falkevik@mobilearts.com</a>>:<br><br></div><blockquote type="cite"><div><span>Hi,</span><br><span>it looks like your OS is returning the posix's error code etimedout. Mening that the TCP connection timed out.</span><br><span>Most probably because you sent some data that could not be delivered within the your OS specified TCP retransmit / timer settings.</span><br><span></span><br><span>Did you send some data over the TCP connection at any time?</span><br><span></span><br><span>Jonas</span><br><span></span><br><span>On Sep 23, 2013, at 8:01 , Stefan Hellkvist wrote:</span><br><span></span><br><blockquote type="cite"><span>Hi, </span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>Here is a question about why I sometimes get an etimedout error from gen_tcp:recv.</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>I open a tcp socket on the server side using lines like:</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>{ok, LSock} = gen_tcp:listen(Port, [binary, {packet, line}, {active, false}]),</span><br></blockquote><blockquote type="cite"><span>{ok, Sock} = gen_tcp:accept(LSock),</span><br></blockquote><blockquote type="cite"><span>do_recv(Sock).</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>where do_recv is something like this:</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>do_recv(Sock) -></span><br></blockquote><blockquote type="cite"><span> case gen_tcp:recv(Sock, 0) of</span><br></blockquote><blockquote type="cite"><span> {ok, Data} -></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span> do_recv(Sock); </span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span> {error, Reason} -></span><br></blockquote><blockquote type="cite"><span> ?DAWN_EVENT("tcp_bus got error and shut down: ~p", [Reason]),</span><br></blockquote><blockquote type="cite"><span> telnet_subscriber:unsubscribe({Sock, self()})</span><br></blockquote><blockquote type="cite"><span> end.</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>_______________________________________________</span><br></blockquote><blockquote type="cite"><span>erlang-questions mailing list</span><br></blockquote><blockquote type="cite"><span><a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a></span><br></blockquote><blockquote type="cite"><span><a href="http://erlang.org/mailman/listinfo/erlang-questions">http://erlang.org/mailman/listinfo/erlang-questions</a></span><br></blockquote><span></span><br></div></blockquote></div></blockquote></div><br></div></div></div></div></body></html>