----- Original Message ----- From: "Junix Gaspar" <[EMAIL PROTECTED]> To: "fooler" <[EMAIL PROTECTED]> Cc: "The Main Philippine Linux Users' Group (PLUG) Discussion List" <[email protected]>; <[EMAIL PROTECTED]> Sent: Tuesday, June 07, 2005 6:27 PM Subject: Re: [plug] Insufficient TCP Sockets... in Lotus Notes
>> i never touch lotus in linux but the problem is that your lotus server is >> already maxing out the limits of your system's filedescriptors :-> >> >> @notes soft nofile 65535 >> @notes hard nofile 65535 >> >> fooler. > >I found this docu regarding the manipulation of the >/etc/sysconfig/sysctl (at least that where it is in SUSE 9.0 ES) for >Oracle 9i to function flawlessly becasue some kernel parameters are >set too conservatively in some Linux Distro (lost the link sorry) > >kernel.shmmax = 536870912 >kernel.shmmni = 4096 >kernel.shmall = 2097152 >kernel.sem = 250 32000 100 128 >fs.file-max = 65536 >net.ipv4.ip_local_port_range = 1024 65000 > >Although this setting is for Oracle 9i in Linux (and since its also is >a big programs (like Lotus Domino[5000+]users) that needs all of the >box resources) , the Q is, do I have to set this up sysctl or >/etc/security/limits.conf would be enough? sysctl is a system wide configuration with lots of options to tune with while limits.conf is for per user or per group with a limited options for tuning... so it really depends on what you are trying to achieve... > >This is the output of 'ulimit -a' > >core file size (blocks, -c) 0 >data seg size (kbytes, -d) unlimited >file size (blocks, -f) unlimited >max locked memory (kbytes, -l) unlimited >max memory size (kbytes, -m) unlimited >open files (-n) 59900 >pipe size (512 bytes, -p) 8 >stack size (kbytes, -s) unlimited >cpu time (seconds, -t) unlimited >max user processes (-u) 20400 >virtual memory (kbytes, -v) unlimited > >where openfiles and max user processes are the only one limited. >By the way, thanks for the advice fooler, although I don't think its >sane to put 65535 hehehe ok here is what really happens... in order to create a tcp socket... it called socket(2) and connect(2) system calls to the kernel... the following reasons that i know of as i extracted the return error codes of those two system calls which lead to insufficient tcp sockets are the followings: 1) connect(2) error EAGAIN refer to this site for suse's man page: http://www.freebsd.org/cgi/man.cgi?query=connect&sektion=2&apropos=0&manpath=SuSE+Linux%2fi386+8.2 2) socket(2) error ENFILE 3) socket(2) error EMFILE 4) socket(2) error ENOBUFS or ENOMEM refer to this site for suse's man page: http://www.freebsd.org/cgi/man.cgi?query=socket&sektion=2&apropos=0&manpath=SuSE+Linux%2fi386+8.2 error number 1 refers you are running out or no more free local ports assign to source tcp port number... in order to increase this.. you have to modify net.ipv4.ip_local_port_range in sysctl (you cant find this in limits.conf) or directly to /proc path or kernel's .h files and recompile the kernel... local port range are from 1024 to 65535... if you see it consumes very fast the local port range due to a very busy server and saw lots of TIME_WAIT state thru netstat -an.... then you have to hack the kernel's tcp stack module and decrease the Maximum Segment Lifetime (MSL) of a TCP... this kind of a technique is applicable to a *very* busy server like proxy for example so that it will release the tcp connnection immediately after closing it so that there will be another available local ports to it... errors number 2 to 4 refer to you either runing out of filedescriptors or running out of memory... the former can be adjusted thru sysctl or directly to /proc path or kernel's .h files and recompile the kernel.. while the latter you either increase the swap file or add another physical memory... you can set your filedescriptors or maximum open files as high as you want (65535 as what i set to my previous example) but still you are bound to the availability of your memory... fooler. _________________________________________________ Philippine Linux Users' Group (PLUG) Mailing List [email protected] (#PLUG @ irc.free.net.ph) Read the Guidelines: http://linux.org.ph/lists Searchable Archives: http://archives.free.net.ph

