Solved

pushing squid to the limit

Posted on 2004-09-13
4
1,983 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
4 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 500 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
llcommand 6 98
need to remove or skip  grub protection password in ubuntu on boot time 2 78
Sed question 2 101
lunix and unix command 21 86
Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

856 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