Want to rise value of kern.ipc.somaxconn

With sysctl works ok

$ sudo sysctl kern.ipc.somaxconn=2048
$ kern.ipc.somaxconn: 128 -> 2048

check it:

$ sysctl -a|grep somaxconn
kern.ipc.somaxconn: 2048

But if I set this value in /boot/loader.conf or /etc/sysctl.conf:

$ cat /etc/sysctl.conf 
# $FreeBSD: src/etc/sysctl.conf,v 1.8 2003/03/13 18:43:50 mux Exp $
#
#  This file is read when going to multi-user and its contents piped thru
#  ``sysctl'' to adjust kernel values.  ``man 5 sysctl.conf'' for details.
#
kern.ipc.somaxconn="2048"

after reboot value of kern.ipc.somaxconn remains = 128

$ sysctl -a|grep somaxconn
kern.ipc.somaxconn: 128

How to make it persistent between reboots?

link|improve this question
feedback

2 Answers

up vote 0 down vote accepted

Remove quotes "

kern.ipc.somaxconn=2048

Test with /etc/rc.d/sysctl start

link|improve this answer
thanks, it works – oraz Aug 18 '10 at 13:43
feedback

If you've written the value into /etc/sysctl.conf it should be persistent between reboots - the file is read from on reboot, not written to.

You can try sysctl -w kern.ipc.somaxconn=2048 instead. Also, how are you testing the change? Check:
cat /proc/sys/net/core/somaxconn

link|improve this answer
it should be persistent, but it's not with somaxconn, with other kernel values tunning all is ok – oraz Aug 18 '10 at 12:34
man sysctl The -w option has been deprecated and is silently ignored. Also its FreeBSD not Linux - forget about /proc/sys – SaveTheRbtz Aug 18 '10 at 13:24
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.