Re: Out of socket memory [message #14999 is a reply to message #14956] |
Mon, 16 July 2007 11:08 ![Go to previous message Go to previous message](/theme/ovz3/images/up.png) ![Go to next message Go to previous message](/theme/ovz3/images/down.png) |
vaverin
Messages: 708 Registered: September 2005
|
Senior Member |
|
|
I would like to clearify the situation about "TCP: too many of orphaned sockets" messages.
Orphaned socket is something like "ghost session". It is incorrectly closed socket that however can contain data or due some another reasons cannot be freed immediately and should live some time after closing. Usually these sockets appears because the client has crashed.
As you know, our kernel limits the number of tcp sockets accessible for VE, and if all VE sockets will be orphaned, nobody can connect to this VE. That's why our kernel limits the maximal number of orphaned sockets by 1/4 of numtcpsock assigned for VE.
When inside some of VE number of orphaned sockets reach this limit -- kernel outputs the message "TCP: too many of orphaned sockets" and frees this socket. It is correct behavior, and usual linux kernels do the same in some rare cases.
Therefore it is not a trouble, just kernel informed you that some of your VE produced too many incorrectly closed sockets.
To prevent these messages you can try to increase numtcpsock parameters for your VE's, but IMHO it's useless: if some of application inside VE can produce 10 orphaned sockets -- it will be able to produce 100 and 1000 socketes some time later. IMHO It's better to limits these resources and use it for the common good.
Update: Btw. I've checked "Out of socket memory" message -- it's triggered by the same condition, but in another function.
Thank you,
Vasily Averin
[Updated on: Mon, 16 July 2007 11:19] Report message to a moderator
|
|
|