If you have large number of proxy users , for example over 50 , and you start to feel browsing is getting slower, also you see the following error in /var/log/squid/cache.log
WARNING! Your cache is running out of filedescriptors
WARNING! Your cache is running out of filedescriptors
it means Squid proxy server is running out of file descriptors and cannot handle the extra requests sent by your client computers. therefore you need to increase descriptors value.
Use the following command to see the current descriptors value
squidclient -p 8080 mgr:info | grep ‘file descri’
Result As showed in the image below . . .
As you can see current file descriptors are 1024. To increase this value, edit your squid.conf file by
nano /etc/squid/squid.conf
now add this line
max_filedesc 4096
now save and exit.
Now restart your squid service to apply the changes you made by
service squid restart
Now again use following command to see the descriptors value
squidclient -p 8080 mgr:info | grep ‘file descri’
and this time you will notice that file descriptors have increased.
Result As showed in the image below . . .
==========================
Also do the following
nano /etc/sysctl.conf
Add following line in starting
fs.file-max = 65535
Save & Exit.
Now run following command to update
systcl -p
Regard’s
Syed Jahanzaib


As’slaam-o-Alaikum
Shah gee can you please send me your Cell phone number for contact please
Regards
Muhammad Imran Khan
cell # 03137633665
imran_niazi_2004@hotmail.com
Comment by Muhammad Imran Khan — March 22, 2012 @ 10:48 PM
You can email me for any discussion and advise you may need
Comment by Syed Jahanzaib / Pinochio~:) — March 24, 2012 @ 4:18 PM
Sir,
I’m recently working on Internet providing through Cable and Wirless Wifi . I’m using Mikrotik 3.22 as router with 40 clients including 15 on WiFi.
Sir,
1:- my network’s basic load is (YOU-TUBE) more than 18 clients open (YOU-TUBE) for same video and downloads.
that causes me more bandwidth download and increases my PTCL billing.
I’v used one of your blog about squid proxy server config and LUSCA/Squid also and checked them both it works fine but after power failure it doesn’t.second I’m not able to connect Squid to Mikrotik to bypass Request coming from clients.
2:- Can you please brief me about CC-PROXY server and how I can Redirect all request from Mikrotik to CC-PROXY in Transparent mode
Can you please send me complete set-up Config to solve my problem
Regard,
Muhammad Imran Khan
imran_niazi_2004@hotmail.com
Comment by Muhammad Imran Khan — April 4, 2012 @ 10:12 PM
# If configuration is getting lost (Which I don’t know why its happening, as it never happened with me) , try to cache you-tube using SQUID method as follow:
http://aacable.wordpress.com/2012/01/19/youtube-caching-with-squid-2-7-using-storeurl-pl/
# I have no experience with CC proxy, as its not a standard solution.
Comment by Syed Jahanzaib / Pinochio~:) — April 5, 2012 @ 8:55 AM
Thanks for Replying Sir,
Sir can you tell about you residence and City
Are you from Lahore
Regards
Muhammad Imran Khan
0313-7633665
Comment by Muhammad Imran Khan — April 14, 2012 @ 9:29 PM
I have over 1500 concurrent user…..can you please let me know what hardware configuration will match these number of user if i want to use squid/ Lusca Youtube caching ?Can u advise me what number of file descriptors will use in this scenario ?
Any suggestion will be very gladly appropriated .
Comment by Ferdous hasan — March 24, 2012 @ 10:36 AM
or…you can modified the init script into some kind like this
#
# Try to increase the # of filedescriptors we can open.
#
maxfds () {
[ -n "$SQUID_MAXFD" ] || return
[ -f /proc/sys/fs/file-max ] || return 0
global_file_max=`cat /proc/sys/fs/file-max`
minimal_file_max=$(($SQUID_MAXFD + 65536))
if [ "$global_file_max" -lt $minimal_file_max ]
then
echo $minimal_file_max > /proc/sys/fs/file-max
fi
ulimit -n $SQUID_MAXFD
}
put it above start script….
and change 65536 into some number that fit inb your networks
regards from indonesia…
Comment by Metromini KasKus — June 21, 2012 @ 1:46 PM
Thanks for the tip!
Comment by Syed Jahanzaib / Pinochio~:) — June 21, 2012 @ 4:12 PM