Squid fault and solution summary

Source: Internet
Author: User
1. COSSwillnotfunctionwithoutlargefilesupport (off_tis4byteslong.Pleasereconsiderrecompilingsquidwith -- with-large-filesBungledsquid_webcache.conf ......... 1. COSS will not function without large file support (off_t is 4 bytes long. Please reconsider recompiling squid with -- with-large-files
 
Bungled squid_webcache.conf .......
Check whether the -- with-large-files option is not added when compiling squid. If yes, add this option again and compile squid again.
2. when coss cache format is used, squid constantly reconstructs the cache
The possible cause is that the maxfullbufs value is too low. remove the maxfullbufs restriction and set the value to unlimited.
3. the log contains the following content:
 
14:46:56 | Ready to serve requests.
14:46:59 | clientReadRequest: FD 11 (192.168.1.5: 34061) Invalid Request
 
Illegal character in hostname; underscores are not allowed
 
Note: invalid string. underlines are not allowed in the access address.
Solution:
Add the following parameters during compilation in squid 2.5:
-- Enable-underscore
 
The URL that can be parsed contains underscores (_). by default, squid considers the underlined URL address invalid and rejects access to the address.
For version 2.6, this parameter is not provided during compilation. this parameter appears in the configuration document of squid. conf, which indicates that:
Allow_underscore New option to allow _ in hostnames, replacing the similar build time configure option in 2.5 and earlier.
For specific parameters in squid. conf, you can search for allow_underscore in the configuration document and view the specific notes in the configuration document.
4. the cache. log of squid is similar to the following warning:
WARNING: 100 swapin MD5 mismatches
 
This error indicates that when squid reads a cached file, the URL stored in the interface is not
Squid thinks the data should be stored there. This may be because a swap. state error occurs or the file is directed to the disk.
Block (file system error ).
Stop the squid application, delete swap. state, and then start squid so that it can rebuild the cache by reading the cached file.
Record, if the above problem still occurs after reconstruction, it should be a problem with the file system or disk.
 
5. the following warning appears in the log:
Jun 28 11:14:38 localhost squid [27178]: squidaio_queue_request: Syncing pending I/O operations... (blocking)
Jun 28 11:14:59 localhost squid [27178]: squidaio_queue_request: Synced
Jun 28 11:14:59 localhost squid [27178]: storeAufsOpenDone: (2) No such file or directory
Jun 28 11:14:59 localhost squid [27178]:/data/squid/cache_webcache1/00/6 B/ipv6b29
Jun 28 11:14:59 localhost squid [27178]: storeAufsOpenDone: (2) No such file or directory
Jun 28 11:14:59 localhost squid [27178]:/data/squid/cache_webcache1/00/DC/0000DC36
Jun 28 11:14:59 localhost squid [27178]: WARNING: 1 swapin MD5 mismatches
Jun 28 11:14:59 localhost squid [27178]: WARNING: Disk space over limit: 18925740 KB> 16777216 KB
Jun 28 11:14:59 localhost squid [27178]: storeAufsOpenDone: (2) No such file or directory
Jun 28 11:14:59 localhost squid [27178]:/data/squid/cache_webcache2/00/92/2017924f
Jun 28 11:14:59 localhost squid [27178]: storeAufsOpenDone: (2) No such file or directory
Jun 28 11:14:59 localhost squid [27178]:/data/squid/cache_webcache1/03/6 F/00036FB6
Jun 28 11:14:59 localhost squid [27178]: squidaio_queue_request: Async request queue growing uncontrollably!
 
Solution:
Check the configuration file and set the cache to the aufs file system format. change this setting to ufs and recreate the cache directory.
 
6. squid: ERROR: no running copy
The reason is that the pid file cannot be found, if the default squid is not used. conf is used as the squid setting file. when you use sbin/squid in the squid directory to perform restart and other actions, you must add the-f parameter to the configuration file and check whether the pid file exists, sometimes the pid file may be incorrectly configured to a non-existent directory, or the pid file may be configured to a directory that the application has no permission to write, resulting in no pid file created. if the pid file does not exist, you can manually create the pid, then obtain the squid pid and write the pid file.
 
7. squid responds very slowly under high pressure
 
Check whether the file descriptor is too small. If yes, adjust the file descriptor limit, restart squid, and check the file descriptor run by squid. if it is adjusted, add the command to adjust the file descriptor at the place where squid is started in the startup script. Otherwise, you must adjust the file descriptor limit and re-compile and install squid once.
 
8. the cache efficiency is reduced. no error is reported when viewing logs. netstat-na checks that many connections are SYN_RE and most of them are connections from the same IP address.
Optimize the TCP network
Echo 1>/proc/sys/net/ipv4/tcp_syncookies
Echo 1>/proc/sys/net/ipv4/tcp_synack_retries
Echo 1>/proc/sys/net/ipv4/tcp_syn_retries
 
9. the cache efficiency is low, and the network card input/output traffic gap is small.
First, check the system log for squid errors. If no dmesg is displayed, check whether there are packet loss or Nic problems. If no, check the gateway.
When squid is used, the Gateway has a major problem. if The Gateway is not correctly configured, the user may not be able to access it.
10. the following error is reported in the log: squid: cocould not determine fully qualified hostname. Please set 'visible _ hostname'
Check the/etc/hosts file,/etc/sysconfig/network file, and the hostname command result to check whether the three correspond. if they do not match, modify them to correspond, the corresponding configuration in the/etc/hosts file also needs to have a valid domain name format
Hostname in/etc/sysconfig/network is the hostname value loaded when the system starts. if this value does not match the value in the/etc/hosts file and the visible_hostname option is not set in squid, after the system is restarted, squid cannot start properly.
 
11. the following error is reported in a large number of logs:
Apr 29 08:28:56 localhost squid [13851]: httpReadReply: Excess data from "HEAD http: // 192.168.230.1 /"
Apr 29 08:28:56 localhost squid [13851]: httpReadReply: Excess data from "HEAD http: // 192.168.230.1 /"
 
This indicates that the server returns a return value that exceeds the maximum value of the response object declared by squid.
It violates the HTTP protocol and causes server return to be truncated.
 
From clown notes
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.