[erlang-questions] Fw: inets - http:request with invalid host ip

Sanjaya Vitharana <>
Tue May 29 08:36:16 CEST 2007


Hi,

I have done another test, check the code and results. If Asynchronous request hangs it causes to crash the server when 2nd request receives.

Thanks in advance,

Sanjaya Vitharana.

----- Original Message ----- 
From: Sanjaya Vitharana 
To:  
Sent: Tuesday, 29 May 2007 10:33 am
Subject: inets - http:request with invalid host ip


Hi,

Of cource I put an ip which is not visible (and url also not there). 

2> test:test_url().
 URL="http://202.124.160.149/src/cf/1414/cricket/scoreline_odi/menu.php?key=1&session=a02857230011801002496201&ch=58&serverid=1"
 Time for Synchronous request 189028171 microseconds ResSync={error,etimedout}
 Time for Asynchronous request 188972235 microseconds ResASync={ok,
                                                                #Ref<0.0.0.119>}

Check the above results for time taken to execute http:request. (test code attached)

1.) It has taken a large amount of time to execute both requests
2.) And time difference to exit from Synchronous and Asynchronous request are approximately same.

Is this OK ???

What I am thinking is the time taken to perform Asynchronous request as not acceptable. Am I wrong ?
If the IP is not visible (or not available) Why such long time taken to give ANY result ?

Is this a bug ?

Thanks in advance,

Sanjaya Vitharana.


[ root]# uname -a
Linux es3 2.4.21-27.0.1.EL #1 Fri Dec 24 13:49:49 EST 2004 i686 i686 i386 GNU/Linux
[ root]# 
[ root]# erl -version
Erlang (ASYNC_THREADS,HIPE) (BEAM) emulator version 5.5.4
[ root]#
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20070529/1941f4ae/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.erl
Type: application/octet-stream
Size: 778 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20070529/1941f4ae/attachment.obj>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: results-test1.txt
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20070529/1941f4ae/attachment.txt>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test1.erl
Type: application/octet-stream
Size: 1189 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20070529/1941f4ae/attachment-0001.obj>


More information about the erlang-questions mailing list