ddeddy
asked on
Limit on number of open connections/files in Linux?
I work in a Netware/SLES/eDirectory environment with Windows XP workstations.
We recently switched from a Netware 6.5 server to a SLES 10 SP1 server with OES2 services installed. This server houses all of our application installers which then get installed to our workstations after they have been imaged. During this process, we may have up to 30 to 40 PCs installing an application off of the SLES server simultaneously. When we were running the installers off of our Netware server, we had no problems. Our apps would install consistently without errors. Now that we have switched to SLES as our server OS, these apps fail consistently on at least 3 or 4 random machines. The applications will hang when installing and never complete. These apps are setup to install silently so I cannot list any errors that may be generated at this point. If need be, I can change this so that the apps will install with a full UI but it may take some time. I have not noticed any errors in the event log relating to these failures.
It seems like the SLES sever isn't able to handle the requests from multiple workstations at once like the Netware server could. It acts like it has reached a connection limit and drops the other connections it cannot handle. Using this as my theory, I did some research and found that you can modify the xinetd.conf file to allow more concurrent connections by modifying the "instances" line. I changed this from the default value of 30 to 3000, restarted the xinetd service, and tested the change. Unfortunately, this did not fix my problem. Maybe it isn't a connection limit? Could it be something else like a limit on the number of open files?
I'm relatively new to Linux so please let me know if you think I'm way off base. I'm open to anything at this point.
Any ideas?
Danny
We recently switched from a Netware 6.5 server to a SLES 10 SP1 server with OES2 services installed. This server houses all of our application installers which then get installed to our workstations after they have been imaged. During this process, we may have up to 30 to 40 PCs installing an application off of the SLES server simultaneously. When we were running the installers off of our Netware server, we had no problems. Our apps would install consistently without errors. Now that we have switched to SLES as our server OS, these apps fail consistently on at least 3 or 4 random machines. The applications will hang when installing and never complete. These apps are setup to install silently so I cannot list any errors that may be generated at this point. If need be, I can change this so that the apps will install with a full UI but it may take some time. I have not noticed any errors in the event log relating to these failures.
It seems like the SLES sever isn't able to handle the requests from multiple workstations at once like the Netware server could. It acts like it has reached a connection limit and drops the other connections it cannot handle. Using this as my theory, I did some research and found that you can modify the xinetd.conf file to allow more concurrent connections by modifying the "instances" line. I changed this from the default value of 30 to 3000, restarted the xinetd service, and tested the change. Unfortunately, this did not fix my problem. Maybe it isn't a connection limit? Could it be something else like a limit on the number of open files?
I'm relatively new to Linux so please let me know if you think I'm way off base. I'm open to anything at this point.
Any ideas?
Danny
Which network service and filesystem are you using? Samba, NCP, NSS?
ASKER
We are using NSS as our filesystem. Samba is enabled as well so we can access these files from our workstations without the Novell Client, but this is not used much. The workstations that are running the installers are pulling the data from the NSS volume, not the Samba share. I'm assuming that since we are using NSS, we are using NCP as our network service.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
I'm not sure which user the application(s) are running under because this server is being accessed remotely by our workstations. The workstations have access to this server because they are imported into eDirectory and the workstation objects themselves have rights to the NSS volume which is housing the installer files. If the workstation object connects to the server as a specific user, then I do not know which user that is. [I hope that made sense]. How do I find this out?
If I SSH into the SLES server, login as root, and issue the ulimit -n command, it returns 350000. Does this mean that the user "root" can open up to 350000 files at once? I see this number is configured in the limits.conf file as a soft limit and as a hard limit. Below is what is configured in the limits.conf file:
If I SSH into the SLES server, login as root, and issue the ulimit -n command, it returns 350000. Does this mean that the user "root" can open up to 350000 files at once? I see this number is configured in the limits.conf file as a soft limit and as a hard limit. Below is what is configured in the limits.conf file:
* soft nofile 350000
* hard nofile 350000
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Hey Jonas,
Thanks for the replies.
You'll have to forgive me -- I'm not very knowledgeable with Linux as of yet.
I was able to run the command 'lsof | wc -l' to show me how many files were open. When 32 PCs were pulling apps off of our SLES server (and failing to install them all correctly) the server showed close to 15k files open. When the PCs are not installing anything off the server, it shows close to 5k files open. I suspect this is because this server hosts other files for different users across the district.
My problem is that I don't know how to identify which application or user (on the Linux server) is responsible for the remote connection from our workstations. When my workstation (Test-PC1 for example) connects to the Linux server to install an application from it, I don't know how it works on the Linux side. Does it connect as a specific user/process? If so - what can I do to identify them? Remember that this is a SLES10 box with OES2 installed. I don't know if eDirectory plays a role in this whole process.
I know that xinetd is a replacement for inetd, which is the internet services daemon, but I don't know what you mean by running it "outside of xinetd". Sorry again for my ignorance.
Any help is appreciated!
Danny
Thanks for the replies.
You'll have to forgive me -- I'm not very knowledgeable with Linux as of yet.
I was able to run the command 'lsof | wc -l' to show me how many files were open. When 32 PCs were pulling apps off of our SLES server (and failing to install them all correctly) the server showed close to 15k files open. When the PCs are not installing anything off the server, it shows close to 5k files open. I suspect this is because this server hosts other files for different users across the district.
My problem is that I don't know how to identify which application or user (on the Linux server) is responsible for the remote connection from our workstations. When my workstation (Test-PC1 for example) connects to the Linux server to install an application from it, I don't know how it works on the Linux side. Does it connect as a specific user/process? If so - what can I do to identify them? Remember that this is a SLES10 box with OES2 installed. I don't know if eDirectory plays a role in this whole process.
I know that xinetd is a replacement for inetd, which is the internet services daemon, but I don't know what you mean by running it "outside of xinetd". Sorry again for my ignorance.
Any help is appreciated!
Danny
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Jonas
i have almost same problem.
I need to check how many users can connect to novell same time.
Thanks
Amaraa
i have almost same problem.
I need to check how many users can connect to novell same time.
Thanks
Amaraa
ASKER
Jonas,
I'm sorry it's taken me a while to get back to you. School is starting and it's been quite busy around the office trying to prepare for it all.
In your previous comment, you said:
"Do you know which program handles the connections? (what is the service called in xinetd) If it has a startup script we can have a look into that and see if we can tweak the system a bit. "
I do not know which program handles the connections. I don't know how to tell which service is called in xinetd nor if it has a startup script. Any ideas?
This is a 64 bit system, by the way.
The next time we try and run the installers on our workstations from this server, I will run 'lsof' to see which user is using all of the files.
Thanks for all the help!
Danny
I'm sorry it's taken me a while to get back to you. School is starting and it's been quite busy around the office trying to prepare for it all.
In your previous comment, you said:
"Do you know which program handles the connections? (what is the service called in xinetd) If it has a startup script we can have a look into that and see if we can tweak the system a bit. "
I do not know which program handles the connections. I don't know how to tell which service is called in xinetd nor if it has a startup script. Any ideas?
This is a 64 bit system, by the way.
The next time we try and run the installers on our workstations from this server, I will run 'lsof' to see which user is using all of the files.
Thanks for all the help!
Danny
Sorry i found solution.
" ncpcon connection list" This command will show you how many users connected to servers.
Also i included my script. This script will show you only connected users
" ncpcon connection list" This command will show you how many users connected to servers.
Also i included my script. This script will show you only connected users
#!/bin/sh
# This is a script that shows what users and how many are logged into a open enterprise server.
clear
echo "These users are logged in right now:"
# The command below uses ncpcon to list all connections to the server. We then grep CN, NOT LOGGED IN to weed out some unwanted connections.
# cut -f 2 cuts out the part we want. We then use sort to get it nice and tidy for removing duplicate entries with uniq and lastly we use
# grep to remove entries with a * infront of them. wc -l counts lines wich tells us how many users there are.
ncpcon connection list | grep CN | grep -v NOT | cut -f 2 | sort | uniq -i | grep -v [*]
echo " "
echo " "
echo "It is `ncpcon connection list | grep CN | grep -v NOT | cut -f 2 | sort | uniq -i | grep -v [*] | wc -l` users logged in at this moment."
echo " "
echo " "
This script will be display all openfiles.
#/bin/bash
# description: List open files on OES
# author: Olaf Zerfowski
# version: 0.01
# date: 04-20-2006
maxcon=`/sbin/ncpcon connection 2>/dev/null| sed -ne "s/.*Connection Slots Allocated\t//pg"`
count=0
if [ "$1" == "" ]
then
searchstring=/
else
searchstring=$1
fi
echo "Max Connections=$maxcon"
echo "SearchString=$searchstring"
while [[ $count -lt $maxcon ]]
do
conninfo=`ncpcon connections $count 2>nul| egrep "Name|$searchstring"`
if echo $conninfo | grep "$searchstring" 1>/dev/nul 2>&1
then
echo Connection $count
ncpcon connections $count 2>nul| egrep "Name|$searchstring"
fi
count=`expr $count + 1`
done