Depending on the type of network connection (i suppose TCP/IP?) there are a few limits, but i doubt that you have hit them:
A normal TCP connection (say, a telnet session) is done via a "virtual channel": while it is establishing a "socket" (this is a Layer-4 addressing device, an IP-address [=layer-3] combined with a port number [=layer-4]) connection is defined via which all the communication is done. The communication runs from host-a
ort-x to host-b
ort-y and vice versa. Once the session is closed this socket connection is decomposed and the used ports are released and ready to be used again.
So, in a way, the number of available ports are a limiting factor, but as they are 16-bit numbers (1-65535) this isn't all to imposing.
Another limit is the available memory. Some OSes have tuning options how much memory i set aside for various aspects of the networking stack (for instance TCP reassemble buffers), but i don't know how this is done in Linux, just that this exists. Hopefully someone more knowledgeable regarding Linux than me will fill in this gap.
Still, modern systems on modern networks
usually have enough memory to handle the network with ease. While this should be investigated (to make sure the problem doesn't sit there) it is rather unlikely that this is the problem.
What might be a problem is: if the application runs under a normal UID it might lack the necessary
ulimits?
What does the application do when it drops the sessions? Does it throw a coredump or does it close normally or does it still run? What do you have to do to revive the system? Reboot? Restart of the application? Just wait?
The more you tell us about the system the easier it is to give concrete advise instead of some general chit-chat. So help us help you and explain in more detail what your system looks like (versions, how much memory/processors/swap space, which network connections) what it does (running applications, what they are doing, how many logins/how much network traffic/how much disk I/O) and some traces: "vmstat", "iostat", etc.
I hope this helps.
bakunin