nginx: sendfile gets periodically disabled in main config

Started by dinguz, December 27, 2024, 06:58:00 PM

Previous topic - Next topic
I have been playing around with nginx as a reverse proxy, and noticed something peculiar: every time I enable sendfile support in the main config page, it gets disabled automatically after some time. Is this expected behavior?
I have it enabled in the individual HTTP server entries as well.
In theory there is no difference between theory and practice. In practice there is.

January 01, 2025, 08:50:50 PM #1 Last Edit: January 01, 2025, 08:52:28 PM by dinguz Reason: clarification
I believe I have found the cause, in this file:

/usr/local/opnsense/mvc/app/controllers/OPNsense/Nginx/forms/settings.xml
this section is incorrect:

<field>
    <id>nginx.http.enabled</id>
    <label>Enable sendfile</label>
    <type>checkbox</type>
    <help>Enable sendfile support (faster).</help>
  </field>

it should read:

<field>
    <id>nginx.http.sendfile</id>
    <label>Enable sendfile</label>
    <type>checkbox</type>
    <help>Enable sendfile support (faster).</help>
  </field>

This naming mismatch causes the checkbox to be ineffective.
Would reporting it here be sufficient, or is official bug report in order?
In theory there is no difference between theory and practice. In practice there is.

Reporting it here is not guaranteed to reach any of the developers, although it frequently does. So best to create an issue on github.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

In theory there is no difference between theory and practice. In practice there is.