<div dir="ltr">I increased tcp_rd_buf_size, but it did not help.<div>I don't think this is the problem.</div><div><br></div><div>In tcp_read.c:</div><div><div>int tcp_read(struct tcp_connection *c, int* flags)</div><div>
{</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>int bytes_free, bytes_read;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>struct tcp_req *r;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>int fd;</div>
<div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>r=&c->req;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>fd=c->fd;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>bytes_free=r->b_size- (int)(r->pos - r->buf);</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>if (unlikely(bytes_free==0)){</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>LOG(L_ERR, "ERROR: tcp_read: buffer overrun, dropping\n");</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>r->error=TCP_REQ_OVERRUN;</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>return -1;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>}</div>
</div><div><br></div><div>how to i increase r->b_size ?</div><div><br></div><div>Thanks for you help, Amit.</div><div><div><br><div class="gmail_quote">On Wed, Jan 2, 2013 at 6:51 PM, Klaus Darilion <span dir="ltr"><<a href="mailto:klaus.mailinglists@pernau.at" target="_blank">klaus.mailinglists@pernau.at</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<div>Hi!<br>
<br>
-b is the receive buffer of the socket in the OS (for UDP
tweaking, I do not know if this is relevant for TCP), so not
related to this problem as this problem happens inside Kamailio.<br>
<br>
Actually 15K is rather small, really strange that you get errors.
So, I did some tests:<br>
<br>
1. tcp_rd_buf_size must be increased. The documentation is bad as
it meantions "TCP datagram" but actually means the maximum size of
SIP (or HTTP) message that can be received.<br>
<br>
2. tcp_rd_buf_size is internally limited to 16MBytes. If you need
more, you have to change the code in:<br>
tcp_options.c: { "rd_buf_size", CFG_VAR_INT | CFG_ATOMIC,
512, 16777216, 0, 0,<br>
<br>
3. If you use real large message you may need to increase the
private memory, and if you forward it with tm module, also the
shared memory.<br>
<br>
regards<br>
Klaus<br>
<br>
<br>
Am 02.01.2013 13:59, schrieb Amit Elbaz:<br>
</div><div><div class="h5">
<blockquote type="cite">
<div dir="ltr">
<div>this still does not solve the problem.</div>
<div>I've also tried running Kamailio with <b>-b 32768</b>
option.</div>
<div><br>
</div>
<div>here are the logs:</div>
<div><br>
</div>
<div>Jan 2 14:54:24 debdev kamailio<a href="tel:%5B2580" value="+9722580" target="_blank">[2580</a>]: ERROR: <core>
[tcp_read.c:344]: ERROR: tcp_read: buffer overrun, dropping</div>
<div>Jan 2 14:54:24 debdev kamailio<a href="tel:%5B2580" value="+9722580" target="_blank">[2580</a>]: ERROR: <core>
[tcp_read.c:1127]: ERROR: tcp_read_req: error reading</div>
<div><br>
</div>
<div>Thanks for your help.</div>
<br>
<div class="gmail_quote">On Wed, Jan 2, <a href="tel:2013" value="+9722013" target="_blank">2013</a> at 1:17 PM, Andrew
Pogrebennyk <span dir="ltr"><<a href="mailto:apogrebennyk@sipwise.com" target="_blank">apogrebennyk@sipwise.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
you may try changing the tcp_rd_buf_size and
tcp_conn_wq_max:<br>
<a href="http://www.kamailio.org/wiki/cookbooks/3.3.x/core#tcp_conn_wq_max" target="_blank">http://www.kamailio.org/wiki/cookbooks/3.3.x/core#tcp_conn_wq_max</a><br>
<br>
And since this in development mailing list I'd like to point
at what<br>
seem an iaccuracy in documentation: several options refer to
the core<br>
parameter called tcp_write_buf, which isn't described in the
cookbook:<br>
<br>
tcp_conn_wq_max<br>
Maximum bytes queued for write allowed per connection.
Attempting to<br>
queue more bytes would result in an error and in the
connection being<br>
closed (too slow). If *tcp_write_buf* is not enabled, it has
no effect.<br>
<br>
I hope Daniel or someone who knows reads this..<br>
<br>
BR,<br>
Andrew<br>
<div>
<div><br>
On 01/02/2013 10:38 AM, Amit Elbaz wrote:<br>
> Hi,<br>
><br>
> While sending a big TCP SIP message (15K+), I get
"tcp_read: buffer<br>
> overrun, dropping" message.<br>
> this happens after a few fragments have been sent,
and then i get this<br>
> message and the connection resets.<br>
> is it possible to set the max-buffer size through
configuration? if so,<br>
> where?<br>
><br>
> Thanks, Amit.<br>
><br>
><br>
</div>
</div>
> _______________________________________________<br>
> sr-dev mailing list<br>
> <a href="mailto:sr-dev@lists.sip-router.org" target="_blank">sr-dev@lists.sip-router.org</a><br>
> <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a><br>
><br>
<br>
<br>
_______________________________________________<br>
sr-dev mailing list<br>
<a href="mailto:sr-dev@lists.sip-router.org" target="_blank">sr-dev@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a><br>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
sr-dev mailing list
<a href="mailto:sr-dev@lists.sip-router.org" target="_blank">sr-dev@lists.sip-router.org</a>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a>
</pre>
</blockquote>
<br>
</div></div></div>
</blockquote></div><br></div></div></div>