As suggested on #kernelnewbies (thanks Manfred) I've added a printk to ipv4/tcp.c in the block where "too many of orphaned sockets" is printed. if (sk->state != TCP_CLOSE) I tried to print the data that leads up to the error, this is the printk: printk(KERN_INFO "TCP: dbg sk->wmem_queued %d tcp_orphan_count %d tcp_memory_allocated %d\n", sk->wmem_queued, atomic_read(&tcp_orphan_count), atomic_read(&tcp_memory_allocated)); As I have pointed out in earlier posts, these errors begins when we start to see around 5000 incoming connections. Interesting enough we seem to hit the limit set in the last field of /proc/sys/net/ipv4/tcp_mem. Raising this value seems to slow down the rate of errors a bit but I'm not sure I fully understand the implications of doing so. I have removed most tunings and I also removed support for network packet filtering to firther reduce load, but that did not change a bit. We still do: echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all echo 1 > /proc/sys/net/ipv4/tcp_window_scaling echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts echo 1 > /proc/sys/net/ipv4/tcp_syncookies echo 30 > /proc/sys/net/ipv4/tcp_fin_timeout echo "10000 49152" > /proc/sys/net/ipv4/ip_local_port_range echo 0 > /proc/sys/net/ipv4/tcp_timestamps echo 0 > /proc/sys/net/ipv4/tcp_sack echo "3072 3584 6144" > /proc/sys/net/ipv4/tcp_mem Here goes syslog: Feb 18 15:05:44 mcquack kernel: sending pkt_too_big to self Feb 18 15:24:07 mcquack kernel: TCP: peer xx.xx.xx.xx:1084/7000 shrinks window 2106777705:1072:2106779313. Bad, what else can I say? Feb 18 15:26:19 mcquack kernel: TCP: peer xx.xx.xx.xx:1150/6667 shrinks window 2169434078:1072:2169435205. Bad, what else can I say? Feb 18 15:42:06 mcquack kernel: TCP: dbg sk->wmem_queued 5664 tcp_orphan_count 99 tcp_memory_allocated 6145 Feb 18 15:43:13 mcquack kernel: Out of socket memory Feb 18 15:43:13 mcquack kernel: Out of socket memory Feb 18 15:43:50 mcquack kernel: TCP: too many of orphaned sockets Feb 18 15:43:50 mcquack kernel: TCP: dbg sk->wmem_queued 5364 tcp_orphan_count 124 tcp_memory_allocated 6146 Feb 18 15:44:18 mcquack kernel: TCP: too many of orphaned sockets Feb 18 15:44:18 mcquack kernel: TCP: dbg sk->wmem_queued 2088 tcp_orphan_count 122 tcp_memory_allocated 6145 Feb 18 15:44:33 mcquack kernel: Out of socket memory Feb 18 15:44:59 mcquack kernel: TCP: too many of orphaned sockets Feb 18 15:44:59 mcquack kernel: TCP: dbg sk->wmem_queued 2088 tcp_orphan_count 129 tcp_memory_allocated 6146 Feb 18 15:45:00 mcquack kernel: TCP: too many of orphaned sockets Feb 18 15:45:00 mcquack kernel: TCP: dbg sk->wmem_queued 2088 tcp_orphan_count 123 tcp_memory_allocated 6145 Feb 18 15:45:00 mcquack kernel: TCP: too many of orphaned sockets Feb 18 15:45:00 mcquack kernel: TCP: dbg sk->wmem_queued 5364 tcp_orphan_count 123 tcp_memory_allocated 6162 Feb 18 15:45:20 mcquack kernel: TCP: too many of orphaned sockets Feb 18 15:45:20 mcquack kernel: TCP: dbg sk->wmem_queued 2088 tcp_orphan_count 103 tcp_memory_allocated 6146 Feb 18 15:45:20 mcquack kernel: TCP: too many of orphaned sockets Feb 18 15:45:20 mcquack kernel: TCP: dbg sk->wmem_queued 4300 tcp_orphan_count 110 tcp_memory_allocated 6145 Feb 18 15:50:23 mcquack kernel: TCP: too many of orphaned sockets Feb 18 15:50:23 mcquack kernel: TCP: dbg sk->wmem_queued 2580 tcp_orphan_count 95 tcp_memory_allocated 6148 Feb 18 15:50:23 mcquack kernel: TCP: too many of orphaned sockets Feb 18 15:50:23 mcquack kernel: TCP: dbg sk->wmem_queued 3576 tcp_orphan_count 95 tcp_memory_allocated 6146 Feb 18 15:50:43 mcquack kernel: TCP: too many of orphaned sockets Feb 18 15:50:43 mcquack kernel: TCP: dbg sk->wmem_queued 4300 tcp_orphan_count 84 tcp_memory_allocated 6145 Feb 18 15:52:54 mcquack kernel: Out of socket memory Feb 18 15:57:34 mcquack kernel: TCP: peer xx.xx.xx.xx:1154/6667 shrinks window 4090009096:1072:4090010704. Bad, what else can I say? Please let me know if I can provide more debug info or test something! Regards, Magnus Walldal - : send the line "unsubscribe linux-net" in the body of a message to majordomo@vger.kernel.org