[erlang-questions] yaws 1.97

Claes Wikstrom <>
Sat Oct 19 13:09:53 CEST 2013


Hi all,

We're happy to announce Yaws 1.97

This release contains the usual mix of small improvements, generally
just making Yaws more and more of a rock solid web server.

Code on github,  https://github.com/klacke/yaws
Releases and relnotes on http://yaws.hyber.org

Important DOS note: The OTP file:sendfile is buggy, so all users of
send_file are susceptible to this.  If you use Yaws in production,
carefully ponder the text below.

Christopher Faulet worked this, and his excellent
checkin comment says


-------

Add the way to configure the version of sendfile method to use

Now, at compile time, we only check if sendfile
syscall and file:sendfile/5 are supported. Then,
dynamically, we can configure which version to use.

This can be done using the directive large_file_sendfile.
Supported values are:

      * erlang: if supported, use file:sendfile/5
      * yaws: if supported, use the Yaws sendfile linked-in driver
      * disable: do not use any sendfile method, but gen_tcp:send/2

     If an unsupported method is configured,
     we fall back on gen_tcp:send/2.

     file:sendfile/5 implementation is buggy (in R15 & R16).
     When async-threads are enabled, in efile driver,
     the tcp socket is set in blocking mode and the
     sendfile syscall is executed on an async-thread.
     So an unresponsive client could block it for a very long
     time and therefore block the async-thread.
     In this way, all async-threads could be easily blocked.
     So, by default, the use of sendfile is disable.



More information about the erlang-questions mailing list