<div dir="ltr">Thanks! <br><div><br></div><div>Regards,</div><div><br></div><div>Márcio Bacci</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Em dom., 5 de set. de 2021 às 15:25, Eliezer Croitoru <<a href="mailto:ngtech1ltd@gmail.com">ngtech1ltd@gmail.com</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div lang="EN-US" style="overflow-wrap: break-word;"><div class="gmail-m_-5965917568948289115WordSection1"><p class="MsoNormal">From:<u></u><u></u></p><p class="MsoNormal"><a href="https://serverfault.com/a/717273/227456" target="_blank">https://serverfault.com/a/717273/227456</a><u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal" style="background:white;vertical-align:baseline"><span style="font-size:10pt;color:rgb(35,38,41)">2<u></u><u></u></span></p><p class="MsoNormal" style="background:white;vertical-align:baseline"><span style="font-size:11.5pt;color:rgb(35,38,41)">The number of file descriptors is set in the systemd unit file. By default this is 16384, as you can see in </span><span style="font-size:10pt;color:rgb(35,38,41);border:1pt none windowtext;padding:0in">/usr/lib/systemd/system/squid.service</span><span style="font-size:11.5pt;color:rgb(35,38,41)">.<u></u><u></u></span></p><p class="MsoNormal" style="background:white;vertical-align:baseline"><span style="font-size:11.5pt;color:rgb(35,38,41)">To override this, create a locally overriding </span><span style="font-size:10pt;color:rgb(35,38,41);border:1pt none windowtext;padding:0in">/etc/systemd/system/squid.service</span><span style="font-size:11.5pt;color:rgb(35,38,41)"> which changes the amount of file descriptors. It should look something like this:<u></u><u></u></span></p><p class="MsoNormal" style="background:white;vertical-align:baseline"><span style="font-size:10pt;color:rgb(35,38,41);border:1pt none windowtext;padding:0in">.include /usr/lib/systemd/system/squid.service<u></u><u></u></span></p><p class="MsoNormal" style="background:white;vertical-align:baseline"><span style="font-size:10pt;color:rgb(35,38,41);border:1pt none windowtext;padding:0in"><u></u> <u></u></span></p><p class="MsoNormal" style="background:white;vertical-align:baseline"><span style="font-size:10pt;color:rgb(35,38,41);border:1pt none windowtext;padding:0in">[Service]<u></u><u></u></span></p><p class="MsoNormal" style="background:white;vertical-align:baseline"><span style="font-size:10pt;color:rgb(35,38,41);border:1pt none windowtext;padding:0in">LimitNOFILE=65536<u></u><u></u></span></p><p class="MsoNormal" style="background:white;vertical-align:baseline"><span style="font-size:11.5pt;color:rgb(35,38,41)">Do not edit the default file </span><span style="font-size:10pt;color:rgb(35,38,41);border:1pt none windowtext;padding:0in">/usr/lib/systemd/system/squid.service</span><span style="font-size:11.5pt;color:rgb(35,38,41)">, as it will be restored whenever the package is updated. That is why we put it in a local file to override defaults.<u></u><u></u></span></p><p class="MsoNormal" style="background:white;vertical-align:baseline"><span style="font-size:11.5pt;color:rgb(35,38,41)">After creating this file, tell systemd about it:<u></u><u></u></span></p><p class="MsoNormal" style="background:white;vertical-align:baseline"><span style="font-size:10pt;color:rgb(35,38,41);border:1pt none windowtext;padding:0in">systemctl daemon-reload<u></u><u></u></span></p><p class="MsoNormal" style="background:white;vertical-align:baseline"><span style="font-size:11.5pt;color:rgb(35,38,41)">and then restart squid.<u></u><u></u></span></p><p class="MsoNormal" style="background:white;vertical-align:baseline"><span style="font-size:10pt;color:rgb(35,38,41);border:1pt none windowtext;padding:0in">systemctl restart squid</span><span style="font-size:10pt;color:rgb(35,38,41)"><u></u><u></u></span></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Eliezer<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><u></u> <u></u></p><div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(225,225,225);padding:3pt 0in 0in"><p class="MsoNormal"><b>From:</b> NgTech LTD <<a href="mailto:ngtech1ltd@gmail.com" target="_blank">ngtech1ltd@gmail.com</a>> <br><b>Sent:</b> Tuesday, August 31, 2021 6:11 PM<br><b>To:</b> Marcio B. <<a href="mailto:marciobacci@gmail.com" target="_blank">marciobacci@gmail.com</a>><br><b>Cc:</b> Squid Users <<a href="mailto:squid-users@lists.squid-cache.org" target="_blank">squid-users@lists.squid-cache.org</a>><br><b>Subject:</b> Re: [squid-users] Squid performance issues<u></u><u></u></p></div><p class="MsoNormal"><u></u> <u></u></p><div><p class="MsoNormal">Hey Marcio,<u></u><u></u></p><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">You will need to add a systemd service file that extends the current one with more FileDescriptors.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">I cannot guide now I do hope to be able to write later.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">If anyone is able to help faster go ahead.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Eliezer<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div></div><p class="MsoNormal"><u></u> <u></u></p><div><div><p class="MsoNormal"><span lang="HE" dir="RTL">בתאריך יום ג׳, 31 באוג׳ 2021, 18:05, מאת</span><span dir="LTR"></span><span dir="LTR"></span><span dir="LTR"></span><span dir="LTR"></span> Marcio B. <span dir="RTL"></span><span dir="RTL"></span><span lang="HE" dir="RTL"><span dir="RTL"></span><span dir="RTL"></span>‏</span><span dir="LTR"></span><span dir="LTR"></span><span dir="LTR"></span><span dir="LTR"></span><<a href="mailto:marciobacci@gmail.com" target="_blank">marciobacci@gmail.com</a>>:<u></u><u></u></p></div><blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in"><div><p class="MsoNormal">Hi,<br><br>I implemented a Squid server in version 4.6 on Debian and tested it for about 40 days. However I put it into production today and Internet browsing was extremely slow.<br><br>In /var/log/syslog I'm getting the following messages:<br><br>Aug 31 11:29:19 srvproxy squid[4041]: WARNING! Your cache is running out of filedescriptors<br><br>Aug 31 11:29:35 srvproxy squid[4041]: WARNING! Your cache is running out of filedescriptors<br><br>Aug 31 11:29:51 srvproxy squid[4041]: WARNING! Your cache is running out of filedescriptors<br><br><br>I searched the Internet, but I only found very old information and referring files that don't exist on my Squid Server.<br><br>The only thing I did was add the following value to the /etc/security/limits.conf file:<br><br>*-nofile 65535<br><br>however this did not solve.<br><br>Does anyone have any idea how I could solve this problem?<u></u><u></u></p><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Regards,<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Márcio Bacci<u></u><u></u></p></div></div><p class="MsoNormal">_______________________________________________<br>squid-users mailing list<br><a href="mailto:squid-users@lists.squid-cache.org" target="_blank">squid-users@lists.squid-cache.org</a><br><a href="http://lists.squid-cache.org/listinfo/squid-users" target="_blank">http://lists.squid-cache.org/listinfo/squid-users</a><u></u><u></u></p></blockquote></div></div></div></blockquote></div>