darold / squidanalyzer

Squid Analyzer parses Squid proxy access log and reports general statistics about hits, bytes, users, networks, top URLs, and top second level domains. Statistic reports are oriented toward user and bandwidth control.
http://squidanalyzer.darold.net/
125 stars 36 forks source link

Default DNS timeout value is misconfigured (or explanation is wrong) #213

Closed mysterfr closed 3 years ago

mysterfr commented 4 years ago

Hello,

Great project, and more visually appealing than LightSquid 👍

In the configuration file, DNSLookupTimeout is set to 0.0001 and comment states this means 100ms. This is wrong.

100ms = 0.100s

When you set 0.0001 it actually means 100 µs (microsecond). (equals to 0.1ms)

This is way too short and makes DNS resolution systematically fail. Setting must then be adjusted to

DNSLookupTimeout=0.1

(see table at the bottom of this page if the above isn't clear http://www.sengpielaudio.com/calculator-millisecond.htm)

darold commented 3 years ago

Good catch. This part was totally confuse to simplify I have change the unit to use for DNSLookupTimeout now it must be set in milliseconds. Commit d42f108 fix that.

When updating be warned that this break the backward compatibility with old configuration files.