Resource temporarily unavailable:
Hi there,
SYS: Debian 3.1, kernel 2.4.27-2-generic alpha GNU/Linux, clamd daemon 0.88.2
When I got in to work this morning my server wiould not allow me (or others) access. Even when I 
logged into the console and tried to do an `ls`  it responded with 
(35)Resource temporarily unavailable: couldn't create child process: 35
>From what I can find this is either due to lack of memory or some resource limit. I don't think it's 
the memory as there is 1.2GB and a huge 36GB swap (long story).
procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in    cs us sy id wa
 0  0      0 437744  81976 220776    0    0    23   106   54    48 15  1 84  0
>swapon
/dev/sda4                       partition       425800  0       -1
/dev/sdh1                       partition       35567600        0       -2
I noticed that there are lots of <defunct> clamd processes. If I restart clamd it cleans them up but 
within 30 minutes I have another 30 defunct clamd processes (yes it does SMTP with clamd 
enabled). I have tried to comment out the ScanArchive option from clamd.conf. 
LocalSocket /var/run/clamav/clamd.ctl
FixStaleSocket
User clamav
AllowSupplementaryGroups
ScanMail
# ScanArchive
ArchiveMaxRecursion 5
ArchiveMaxFiles 1000
ArchiveMaxFileSize 30M
ArchiveMaxCompressionRatio 250
ReadTimeout 180
...
However I am not convinced that the option is disabled as the log shows "Archive support 
enabled."
So I guess I have a few questions. The server had been up for at least 30 days so I guess the 
number of defunct processes would have been in the thousands. Does it look like I am looking at 
the right source of my original resource problem? Apart from getting cron to restart clamd is there 
something I have overlooked that is allowing the number of defunct processes to grow? Or has 
anyone had a similar experience that was due to something else?
Any ideas would be appreciated.
TIA.
Dp.
Dermot Paikkos
Network Administrator @ Science Photo Library
Phone: 0207 432 1100 
Fax: 0207 286 8668
Reply to: