[squid-users] Bad file descriptor

From: squid <squid@dont-contact.us>
Date: Thu, 11 Oct 2001 14:09:34 -0400

I've been trying to stretch the throughput abilities on my squid server,
but I'm constantly running into problems with memory usage. When I have
poll enabled I run into the following errors until squid restarts. This
will happen about 5 times in a day.

2001/10/04 12:37:05| comm_poll: poll failure: (12) Cannot allocate memory
2001/10/04 12:37:05| Select loop Error. Retry 1

When I disable polling the following errors occurs again until squid
restarts. And again this happens about 5 times a day.

2001/10/11 09:56:31| comm_select: select failure: (12) Cannot allocate
memory
2001/10/11 09:56:31| examine_select: Examining open file descriptors...
2001/10/11 09:56:31| FD 88515: (9) Bad file descriptor
2001/10/11 09:56:31| WARNING: FD 88515 has handlers, but it's invalid.
2001/10/11 09:56:31| FD 88515 is a None called ''
2001/10/11 09:56:31| tmout:(nil) read:(nil) write:(nil)

My squid process is running in a very lean install of Slackware 7.1 with
linux 2.2.16 kernel. This is a PII 450 with a 512 MB of RAM and 2 scsi
hard drives. The first drive is used for the system and log files and
the second drive is used strictly for cacheing. I've been fighting this
problem now for sometime, and I can't seem to get squid to reliably use
the available system memory.

I'm find that if I reduce my maximum cached object to 1kB or below I'm
able to make this go away. Of course, then I'm not really doing any
useful caching. Also I find that my squid process only uses about 180MB
of RAM. I'm willing to install more RAM if this will solve the
problem, but it seems strange to me that squid will reset instead of
slow down or stop accepting requests.

I'm also finding that as I reduce the maximum cached object that squid
consumes considerably more CPU time in top but that the load average
drops considerably. When I increase the maximum cache object the squid
process doesn't use nearly so much CPU time but the load average
increases to 200%. vmstat reports pretty modest hard drive writing so I
doubt that the system is waiting for the hard drives. It also reports
the CPU being %30 idle. It seems to me that I would be able to increase
the amount cached easily, but then I got the above errors.

I think what might be happening is that squid is slowing down when I
have it cache fully but because it's taking longer to process requests
it has to hold more connections open, if someone could shed some light
on this I would appreciate it.

George Loeppky
george.loeppky@net-sweeper.com
Received on Thu Oct 11 2001 - 12:09:42 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:02:41 MST