Subject: RE: fcntl error message

From: Roger Hanke <[email-masked]>
Date: Mon, 23 Nov 1998 20:27:39 -0500

Gregory,
 If the limit command is not being used, and we decide not
to use it in the future, how simple would it be to remove the 
fcntl/flock checks and the pieces of code surrounding it
implementing the limit command?
 Was curious since we too have seen this under serious 
load. Actually under these conditions we see repeated
fcntl failures but normally after several iterations they go
thru.
	Roger Hanke

>-----Original Message-----
>From:	Gregory A Lundberg [SMTP:[email-masked]]
>Sent:	Monday, November 23, 1998 4:27 PM
>To:	Pomerance, Debbie
>Cc:	[email-masked]'
>Subject:	Re: fcntl
>
>On Mon, 23 Nov 1998, Pomerance, Debbie wrote:
>
>> I have searched the list archives but have not found a satisfactory
>> answer for the occurrence of the following message, can someone
>> enlighten me as to the cause and the relative severity of it vis-a-vis
>> user's access to wu services..
>> 
>> I'm using Wu ftp beta 18 on Solaris 2.5.1.  Thanks in advance.
>> 
>> ftpd[18356]: sleeping: fcntl lock of pid file failed: Resource
>> temporarily unavailable
>
>The WU-FTPD daemon uses a set of files, the pid files, to implement the
>'limit' ftpaccess directive.  These files usually appear in /var/run or a
>similar directory.  There is one file named 'ftp.pids-all' which holds the
>connection information for all currently-running daemons.  In addition
>there is one file for each 'class' defined in ftpaccess.  For example, on
>my system I have a class 'local' so a file named 'ftp.pids-local' exists.
>
>Whenever a new connection apepars, the daemon attempts to obtain an
>exclusive lock on these pid files.  If available, the daemon uses the
>fcntl(2) function; otherwise it uses the flock(2) function.
>
>The message you're seeing appears when, in access.c, the daemon is not
>able to get the exclusive lock.  The message "Resource temprorarily
>unavailable" simply means the file is locked.  This is a _very_
>short-lived error so the daemon waits one second (using the sleep(3)
>function) and tries again.
>
>If you're seeing this occassionally, it means your site is a very busy
>one.  Don't worry about the message.
>
>If you're seeing it a lot, you should look for possible problems on the
>system.  For instance, if the /var/run directory is not local the locks
>must process through NFS and, besides being unreliable, will take longer
>to set and clear.  You should never mount this area; it should always be
>on a local file system.
>
>Other possible problems to look for are: excessive swapping due to too
>many processes on the system (nice(1) some of the processes or move the
>FTP server to a dedicated machine).  Excessive swapping due to
>insufficient memory (buy more).  Slow or failing disk drives (replace
>them).  Anything else which would slow down the machine in some way.
>
>-- 
>
>Gregory A Lundberg		Senior Partner, VRnet Company
>1441 Elmdale Drive              [email-masked]
>Kettering, OH 45409-1615 USA    1-800-809-2195
>

---

From: Gregory A Lundberg <[email-masked]>
Date: Mon, 23 Nov 1998 21:53:19 -0500 (EST)

On Mon, 23 Nov 1998, Roger Hanke wrote:

> If the limit command is not being used, and we decide not to use it in
> the future, how simple would it be to remove the fcntl/flock checks
> and the pieces of code surrounding it implementing the limit command?

Run VR10, disable the pid files with the command-line switch provided.

--