Issues you may come across while configuring and using squid cache and possible solutions


1. PHP Warning:  PHP Startup: memcache: Unable to initialize module
The issue is with the PHP version and memcache version mismatch. Install memcache   
using following command.
pecl install memcache

2.  Error: Too few url_rewriter processes are running.
Verify following:
i)   php cli is installed.
ii)  make sure that "squid"(you can find the user name in squid.conf) user has permissions to  
     write and execute for redirect program (ex: redirect.php).
iii) update permissions for squid user /var/spool/squid/ if problem persists.

3. diskHandleWrite: FD : disk write error: () Disk quota exceeded.
Either try to delete crash reports such as "core.15" from /var/spool/squid or increase the disk
quota for the user or turnoff quotas in the worst case.

4. Too few url_rewriter processes are running
By default the number of url_rewriters in squid is 5 and the concurrency is set to 0. Increase the number of url_rewriters by adding following line in squid.conf usually found in /etc/squid/ directory.
url_rewrite_children 20 startup=2 idle=5 concurrency=2
url_rewrite_children - The maximum number of redirector processes to spawn. It can be
                                increased based on RAM and system capabilities.
startup - Number of processes to spawn when squid starts.
idle - Minimum number of processes squid tries to keep available at all times.
concurrency - The number of requests each redirector helper can handle in parallel.

5. WARNING: url_rewriter # (FD ) exited
Edit php.ini file, there may be multiple php.ini files edit the one which your web server(for which squid is configured) is using and increase the socket timeout in php.ini (usually /etc/php.ini) file as below. By default timeout is 60 secs. You can disable timeout by setting value to -1.
; Default timeout for socket based streams (seconds)
default_socket_timeout = 100

No comments:

Post a Comment

Please leave a comment related to the post.