Erlang/OTP Forums

Author Message

<  Erlang questions mailing list  ~  HTTP1.1

eedtag at eed.ericsson.se
Posted: Thu Jan 10, 2002 3:45 pm Reply with quote
Guest
G'day,

I've been happily using the HTTP1.1 client from Johan Blom contained in the
sowap application to PUT and GET images and text, and to POST data to a form.

But have discovered that if I setup several PPP connections and attempt to PUT
or GET large numbers of files, e.g. do a few hundred GETs or PUTs one after the
other, then I eventually get the following error:

?error("Couldn't create TCP connection ~p",[Tag],tcp_connect),

The tcp connection is opened with:

gen_tcp:connect(Host,Port,TCPArgs)

After this I am unable to create any new TCP connections, i.e. I can no longer
do any http or ftp down- or uploads.

I think the problem may be that I have reached the max. number of sockets I can
open with Erlang. How many sockets can I open in Erlang?

How can I check that the socket I have just used has been closed again properly
or reset before I continue?

Is there anything else new on the HTTP1.1 front?

(I am working on a PC with RedHat Linux 7.0.)

Thankyou
Tanja Godau :-)



Post generated using Mail2Forum (http://m2f.sourceforge.net)
Chandrashekhar.Mullaparth
Posted: Thu Jan 10, 2002 4:08 pm Reply with quote
Guest
On UNIX, generally there is a per process limit on the number of open files.
Probably this is what is limiting you more than anything else. On Solaris I
would do something like this:

shutdown the erlang node
In the UNIX shell type "ulimit -n" to see the current limit (which is
usually 64)
ulimit -n 256 (to set the limit to 256)
Start the erlang node again.

hope this helps.
Chandru

-----Original Message-----
From: Tanja Godau [mailto:eedtag_at_eed.ericsson.se]
Sent: 10 January 2002 15:45
To: erlang-questions_at_erlang.org
Subject: HTTP1.1


G'day,

I've been happily using the HTTP1.1 client from Johan Blom contained in the
sowap application to PUT and GET images and text, and to POST data to a
form.

But have discovered that if I setup several PPP connections and attempt to
PUT
or GET large numbers of files, e.g. do a few hundred GETs or PUTs one after
the
other, then I eventually get the following error:

?error("Couldn't create TCP connection ~p",[Tag],tcp_connect),

The tcp connection is opened with:

gen_tcp:connect(Host,Port,TCPArgs)

After this I am unable to create any new TCP connections, i.e. I can no
longer
do any http or ftp down- or uploads.

I think the problem may be that I have reached the max. number of sockets I
can
open with Erlang. How many sockets can I open in Erlang?

How can I check that the socket I have just used has been closed again
properly
or reset before I continue?

Is there anything else new on the HTTP1.1 front?

(I am working on a PC with RedHat Linux 7.0.)

Thankyou
Tanja Godau :-)



NOTICE AND DISCLAIMER:
This email (including attachments) is confidential. If you have received
this email in error please notify the sender immediately and delete this
email from your system without copying or disseminating it or placing any
reliance upon its contents. We cannot accept liability for any breaches of
confidence arising through use of email. Any opinions expressed in this
email (including attachments) are those of the author and do not necessarily
reflect our opinions. We will not accept responsibility for any commitments
made by our employees outside the scope of our business. We do not warrant
the accuracy or completeness of such information.



Post generated using Mail2Forum (http://m2f.sourceforge.net)
johan.blom at mobilearts.
Posted: Thu Jan 10, 2002 4:39 pm Reply with quote
Guest
Hi Tanja,


On Thu, 2002-01-10 at 16:45, Tanja Godau wrote:
> G'day,
>
> I've been happily using the HTTP1.1 client from Johan Blom contained in the
> sowap application to PUT and GET images and text, and to POST data to a form.
>
> But have discovered that if I setup several PPP connections and attempt to PUT
> or GET large numbers of files, e.g. do a few hundred GETs or PUTs one after the
> other, then I eventually get the following error:
>
> ?error("Couldn't create TCP connection ~p",[Tag],tcp_connect),
>
> The tcp connection is opened with:
>
> gen_tcp:connect(Host,Port,TCPArgs)
>
> After this I am unable to create any new TCP connections, i.e. I can no longer
> do any http or ftp down- or uploads.
>
> I think the problem may be that I have reached the max. number of sockets I can
> open with Erlang. How many sockets can I open in Erlang?
Yes, you are right. I didn't close sockets properly...
Don't know how many sockets (was it typically max 1024 in a Unix
process?)

>
> How can I check that the socket I have just used has been closed again properly
> or reset before I continue?
A quick fix is to just add a gen_tcp:close(Socket) after a message has
been read in properly.

>
> Is there anything else new on the HTTP1.1 front?
Yes, I have rewritten the inets-3.0 server and integrated (and
rewritten) the client into inets-3.0.
Doing some final debugging, before release in this very moment...

Johan Blom
Mobile Arts




Post generated using Mail2Forum (http://m2f.sourceforge.net)
Isabella12
Posted: Wed Nov 04, 2009 8:22 pm Reply with quote
Guest
Could you point me to where you obtained the Erlang sources. Also could you please provide the "gcc -v" output of the compiler(s) you used.

Thanks
Online Pharmacy

Display posts from previous:  

All times are GMT
Page 1 of 1
Post new topic

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 cannot attach files in this forum
You cannot download files in this forum