On Mon, 17 Jan 2000, Gerald Richter wrote:
> Look at proxy_http.c line 263 (Apache 1.3.9):
>
> if (setsockopt(sock, SOL_SOCKET, SO_RCVBUF,
> (const char *) &conf->recv_buffer_size, sizeof(int))
>
> I am not an expert in socket programming, but the setsockopt man page on my
> Linux says: "The system places an absolut limit on these values", but
> doesn't says where this limit will be?
For 2.2 kernels the max limit is in /proc/sys/net/core/rmem_max and the
default value is in /proc/sys/net/core/rmem_default. It's good to note the
following comment from the kernel source:
"Don't error on this BSD doesn't and if you think about it this is right.
Otherwise apps have to play 'guess the biggest size' games. RCVBUF/SNDBUF
are treated in BSD as hints."
So, if you want to increase RCVBUF size above 65535, the default max
value, you have to raise first the absolut limit in
/proc/sys/net/core/rmem_max, otherwise you might be thinking that by
calling setsockopt you increased it to say 1 MB, but in fact the RCVBUF
size is still 65535.
HTH,
Radu Greab