<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2600.0" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi ... !!!</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>When I try to perform a load test on my db, Inets 
gives below error. </FONT><FONT face=Arial size=2>Actually I'm running 
inets httpd to handle my http request.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>When I compare the error with mod_log.erl (line 112 
on transfer_log part) 'EXIT' is not catch in the original code. Is it ok or a 
bug ?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I have try to put the 3000000 requests, but 
why this crashes in the 63689 http call & onwards? It's perfectly 
works upto 63689 request. Also the requests generated by same way in PHP 
loop (see below) . Too much load will be the reason?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>please guide me.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanks in advance.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Sanjaya Vitharana</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>=ERROR REPORT==== 29-Dec-2005::18:42:13 
===<BR>{'EXIT',{ebadf,[{io,format,<BR>                    
[<0.125.0>,<BR>                     
"~s ~s ~s [~s] \"~s\" ~w 
~w~n",<BR>                     
["192.168.0.124",<BR>                      
"-",<BR>                      
"-",<BR>                      
"29/Dec/2005:18:42:13 
+0600",<BR>                      
"GET 
/vm_db/vm_prof_upd:save_record?mob=772063689&det=eJx1VE2PmzAQ%2FSsV4hhFmPCRkMu2vbSqsltpL71FEzBZd42JbEOCqvz3jsEmhM0qkQzjN2+e5w2GLFxn%2F1S2yTzINWtpLrS3ZVm47WM5CEGL192rt33GCFlhqBYaoUqy4xtCMZh5pF%2FxgVbAOHAqtbrbCjKvhIrxrgANdueLWVPcqHlBZY9PMu%2Fn87eXP0vzEpuci6incJR0lJRqRxNvjPAsNEdAqjPleV1RbwtIhaEo83R3orZQQUtouP74RuIxdY%2FhZVtfrBrgXNK8x2BKmqYkXEVxsj9LuEfljXqAykeUac4AwwqqZ8SemAVbCkVrJG9mki1gjVqh28+i6RB9qK6ShatrYWUjHsDyEUbCETfXZ7wTxuu5go2Lf6JBOPIR+ImKEUiiCfJex%2FU6zGhr5uvAe4tXj%2FuFkUOjuo+VDnB0lRADZ3iAoQ5zvTrptWZlV7LBbDSD+IFPgiDwx6zF4vbo4w4J%2FGARLH5Ile2YcKtPbrCxsT15C7KzU+47NxpF5W9Q6lzLwo5Zkq7xb2WpE6VFwYDPPg+TV3I4juNIsC%2FuR%2FAX2POzSjE3%2FISE4WoVRXGcJOlQAsdSisK5ksRRnK4361VIwih26lsmdQOcFWoqYj2IcK64OwClnCB%2Fh+NdtKdR7ChAN5LOaIYbiRU2HNhbAStCXzGMJtY9NZVanqGlguolf7cUTA0k05qYZa4px9BUN47qonQtabhkQlsGA32rlXbGzCHmy64Pf2muv3P0y7X0pRJsh6lf87xuBiRaqDSec9COkF+20Y09IrkTM+mlgIpafyfb1%2F94yawH&type=0&date_upd=1135860133&date_first=1135860133 
HTTP/1.0",<BR>                      
200,<BR>                      
7]]},<BR>                
{mod_log,transfer_log,6},<BR>                
{mod_log,do,1},<BR>                
{httpd_response,traverse_modules,2},<BR>                
{httpd_response,generate_and_send_response,1},<BR>                
{httpd_request_handler,handle_response,1},<BR>                
{gen_server,handle_msg,6},<BR>                
{proc_lib,init_p,5}]}}<BR></FONT></DIV>
<DIV><FONT face=Arial 
size=2>-----------------------------------------------PHP script(loadTest.php) 
I try to run----------------------------------------------------</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>#!/usr/local/php/bin/php</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2><?php<BR> $data = 
urlencode('eJx1VE2PmzAQ/SsV4hhFmPCRkMu2vbSqsltpL71FEzBZd42JbEOCqvz3jsEmhM0qkQzjN2 
e5w2GLFxn/1S2yTzINWtpLrS3ZVm47WM5CEGL192rt33GCFlhqBYaoUqy4xtCMZh5pF/xgVbAOHAqtbrbCjKvhIrxrgANdueLWVPcqHlBZY9PMu/n87eXP0vzEpuci6incJR0lJRqRxNvjPAsNEdAqjPleV1RbwtIhaEo83R3orZQQUtouP74RuIxdY/hZVtfrBrgXNK8x2BKmqYkXEVxsj9LuEfljXqAykeUac4AwwqqZ8SemAVbCkVrJG9mki1gjVqh28 
i6RB9qK6ShatrYWUjHsDyEUbCETfXZ7wTxuu5go2Lf6JBOPIR 
ImKEUiiCfJex/U6zGhr5uvAe4tXj/uFkUOjuo VDnB0lRADZ3iAoQ5zvTrptWZlV7LBbDSD 
IFPgiDwx6zF4vbo4w4J/GARLH5Ile2YcKtPbrCxsT15C7KzU 
47NxpF5W9Q6lzLwo5Zkq7xb2WpE6VFwYDPPg 
TV3I4juNIsC/uR/AX2POzSjE3/ISE4WoVRXGcJOlQAsdSisK5ksRRnK4361VIwih26lsmdQOcFWoqYj2IcK64OwClnCB/h 
NdtKdR7ChAN5LOaIYbiRU2HNhbAStCXzGMJtY9NZVanqGlguolf7cUTA0k05qYZa4px9BUN47qonQtabhkQlsGA32rlXbGzCHmy64Pf2muv3P0y7X0pRJsh6lf87xuBiRaqDSec9COkF 
20Y09IrkTM mlgIpafyfb1/94yawH');</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2> for ($mob = 772000000; $mob < 775000000; 
$mob++)<BR> {<BR>  $url = 
'http://192.168.0.124:8888/vm_db/vm_prof_upd:save_record?mob=' . $mob 
.<BR>                                                                
'&det=' . $data 
.<BR>                                                                
'&type=0' 
.<BR>                                                                
'&date_upd=' . time() 
.<BR>                                                                
'&date_first=' . time();</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>  $res = date('Y-M-d h:i:sa', time()) . ' 
| ' . $mob . ' ' . file_get_contents($url);</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>  echo $res . 
"\n";<BR>  file_put_contents('/tmp/loadTest.log',  $res . "\n", 
FILE_APPEND);<BR>  //usleep(100);<BR> }<BR> echo 
"\n";<BR>?><BR></FONT></DIV>
<DIV><FONT face=Arial 
size=2>-------------------------------------------------------------------------------------------------------------------------------------------------------------</FONT></DIV>
<DIV><FONT face=Arial size=2>****** below the aditional info if somebody needs 
to test *****</FONT></DIV>
<DIV><FONT face=Arial size=2>
<DIV><FONT face=Arial 
size=2>-------------------------------------------------------------------------------------------------------------------------------------------------------------</FONT></DIV></FONT></DIV>
<DIV><FONT face=Arial size=2> </DIV></FONT>
<DIV><FONT face=Arial 
size=2>-------------------------------------------------record 
used-------------------------------------------------------------------------------------</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>-record(vm_profile_backup, {mobile_no, 
prof_details, type, last_update_date, first_creation_date, 
fax_no}).</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV>
<DIV><FONT face=Arial size=2>---------------------------------table created 
using 
-----------------------------------------------------------------------------------------------------</FONT></DIV></DIV>
<DIV><FONT face=Arial size=2><BR>   Res = 
mnesia:create_table(profile_db,[<BR>                      {disc_only_copies, 
NodeList},<BR>                      {record_name, 
vm_profile_backup},<BR>                      {attributes, 
record_info(fields, 
vm_profile_backup)}<BR>                      
]),<BR></FONT></DIV>
<DIV><FONT face=Arial size=2>-------------------------------from 
vm_prof_upd.erl--------------------------------------------------------------------------------------------------------</FONT></DIV>
<DIV><FONT face=Arial 
size=2>save_record(SessionID,Env,Input)-><BR>  %%----------Server 
Side Out Puts-----------<BR>  io:format("SessionID:~p~n",[SessionID]), 
%SessionID:<0.233.0><BR>    
io:format("Env:~p~n",[Env]),<BR>    io:format("Input: 
~p~n",[Input]),<BR>    InData = 
httpd:parse_query(Input),<BR>    io:format("GOT THIS: 
~p~n",[InData]),<BR>    %%----------Return to 
client---------------<BR>  Rec=#vm_profile_backup{},<BR>  Fun1= 
fun(A, VMRec) -><BR>       case A 
of<BR>        {"mob",MNo}-> 
VMRec#vm_profile_backup{mobile_no=MNo};<BR>        {"det",PDet}->VMRec#vm_profile_backup{prof_details=PDet};<BR>        {"type",Type}->VMRec#vm_profile_backup{type=Type};<BR>        {"date_upd",Date_UpDate}-><BR>          case 
catch erlang:list_to_integer(Date_UpDate) 
of<BR>           {'EXIT', 
_}-> 
VMRec#vm_profile_backup{last_update_date=error};<BR>           %%{badarg,_}-><BR>           ValueDate_UpDate-> 
VMRec#vm_profile_backup{last_update_date=ValueDate_UpDate}<BR>          end;<BR>        {"date_first",Date_First}-><BR>          case 
catch erlang:list_to_integer(Date_First) 
of<BR>           {'EXIT', 
_}-> 
VMRec#vm_profile_backup{first_creation_date=error};<BR>           %%{badarg,_}-><BR>           ValueDate_First-> 
VMRec#vm_profile_backup{first_creation_date=ValueDate_First}<BR>          end;<BR>        {"fax",FNo}->VMRec#vm_profile_backup{fax_no=FNo};<BR>        Other->VMRec<BR>       end<BR>   
   end,<BR>  NewRec=lists:foldl(Fun1,Rec,InData),</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>    if<BR>     
NewRec#vm_profile_backup.last_update_date == error; 
NewRec#vm_profile_backup.first_creation_date == error  
-><BR>       mod_esi:deliver(SessionID, 
"{error,invalid_number_[first_creation_date_OR_last_update_date]}");<BR>   
  NewRec#vm_profile_backup.mobile_no /= undefined, 
NewRec#vm_profile_backup.mobile_no /= [], 
NewRec#vm_profile_backup.last_update_date /= 
undefined,NewRec#vm_profile_backup.last_update_date /= [], 
NewRec#vm_profile_backup.first_creation_date /= undefined, 
NewRec#vm_profile_backup.first_creation_date /= []  
-><BR>    MobNo=NewRec#vm_profile_backup.mobile_no,<BR>    Prof_Det=NewRec#vm_profile_backup.prof_details,<BR>    if<BR>     NewRec#vm_profile_backup.type 
/= undefined, NewRec#vm_profile_backup.type /= [] -> 
<BR>       Type1=NewRec#vm_profile_backup.type;<BR>     true->Type1="0"<BR>    end,<BR>    Date_UpD=NewRec#vm_profile_backup.last_update_date,<BR>    Date_Fst=NewRec#vm_profile_backup.first_creation_date,<BR>    if<BR>     NewRec#vm_profile_backup.fax_no 
/= undefined, NewRec#vm_profile_backup.fax_no /= [] -> 
<BR>       FaxNo=NewRec#vm_profile_backup.fax_no;<BR>     true->FaxNo=" 
"<BR>    end,<BR>    
  mod_esi:deliver(SessionID, 
io_lib:format("~p",[gen_server:call(vm_prof_db_svr,{save_profile_record,{MobNo,Prof_Det,Type1,Date_UpD,Date_Fst,FaxNo}})]));<BR>     
true-><BR>      mod_esi:deliver(SessionID, 
"{error,no_mobile_no_OR_first_creation_date_OR_last_update_date}")<BR>    
end.<BR></FONT></DIV>
<DIV><FONT face=Arial size=2>-------------------------------------from 
vm_prof_db_svr.erl 
(gen_server)-------------------------------------------------------</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial 
size=2>handle_call({save_profile_record,{MobNo,Prof_Det,Type,Date_UpD,Date_Fst,FaxNo}}, 
_From, State) 
-><BR> Reply=vm_prof_db:save_profile_record({MobNo,Prof_Det,Type,Date_UpD,Date_Fst,FaxNo}),<BR> {reply, 
Reply, State};<BR></FONT></DIV>
<DIV><FONT face=Arial size=2>
<DIV><FONT face=Arial size=2>-----------------------------------------from 
vm_prof_db.erl-----------------------------------------------------------------------------------------</FONT></DIV></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial 
size=2>save_profile_record({MobNo,Prof_Det,Type,Date_UpD,Date_Fst,FaxNo})-><BR> Rec= 
#vm_profile_backup{mobile_no = MobNo, prof_details = Prof_Det, type=Type, 
last_update_date = Date_UpD, first_creation_date = Date_Fst, 
fax_no=FaxNo},<BR> save_record(profile_db,Rec).<BR></FONT></DIV>
<DIV><FONT face=Arial size=2>save_record(Db, Record) -><BR> Fun = fun() 
-><BR>   mnesia:write(Db, Record, 
write)<BR> end,<BR> transaction(Fun).</FONT></DIV>
<DIV><FONT face=Arial size=2> </DIV>
<DIV><FONT face=Arial 
size=2>--------------------------------------------------------------------------------------------------------------------------------------------------------------</DIV></FONT></FONT></BODY></HTML>