Erlang/OTP Forums

Author Message

<  Open Telecom Platform (OTP)  ~  YAWS/Erlang’s maximum number of simultaneous open ports?

kovacschris
Posted: Sun Jan 24, 2010 5:21 pm Reply with quote
Joined: 24 Jan 2010 Posts: 1
Does the erlang TCP/IP library have some limitations? I've done some searching but can't find any definitive answers.

I have set the ERL_MAX_PORTS environment variable to 12000 and configured Yaws to use unlimited connections.

I've written a simple client application that connects to an appmod I've written for Yaws and am testing the number of simultaneous connections by launch X number of clients all at the same time.

I find that when I get to about 100 clients, the Yaws server stops accepting more TCP connections with

Error in process with exit value: {{badmatch,{error,socket_closed_remotely}}
I know there must be a limit to the number of open simultaneous connections, but 100 seems really low. I've looked through all the yaws documentation and have removed any limit on connections.

This is on a 2.16Ghz Intel Core 2 Duo iMac running Snow Leopard.

A quick test on a Vista Machine shows that I get the same problems at about 300 connections.

Is my test unreasonable? I.e. is it silly to open 100+ connections simultaneously to test Yaws' concurrency?

I came across this thread about TCP throughput . Am I bumping up against the same problem?


Thanks.
View user's profile Send private message
Michal Ptaszek
Posted: Tue Feb 02, 2010 1:51 pm Reply with quote
User Joined: 01 May 2008 Posts: 35 Location: Krakow
I guess it is because of the system's limit. Each operating system has the maximum number of simultaneously opened sockets.

If you want to check the number run
Code:
ulimit -n

on your Mac.

I am not an expert when it comes to the Mac Os. Under Linux you will have to change /etc/security/limits.conf file (nofile parameter).
View user's profile Send private message

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum