OpenVZ Forum


Home » General » Support » *SOLVED* Out of socket memory
*SOLVED* Out of socket memory [message #14955] Sat, 14 July 2007 10:28 Go to next message
whatever is currently offline  whatever
Messages: 142
Registered: September 2006
Senior Member
Our system was running 4gig RAM but we upgraded to 8gig. Before that it was working fine but now it give error Out of socket memory.

The swap is 2gigs.
How can we increase the SWAP as we have added more RAM. We don't want to play with partitions on live box.

Any suggestions.

[Updated on: Fri, 20 July 2007 09:14] by Moderator

Report message to a moderator

Re: Out of socket memory [message #14956 is a reply to message #14955] Sat, 14 July 2007 11:57 Go to previous messageGo to next message
whatever is currently offline  whatever
Messages: 142
Registered: September 2006
Senior Member
Jul 13 17:24:26 localhost kernel: printk: 15 messages suppressed.
Jul 13 17:24:26 localhost kernel: TCP: too many of orphaned sockets
Jul 13 17:24:44 localhost kernel: Out of socket memory
Jul 13 17:24:52 localhost kernel: TCP: too many of orphaned sockets
Jul 13 17:24:52 localhost last message repeated 3 times
Jul 13 17:24:58 localhost kernel: printk: 3 messages suppressed.
Jul 13 17:24:58 localhost kernel: TCP: too many of orphaned sockets
Jul 13 17:25:03 localhost kernel: printk: 1 messages suppressed.
Jul 13 17:25:03 localhost kernel: TCP: too many of orphaned sockets
Jul 13 17:25:06 localhost kernel: printk: 8 messages suppressed.
Jul 13 17:25:06 localhost kernel: TCP: too many of orphaned sockets
Jul 13 17:25:11 localhost kernel: printk: 19 messages suppressed.
Jul 13 17:25:11 localhost kernel: TCP: too many of orphaned sockets
Jul 13 17:25:25 localhost kernel: printk: 8 messages suppressed.
Jul 13 17:25:25 localhost kernel: TCP: too many of orphaned sockets
Jul 13 17:25:25 localhost kernel: TCP: too many of orphaned sockets
Jul 13 17:25:26 localhost kernel: printk: 2 messages suppressed.
Jul 13 17:25:26 localhost kernel: TCP: too many of orphaned sockets
Jul 13 17:25:31 localhost kernel: printk: 14 messages suppressed.
Jul 13 17:25:31 localhost kernel: TCP: too many of orphaned sockets
Jul 13 17:25:36 localhost kernel: printk: 14 messages suppressed.
Jul 13 17:25:36 localhost kernel: TCP: too many of orphaned sockets
Jul 13 17:25:42 localhost kernel: printk: 4 messages suppressed.
Jul 13 17:25:42 localhost kernel: Out of socket memory
Jul 13 17:25:45 localhost kernel: printk: 8 messages suppressed.
Jul 13 17:25:45 localhost kernel: TCP: too many of orphaned sockets
Jul 13 17:25:53 localhost kernel: printk: 31 messages suppressed.
Jul 13 17:25:53 localhost kernel: TCP: too many of orphaned sockets
Jul 13 17:26:01 localhost kernel: printk: 1 messages suppressed.
Jul 13 17:26:01 localhost kernel: TCP: too many of orphaned sockets
Jul 13 17:26:01 localhost kernel: TCP: too many of orphaned sockets
Jul 13 17:26:08 localhost kernel: printk: 7 messages suppressed.
Jul 13 17:26:08 localhost kernel: TCP: too many of orphaned sockets
Jul 13 17:26:13 localhost kernel: printk: 10 messages suppressed.
Jul 13 17:26:13 localhost kernel: TCP: too many of orphaned sockets
Jul 13 17:26:16 localhost kernel: printk: 3 messages suppressed.
Jul 13 17:26:16 localhost kernel: TCP: too many of orphaned sockets
Jul 13 17:26:20 localhost kernel: printk: 15 messages suppressed.
Jul 13 17:26:20 localhost kernel: Out of socket memory
Jul 13 17:27:00 localhost kernel: TCP: too many of orphaned sockets
Jul 13 17:27:01 localhost last message repeated 2 times
Re: Out of socket memory [message #14990 is a reply to message #14955] Mon, 16 July 2007 08:59 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Hello, you can try to set sysctl's net.ipv4.tcp_max_orphans variable to a higher value. Also, check /proc/user_beancounters on failcounters.

BTW, what kernel version do you use?

As concerns increasing swap. Actually I think it isn't OpenVZ related question - it is a common problem for Linux Servers. So, probably you can find the answer on other sites/forums in Internet.

HTH,
Vasily.
Re: Out of socket memory [message #14993 is a reply to message #14990] Mon, 16 July 2007 09:17 Go to previous messageGo to next message
whatever is currently offline  whatever
Messages: 142
Registered: September 2006
Senior Member
Kernel : 2.6.9-023stab040.1-enterprise #1 SMP Tue Jan 16 01:09:22 MSK 2007 i686 i686 i386 GNU/Linux

net.ipv4.tcp_max_orphans is not defined in sysctl. What value we should define for net.ipv4.tcp_max_orphans server confi is dual xeon 3ghz/8gig ram

In user_beancounters only 2 vps have failcnt for privvmpages, numproc and numfile.

Thanks
Re: Out of socket memory [message #14999 is a reply to message #14956] Mon, 16 July 2007 11:08 Go to previous message
vaverin is currently offline  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

Previous Topic: *BUG REPORTED* Migration problem with 2.6.18-028stab035
Next Topic: *SOLVED* VPS creation error message.
Goto Forum:
  


Current Time: Fri Apr 19 13:24:27 GMT 2024

Total time taken to generate the page: 0.01835 seconds