Operating System - HP-UX
1833589 Members
4005 Online
110061 Solutions
New Discussion

Re: How many connections per port?

 
SOLVED
Go to solution
Thomas Kopp
Occasional Advisor

How many connections per port?

Moin,
on our rp5470 server I am running an application, which is giving following error:
unable to open server port #39998.
With "netstat -an |grep 39998 | wc -l" I can see, that there are about 500 open connection associated to this port.

My question:
Where is the limit of connection per port?
and
Who is giving the limit: Application, OS or Network connection??
Thanks
Thomas
6 REPLIES 6
Stefan Farrelly
Honored Contributor

Re: How many connections per port?

In my opinion this is your application. Network equipment doesnt have restrictions on this, nor HP-UX from what I can see. I would investigate your application settings.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Fabio Ettore
Honored Contributor

Re: How many connections per port?

Hi Thomas,

it sounds like a firewall permission problem. Otherwise you can search out what connections exactly are using port 39998 by lsof in order to know if there are any not-expected connections on that port.

# lsof -i:39998

You can find lsof on porting of HP-UX:

http://hpux.connect.org.uk/

I hope this helps you.

Bets regards,
Ettore
WISH? IMPROVEMENT!
Andrew Cowan
Honored Contributor

Re: How many connections per port?

Are you out of comms/buffer memory? You can check this with netstat -m. If so you may need to set some of the NDD options. Remember that they will be reset every time you reboot unless you add them to the ndd startup file.
Brian Hackley
Honored Contributor
Solution

Re: How many connections per port?

Thomas,

To answer your question, the application in conjunction with OS tunables typically should be taken into consideration.

The open() system call will set errno upon its return to the application. The application should notify the user exactly what that errno status is, usually using the library routine, perror(3C). Using that errno, check the open(2) man page which describes error conditions in detail.

Andrew,
netstat -m disappeared with mbufs at HPUX 10 when HP implemented the Mentat Streams-based TCP stack. However your suggestion to check memory usage is a good one; the errno result from open() should be a good indicator if that should be done.

Since most server processes usually fork() a child process from a master listener process, any systemwide limits being reached could be examined in glance, including memory and system tunables; I would check for nfile (total # of open files allowed) since a socket is really just a file.

Hope that all helps,
-> Brian Hackley
Ask me about telecommuting!
Andrew Cowan
Honored Contributor

Re: How many connections per port?

Hi Brian,

Thats very useful information, and shows that I spend most of my time using AIX and not HP-UX.
KapilRaj
Honored Contributor

Re: How many connections per port?

Hi,

Not too confident but .. I think over it this way .. Is it a wild guess ?!!!

There is a limit of maximum number of open files by a process yea (!?). So if this listener process has alreay 500 tcp sockets made (i got it from the original netstat o/p requester posted) and it has opened some more files and logical volumes for writing / reading data and they all have contributed to the number of open files by that process and it has reached the limit ... I am not too sure on this but make sence yea ?...

Kaps
Nothing is impossible