Subject: pid error

From: Jeffrey Auerbach <[email-masked]>
Date: Wed, 13 Nov 1996 11:59:31 -0500 (EST)

Hello,
I am getting a " Sleep: fcntl lock of pid file failed: resource
Temporarily Unavailable  error.  Can anyone help me figure out a remedy
for this?  Any ideas?  The Archives touch on some pid errors but not this
one.

TIA

Jeff Auerbach

---

From: Alain Magloire <[email-masked]>
Date: Thu, 14 Nov 1996 15:27:54 -0500 (EST)

> for this?  Any ideas?  The Archives touch on some pid errors but not this

Wu-ftpd have some nice feature:
limit
class
etc ..

With inetd spawning ftpd proccesses left, right and center
they must be a way to have accounting.

Wu-ftpd does that by a file _PATH_PIDNAMES (check pathnames.h
or ckconfig for the location).

On every connection ftpd will put a lock on the file
and add an entry and if the total number is over limit(in ftpaccess)
send a message back, release the lock and exit(it's a bit more than that
but you got the idea).

If ftpd can not have LOCK_EX(exclusive lock) it will send
a mesage to syslog sleep a while and try again.

The scheme is simple but many things could go wrong.
 a- a runaway process that still hold the lock
 b- a _VERY_ busy site
 c- a malicous user that had put a lock(U must have O_RDWR to the file)
 d- lots I mean _LOTS_ of connection from Web Browsers
 e- a script or a cron job using ftp{count,who}
 f- in ftpaccess you have lot of classes
 g- etc ...
 ....

I have a busy ftp server(SunOS-4.x) ... but still I never seen this
message. But I was expecting it, with many connections coming
from Web Browser, http has this one command one connection mentality.

I don't have a real remedy, but 
1-
shudown properly ftp
2-
go on a hunt of all ftpd process remaining 
3-
rm _PATH_PIDNAMES
4-
reenable ftp
5-
make sure the permission on the _PATH_PIDNAMES is 644

There's probably many other things that I missed ;(
Good luck anyway

--
alain