File: FAQ-13.html

package info (click to toggle)
squid 1.1.21-1
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 2,828 kB
  • ctags: 3,705
  • sloc: ansic: 34,400; sh: 1,975; perl: 899; makefile: 559
file content (120 lines) | stat: -rw-r--r-- 3,703 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<HTML>
<HEAD>
<TITLE>SQUID Frequently Asked Questions: System-Dependent Wierdnesses</TITLE>
</HEAD>
<BODY>
<A HREF="FAQ-12.html">Previous</A>
<A HREF="FAQ-14.html">Next</A>
<A HREF="FAQ.html#toc13">Table of Contents</A>
<HR>
<H2><A NAME="s13">13. System-Dependent Wierdnesses</A></H2>

<H2><A NAME="ss13.1">13.1 Solaris</A></H2>

<H3>select()</H3>

<P><EM>select(2)</EM> won't handle more than 1024 file descriptors.  Compile with <EM>-DUSE_POLL</EM>
if you need more than 1024 descriptors.</P>

<H3>malloc</H3>

<P>libmalloc.a is leaky.  Squid's configure does not use -lmalloc on Solaris.</P>

<H3>DNS lookups and <EM>nscd</EM></H3>

<P>by 
<A HREF="mailto:david@avarice.nepean.uws.edu.au">David J N Begley</A>.</P>
<P>DNS lookups can be slow because of some mysterious thing called
<B>ncsd</B>.  You should edit <EM>/etc/nscd.conf</EM> and make it say:
<PRE>
        enable-cache            hosts           no
</PRE>
</P>
<P>Apparently nscd serialises DNS queries thus slowing everything down when
an application (such as Squid) hits the resolver hard.  You may notice
something similar if you run a log processor executing many DNS resolver
queries - the resolver starts to slow.. right.. down.. .  .   .</P>

<H3>DNS lookups and <EM>/etc/nsswitch.conf</EM></H3>

<P>by 
<A HREF="mailto:ARMISTEJ@oeca.otis.com">Jason Armistead</A>.</P>
<P>The <EM>/etc/nsswitch.conf</EM> file determines the order of searches
for lookups (amongst other things).  You might only have it set up to
allow NIS and HOSTS files to work.  You definately want the "hosts:"
line to include the word <EM>dns</EM>, e.g.:
<PRE>
        hosts:      nis dns [NOTFOUND=return] files 
</PRE>
</P>


<H2><A NAME="ss13.2">13.2 FreeBSD</A></H2>

<H3>T/TCP bugs</H3>

<P>We have found that with FreeBSD-2.2.2-RELEASE, there some bugs with T/TCP. FreeBSD will
try to use T/TCP if you've enabled the ``TCP Extensions.''  To disable T/TCP,
use <EM>sysinstall</EM> and disable TCP Extensions, or add this to your /etc/rc files:
<PRE>
        sysctl -w net.inet.tcp.rfc1644=0
</PRE>
</P>




<H2><A NAME="ss13.3">13.3 OSF1/3.2</A></H2>


<H2><A NAME="ss13.4">13.4 BSD/OS</A></H2>

<H3>gcc/yacc</H3>

<P>If you get ``yacc'' errors, you need to upgrade your GCC installation to
a more recent version, at least 2.7.2.</P>


<H2><A NAME="ss13.5">13.5 Linux</A></H2>

<H3>Cannot bind socket FD 5 to 127.0.0.1:0: (49) Can't assign requested address</H3>

<P>Try a different version of Linux.  We have recieved many reports of this
``bug'' from people running Linux 2.0.30.  The <EM>bind(2)</EM> system
call should NEVER give this error when binding to port 0.</P>

<H3>FATAL: Don't run Squid as root, set 'cache_effective_user'!</H3>

<P>Some users have reported that setting <CODE>cache_effective_user</CODE>
to <CODE>nobody</CODE> under Linux does not work.
However, it appears that using any <CODE>cache_effective_user</CODE> other
than <CODE>nobody</CODE> will succeed.  One solution is to create a
user account for Squid and set <CODE>cache_effective_user</CODE> to that.
Alternately you can change the UID for the <CODE>nobody</CODE> account
from 65535 to 65534.</P>
<P>Another problem is that RedHat 5.0 Linux seems to have a broken
<EM>setresuid()</EM> function.  There are two ways to fix this.
Before running configure:
<PRE>
        % setenv ac_cv_func_setresuid no
        % ./configure ...
        % make clean
        % make install
</PRE>

Or after running configure, manually edit include/autoconf.h.in and
change the HAVE_SETRESUID line to:
<PRE>
        #define HAVE_SETRESUID 0
</PRE>
</P>




<HR>
<A HREF="FAQ-12.html">Previous</A>
<A HREF="FAQ-14.html">Next</A>
<A HREF="FAQ.html#toc13">Table of Contents</A>
</BODY>
</HTML>