WEB UI is very unresponsive - one possible solution: no keepalive?
-
hi,
i just set up a new pfsense instance, and had very big issues with the web ui becoming unresponsive. i've read a couple of comments about this, and some mentioned DNS issues as a possible reason. i did have some DNS issues, soi was off in that direction … turns out, the issue lay in something completely different:
i had "Advanced -> Networking -> Reset all states if WAN IP Address changes" and "Advanced -> Miscellaneous -> Flush all states when a gateway goes down" both turned ON, and it seems it did flush the states much more often then i anticipated. on the other hand, the web ui always sends a "connection: keepalive" header, so the state of the connection was dropped, but my browser didn't really know about that. so it tried to perform more requests on that connection - no cigar.
i had a go at finding the config templates that build /var/etc/nginx-webConfigurator.conf ... but no luck so far. is there any really important reason why this is on? i am aware that having keepalive is probably helping a little bit in a lot of cases, but the possible failures are so weird and annoying and uncomprehensible that i would rather have it off ... :-\
does anyone have thoughts on this?
.rm
-
based on https://forum.pfsense.org/index.php?topic=144026.0 i changed:
/etc/inc/system.inc
if ($captive_portal !== false) { $nginx_config .= "\tlimit_conn_zone \$binary_remote_addr zone=addr:10m;\n"; $nginx_config .= "\tkeepalive_timeout 0;\n"; } else { $nginx_config .= "\tkeepalive_timeout 75;\n"; <--------- 75s }
to this:
if ($captive_portal !== false) { $nginx_config .= "\tlimit_conn_zone \$binary_remote_addr zone=addr:10m;\n"; $nginx_config .= "\tkeepalive_timeout 0;\n"; } else { $nginx_config .= "\tkeepalive_timeout 0;\n"; <------------ changed to 0s }
and it seems to do the trick?