https://redmine.lighttpd.net/https://redmine.lighttpd.net/favicon.ico?13667327412007-01-22T17:06:40Zlighty labsLighttpd - Bug #987: error:network_freebsd_sendfile.c.175https://redmine.lighttpd.net/issues/987?journal_id=23722007-01-22T17:06:40Zdarix
<ul></ul><p>so dont use sendfile if the underlying FS does not support it.<br />it is runtime configurable setting.</p>
<p><a class="external" href="http://trac.lighttpd.net/trac/wiki/server.network-backendDetails">http://trac.lighttpd.net/trac/wiki/server.network-backendDetails</a></p>
<p>you have to use writev than.</p> Lighttpd - Bug #987: error:network_freebsd_sendfile.c.175https://redmine.lighttpd.net/issues/987?journal_id=23732008-05-27T19:08:09ZAnonymous
<ul></ul><p>It's the server's job to switch as necessary. It's terrible to require this to be configured manually, when there's a clear, explicit error return from the syscall that can be used to detect it.</p> Lighttpd - Bug #987: error:network_freebsd_sendfile.c.175https://redmine.lighttpd.net/issues/987?journal_id=87902016-02-15T06:11:42Zgstrauss
<ul></ul><p>This is a very old ticket, but is marked High Priority.</p>
<p>On some systems, some filesystems support sendfile() and some do not. If lighttpd is configured to use sendfile() as the backend -- which is a global setting in lighttpd and not configurable per filesystem -- it would be nice if lighttpd could fall back to write() if sendfile() failed with EOPNOTSUPP. (feature request)</p>
<p>Please downgrade priority and mark this ticket as Feature Request.</p>
<p>This ticket should not be High Priority (and a 7-year-old ticket obviously wasn't :)) since there is a simple workaround: if you need to serve some files from a filesystem that does not support sendfile(), then do not use the freedbsd sendfile network backend in lighttpd.conf.</p> Lighttpd - Bug #987: error:network_freebsd_sendfile.c.175https://redmine.lighttpd.net/issues/987?journal_id=88122016-02-19T16:36:24Zstbuehler
<ul><li><strong>Description</strong> updated (<a title="View differences" href="/journals/8812/diff?detail_id=6820">diff</a>)</li><li><strong>Status</strong> changed from <i>New</i> to <i>Wontfix</i></li><li><strong>Assignee</strong> deleted (<del><i>jan</i></del>)</li><li><strong>Priority</strong> changed from <i>High</i> to <i>Normal</i></li></ul><p>Fallback on syscalls sounds unnecessary expensive, I don't think we should support this.</p> Lighttpd - Bug #987: error:network_freebsd_sendfile.c.175https://redmine.lighttpd.net/issues/987?journal_id=93462016-04-11T09:48:47Zgstrauss
<ul><li><strong>Is duplicate of</strong> <i><a class="issue tracker-1 status-5 priority-3 priority-lowest closed" href="/issues/471">Bug #471</a>: sendfile backends do not fall back to write/writev if they are not supported by the kernel</i> added</li></ul> Lighttpd - Bug #987: error:network_freebsd_sendfile.c.175https://redmine.lighttpd.net/issues/987?journal_id=94142016-04-18T07:17:15Zgstrauss
<ul><li><strong>Status</strong> changed from <i>Wontfix</i> to <i>Patch Pending</i></li><li><strong>Target version</strong> set to <i>1.4.40</i></li></ul><p>Submitted pull request <a class="external" href="https://github.com/lighttpd/lighttpd1.4/pull/58">https://github.com/lighttpd/lighttpd1.4/pull/58</a></p>
<p>An extra syscall each write is better than failure.</p>
<p>If someone changes the default backend, and then does not test to see if performance improves or degrades, then they will still have a working server. Anyone interested in performance should actually be measuring performance before and after tuning the settings.</p>
<p>This patch allows sendfile to be the chosen backend even if a smaller portion of requests fail with sendfile and fall back to write, e.g. the case in <a class="external" href="https://redmine.lighttpd.net/issues/471">https://redmine.lighttpd.net/issues/471</a> with large file uploads stored in tempfiles being sent to backend via unix domain sockets on (older?) versions of Solaris.</p> Lighttpd - Bug #987: error:network_freebsd_sendfile.c.175https://redmine.lighttpd.net/issues/987?journal_id=95512016-05-02T16:25:09Zgstrauss
<ul><li><strong>Status</strong> changed from <i>Patch Pending</i> to <i>Fixed</i></li></ul><p>Applied in changeset <a class="changeset" title="[core] fallback to write if sendfile not supported (fixes #471, #987) x-ref: "sendfile backend..." href="https://redmine.lighttpd.net/projects/lighttpd/repository/14/revisions/c46f0ce027155924a53bf12cb306b3afb77bbd65">c46f0ce027155924a53bf12cb306b3afb77bbd65</a>.</p>