LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Is there any limitof UDP Sockets we can bind at same time in Fedora Core x64? (https://www.linuxquestions.org/questions/linux-networking-3/is-there-any-limitof-udp-sockets-we-can-bind-at-same-time-in-fedora-core-x64-857128/)

albertpv 01-18-2011 06:26 PM

Is there any limitof UDP Sockets we can bind at same time in Fedora Core x64?
 
During the development of a java application appearantly found that cannot bind more than 500 UDP sockets at the same time.
The developed java application is running on Fedora Core (x64)

Is there some procedure to check how many sockets I can bind at the same time on that linux distribution?

In case the limit exists, can it be increased easily?

$ uname -a result is :

Linux machine.name 2.6.27.25-78.2.56.fc9.x86_64 #1 SMP Thu Jun 18 12:24:37 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux

Java version used by our application is:
2011-01-18 18:26:11,739 DEBUG - Java version: 1.6.0_23
2011-01-18 18:26:11,739 DEBUG - Java vendor: Sun Microsystems Inc.

Thx for your tips!

indelible 01-19-2011 01:55 PM

Yes there is. There are a grand total of 65635 UDP sockets, so that's one limit. Another is the total number of file descriptors able to be opened at any one time (a socket falls into that category).

search ulimit - that will tell you a bunch more. (In the C library it is called rlimit)

This tells you your (per UID) max file descriptors able to be opened
ulimit -n

This tells you the max number of processes able to be opened (I assume if you're trying to bind to >500 sockets you're not doing it all in 1 thread, so file descriptors mightn't be the only limit you're hitting.)
ulimit -u

albertpv 01-20-2011 03:41 AM

You are right, The limitation was due to the maximum number of open file descriptors:

Seems the default value were:
open files (-n) 1024
max user process (-u) 1024

After applying as root: #ulimit -n 16384 #ulimit -u 16384 the problem disappeared.

Thx, that was helpful.


All times are GMT -5. The time now is 01:34 PM.