Subject: Max user count

From: Aaron Levitt <[email-masked]>
Date: Wed, 5 Jul 2000 14:41:38 -0700

Well.. in the continuing saga of Mac VS *nix, I was cruising along fine with the  latest version of netatalk (netatalk-1.4b2+asun2.1.4) on a RH6.2 box and have come across a new issue.  It seems there is a max connections of 20 someplace (I would guess in the code).  In /usr/local/atalk/etc/netatalk.conf, it doesn't seem to matter what you have AFPD_MAX_CLIENTS= set to (I have mine at 150), and it still only allows 20 connections.  

The only thing I can find that seems to point to the max connections is in the source tree (in my case /usr/local/src/netatalk-1.4b2+asun2.1.4) /libatalk/dsi/ there is a file dsi_tcp.c.  In this file is this line:

#define DSI_TCPMAXPEND      20       /* max # of pending connections */

Not being too knowledgable in programming, I didn't want to start making changes in the code.  Is this where the problem lies??  Has anyone else run into similar issues with max connections in the latest release??  Is there any workaround at this time??  This is, without a doubt, a major show-stopper since my network has a fairly large number of macs.  

Any help would be greatly appreciated.

-Aaron
>>>>====--------====<<<<>>>>====--------====<<<<
Aaron Levitt		1616 Franklin Street
Systems Administrator	Oakland, CA  94612
Navis LLC		Tel:  510-763-5715
http://www.navis.com	Fax:  510-763-2516
>>>>====--------====<<<<>>>>====--------====<<<<

---

From: andrew morgan <[email-masked]>
Date: Wed, 5 Jul 2000 15:29:19 -0700 (PDT)

On Wed, 5 Jul 2000, Aaron Levitt wrote:

> Well.. in the continuing saga of Mac VS *nix, I was cruising along
> fine with the latest version of netatalk (netatalk-1.4b2+asun2.1.4) on
> a RH6.2 box and have come across a new issue.  It seems there is a max
> connections of 20 someplace (I would guess in the code).  In
> /usr/local/atalk/etc/netatalk.conf, it doesn't seem to matter what you
> have AFPD_MAX_CLIENTS= set to (I have mine at 150), and it still only
> allows 20 connections.
> 
> The only thing I can find that seems to point to the max connections
> is in the source tree (in my case
> /usr/local/src/netatalk-1.4b2+asun2.1.4) /libatalk/dsi/ there is a
> file dsi_tcp.c.  In this file is this line:
> 
> Not being too knowledgable in programming, I didn't want to start
> making changes in the code.  Is this where the problem lies??  Has
> anyone else run into similar issues with max connections in the latest
> release??  Is there any workaround at this time??  This is, without a
> doubt, a major show-stopper since my network has a fairly large number
> of macs.

Actually it is options->connections in etc/afpd/afp_options.c which sets
the maximum connection count.  This defaults to 20, but can be set to
something else with the -c command line option to afpd.  I would check
that your startup script is actually reading the value you expect from
your netatalk.conf file.  Maybe try putting a "echo ${AFPD_MAX_CLIENTS}"
in it somewhere to see.

	Andy

---

From: Aaron Levitt <[email-masked]>
Date: Wed, 5 Jul 2000 16:13:16 -0700

I tried this on a different server that hasn't been implemented company-wide yet, but has the same version of netatalk on the same OS.  It returned the correct value:

Shutting down AppleTalk services:                          [  OK  ]
Starting AppleTalk services: (backgrounded)
Max clients:  120

I will try this tonight when there aren't any users that will be disconnected when I restart atalk.  Should this have the same result, would I need to recompile with the options->connections set to the desired number??  

Also, I am aware of the -c flag, but the other server is using a afpd.conf file.  How can I set the max connections in afpd.conf??  There doesn't seem to be an option listed for that flag.

Thanx again for the help!

-Aaron

---

From: andrew morgan <[email-masked]>
Date: Wed, 5 Jul 2000 16:32:11 -0700 (PDT)

On Wed, 5 Jul 2000, Aaron Levitt wrote:

> I tried this on a different server that hasn't been implemented
> company-wide yet, but has the same version of netatalk on the same OS.  
> It returned the correct value:
> 
> I will try this tonight when there aren't any users that will be
> disconnected when I restart atalk.  Should this have the same result,
> would I need to recompile with the options->connections set to the
> desired number??

That would be one way to fix it.  Or you could just hardcode the
connection limit value in your startup script (-c 120 instead of -c
${AFPD_MAX_CLIENTS}).  But really, this is just a problem with the startup
script.

> Also, I am aware of the -c flag, but the other server is using a
> afpd.conf file.  How can I set the max connections in afpd.conf??  
> There doesn't seem to be an option listed for that flag.

The netatalk.conf file is only used by the startup script (typically
/etc/rc.d/init.d/atalk in redhat installs).  It sets some shell variables
which the script passes as command-line arguments to afpd, papd, etc.

afpd.conf is read by afpd only after it has started.  I don't believe you
can use afpd.conf to set the connection limit.  The afpd code suggests
that the command-line option -c is the only way to change this.

Maybe this wasn't entirely clear, but the connection limit is only read
when you start netatalk services.  Changing the setting in netatalk.conf
while it is running will not change anything.  Just in case you didn't
realize that...

	Andy