Erlang/OTP Forums

Author Message

<  Yaws mailing list  ~  Yaws and stopped downloads

Guest
Posted: Fri Nov 10, 2006 10:56 pm Reply with quote
Guest
Mickael Remond wrote:
> I noticed that Yaws generate an error when I click on a link to a big
> binary files and, when the web browser ask me what I want to do with
> the file (Save or Open), I click on "Cancel". In this particular case,
> Yaws generate the following error:
>
> =ERROR REPORT==== 10-Jul-2005::21:59:08 ===
> yaws:Failed to send 10240 bytes:
> [59,
> ...snip...
> 46] on socket #Port<0.289>: {error,einval}
> "#Bin(10240)"
>
> =ERROR REPORT==== 10-Jul-2005::21:59:08 ===
> Yaws process died: {{error,einval},
> [{yaws,gen_tcp_send,2},
> {yaws_server,send_streamcontent_chunk,3},
> {yaws_server,send_file,3},
> {yaws_server,deliver_large_file,4},
> {yaws_server,aloop,3},
> {yaws_server,acceptor0,2},
> {proc_lib,init_p,5}]}
>
> I am not sure what should be the correct behaviour, but generating an
> error in the log is frightening for the Web server administrator. The
> error is caused by an interrupted download on the client side and can
> happen frequently.

[...]

Claes Wikstrom wrote:
> This is perfectly ok, it just means that yaws failed to send all the data
> to the other end because the other closed it's side of the socket.
> Maybe it shouldn't even end up in the error log at all.

Following up on an old message in the archives here, but this same
error had me pretty confused for awhile, until I found this thread.
In my mind "error" is synonymous with abnormal behavior, and
indicative of a problem, especially coupled with terms like "process
died". Smile

So, perhaps just another vote to not write this particular condition
to report.log.


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post recived from mailinglist
Guest
Posted: Sun Nov 12, 2006 1:04 am Reply with quote
Guest
Jason R. Mastaler wrote:
> Mickael Remond wrote:
>> I noticed that Yaws generate an error when I click on a link to a big
>> binary files and, when the web browser ask me what I want to do with
>> the file (Save or Open), I click on "Cancel". In this particular case,
>> Yaws generate the following error:
>>
>> =ERROR REPORT==== 10-Jul-2005::21:59:08 ===
>> yaws:Failed to send 10240 bytes:
>> [59,
>> ...snip...
>> 46] on socket #Port<0.289>: {error,einval}
>> "#Bin(10240)"
>>
>> =ERROR REPORT==== 10-Jul-2005::21:59:08 ===
>> Yaws process died: {{error,einval},
>> [{yaws,gen_tcp_send,2},
>> {yaws_server,send_streamcontent_chunk,3},
>> {yaws_server,send_file,3},
>> {yaws_server,deliver_large_file,4},
>> {yaws_server,aloop,3},
>> {yaws_server,acceptor0,2},
>> {proc_lib,init_p,5}]}
>>
>> I am not sure what should be the correct behaviour, but generating an
>> {errorerror in the log is frightening for the Web server administrator. The
>> error is caused by an interrupted download on the client side and can
>> happen frequently.



Uhhh look at the code in yaws_server.erl which is supposed to handle this
...
case Res of
{ok, Int} when integer(Int) ->
Top ! {self(), done_client, Int};
{'EXIT', normal} ->
exit(normal);
{'EXIT', {error, einval}} ->
%% Typically clients that close their end of the socket
%% don't log. Happens all the time.
exit(normal);
{'EXIT', Reason} ->
error_logger:error_msg("Yaws process died: ~p~n",
[Reason]),
exit(normal)
end,




So much for backwards compatibility in OTP ... Not (as Borat the kazak,
would have said)

fixed in CVS version now.

/klacke



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post recived from mailinglist

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