?
Solved

pushing squid to the limit

Posted on 2004-09-13
4
Medium Priority
?
2,000 Views
Last Modified: 2013-11-22
I am back again, We are using squid  squid-2.5.STABLE6 on FreeBSD 4.9-RELEASE-p8 , at first we had the following problem the server after few hours hangs up and give this error
2004/08/25 15:42:48| comm_udp_sendto: FD 6, 217.21.5.35, port 53: (55) No buffer  space available
2004/08/25 15:42:48| idnsSendQuery: FD 6: sendto: (55) No buffer space available
2004/08/25 15:42:48| comm_udp_sendto: FD 6, 217.21.5.35, port 53: (55) No buffer space available
2004/08/25 15:42:48| idnsSendQuery: FD 6: sendto: (55) No buffer space available

The machine has 2G Ram and 4*36 SCSI HDDs,
We increased
kern.ipc.nmbclusters=64000
kern.ipc.nmbufs=256000
net.inet.udp.maxdgram=65535
we also used a caching DNS server on loopback interface.

Then we got the following problem
    (49) Can't assign requested addressSquid is unable to create a TCP socket
We increased

kern.maxusers=512
kern.maxfilesperproc: 39491
kern.maxfiles: 42768

after that we had the following problem

2004/09/09 15:33:04| commBind: Cannot bind socket FD 2021 to *:0: (49) Can't assign requested ad
dress
2004/09/09 15:33:04| commBind: Cannot bind socket FD 1797 to *:0: (49) Can't assign requested address

So we increased
net.inet.ip.portrange=49151

After that we had the following error


2004/09/10 15:26:27| comm_open: socket failure: (24) Too many open files
2004/09/10 15:26:27| comm_open: socket failure: (24) Too many open files
2004/09/10 15:26:27| comm_open: socket failure: (24) Too many open files
2004/09/10 15:26:28| comm_accept: FD 26: (53) Software caused connection abort
2004/09/10 15:26:28| httpAccept: FD 26: accept failure: (53) Software caused connection abort
2004/09/10 15:26:32| comm_accept: FD 26: (53) Software caused connection abort
2004/09/10 15:26:32| httpAccept: FD 26: accept failure: (53) Software caused con nection abort

We set
kern.ipc.somaxconn: 16384
 
we found out
su - squid -c ulimit -n was 8192 we recompiled squid and increased to 32768

Everything worked fine for 24 hours, now we are back to the very first problem

system just goes off the network, no ping
idnsSendQuery: FD 6: sendto: (55) No buffer space available
comm_udp_sendto: FD 6, 217.21.5.35, port 53: (55) No buffer space available
it is not only UDP, to bring the machine up again we have to shut down the network and bring up again

Any other suggestions
0
Comment
Question by:ahmedfpis
2 Comments
 

Author Comment

by:ahmedfpis
ID: 12043079
cache1# top
last pid:  2076;  load averages:  1.11,  1.07,  1.02    up 0+23:47:47  16:05:20
28 processes:  2 running, 26 sleeping
CPU states: 30.0% user,  0.0% nice, 62.2% system,  3.3% interrupt,  4.5% idle
Mem: 761M Active, 200M Inact, 349M Wired, 694M Cache, 255M Buf, 3052K Free
Swap: 4096M Total, 14M Used, 4082M Free

  PID USERNAME PRI NICE  SIZE    RES STATE  C   TIME   WCPU    CPU COMMAND
  361 squid     58   0   755M   745M CPU1   1  18.6H 96.68% 96.68% squid
  162 root       2   0  3716K   924K select 1  16:50 21.29% 21.29% snmpd
 2073 root      28   0  1900K   988K CPU0   1   0:01  2.78%  1.86% top
  265 root       2   0 16572K 14288K select 0  11:57  0.59%  0.59% named
  368 squid     -4   0  1904K   576K msgwai 0   3:05  0.00%  0.00% diskd
  365 squid     -4   0  1904K   572K msgwai 1   3:00  0.00%  0.00% diskd
  366 squid     -4   0  1904K   576K msgwai 1   2:58  0.00%  0.00% diskd
  367 squid     -4   0  1904K   560K msgwai 1   2:57  0.00%  0.00% diskd
  363 squid     -4   0  1904K   576K msgwai 0   2:48  0.00%  0.00% diskd
  364 squid     -4   0  1904K   548K msgwai 1   2:47  0.00%  0.00% diskd
  156 root       2   0  4072K   624K select 1   0:05  0.00%  0.00% httpd
  119 root       2   0   984K   284K select 0   0:00  0.00%  0.00% syslogd
  127 root      10   0  1024K   256K nanslp 0   0:00  0.00%  0.00% cron
 2045 root       2   0  2428K  1172K select 1   0:00  0.00%  0.00% sshd2
  225 root       3   0  1384K     0K ttyin  0   0:00  0.00%  0.00% <csh>
  185 root       2   0  2284K     0K select 0   0:00  0.00%  0.00% <sshd2>
0
 
LVL 62

Accepted Solution

by:
gheist earned 2000 total points
ID: 12155978
Use local named as cache, not external nameservers. This will meke name lookups quicker with less buffer space eaten.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Suggested Courses

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question