Jeff at K2

Q: Idle afp Connections

Hi,

 

I'm wondering if someone with a better understanding of afp settings than I can take a look at the settings and make sure they mean what I think they do.  We're using afp because we have clients from 10.9 to 10.11 with a 10.11 server and Apple's smb implementation still seems a bit twitchy.

 

I'm trying to set it up so clients are disconnected within a couple days if they shut down without logging off, or otherwise otherwise go idle.  The disconnects don't seem to be happening within the time I think they should.

 

afp:idleDisconnectOnOff = yes

afp:idleDisconnectTime = 12

afp:idleDisconnectFlag:adminUsers = no

afp:idleDisconnectFlag:registeredUsers = yes

afp:idleDisconnectFlag:usersWithOpenFiles = no

afp:idleDisconnectFlag:guestUsers = yes

afp:reconnectTTLInMin = 1440

afp:tickleTime = 30

 

From what I could find (kryped and old panther documentation), the above settings mean this:

 

Disconnect clients that have been idle for 12 hours, but not if they are admins or have files open.  After 12 hours, they have another 24 hours to re-establish a connection, otherwise they have to log in again.  The server will check every 30 seconds to see if the client is there.

 

I assume this means no user should appear in the Server app's Connected Users list with more than 1 day, 12 hours "Idle Time".  Yet, they do.  For days. So I'm baffled.

 

Thanks,

 

Jeff

Many, Xserves, MBPs, Minis, iMacs, etc

Posted on Jun 15, 2016 10:55 AM

Close

Q: Idle afp Connections

  • All replies
  • Helpful answers

  • by Strontium90,

    Strontium90 Strontium90 Jun 16, 2016 4:52 AM in response to Jeff at K2
    Level 5 (4,067 points)
    Servers Enterprise
    Jun 16, 2016 4:52 AM in response to Jeff at K2

    I've had success with this combination:

     

    sudo serveradmin settings afp:idleDisconnectOnOff = yes

    sudo serveradmin settings afp:idleDisconnectTime = 1

    sudo serveradmin settings afp:reconnectTTLInMin = 20

    sudo serveradmin settings afp:reconnectFlag = none

     

    The setting enable a 20 minute time to logout, a 1 hour idle disconnect, and disabling the reconnection flag.  Remember to restart the AFP service to benefit from the changes.

     

    But my needs are likely different from yours.  I've used these settings to mitigate TimeMachine overrun issues as well as double mount concerns.  In my case, TM does the mount automatically so I don't want the auto-reconnect. 

     

    Reid

    Apple Consultants Network

    Author - "El Capitan Server – Foundation Services"

    Author - "El Capitan Server – Control & Collaboration"

    Author - "El Capitan Server – Advanced Services"

    :: Exclusively available in Apple's iBooks Store

  • by Jeff at K2,

    Jeff at K2 Jeff at K2 Jun 27, 2016 11:15 AM in response to Strontium90
    Level 1 (14 points)
    Mac OS X
    Jun 27, 2016 11:15 AM in response to Strontium90

    Thanks Reid,

     

    So am I understanding right that the settings you outline mean if a user is disconnected from the server, he has 20 minutes to re-establish a connection, and the server will drop the connection from its end after 1 hour? If that's the case, why would I want ttl set so low, wouldn't I (well .. wouldn't one) want to give users all the time to reconnect? Otherwise, why wouldn't you just set the disconnect time lower?

     

    Sorry, maybe I'm not understanding when the TTL comes into play? After the client goes idle or after the idle time has run out?

     

    And if I want users with open files to be able to reconnect indefinitely is that advisable or even possible?

     

    Thanks,

     

    Jeff