Hi folks,

I know that my question is not directly related to webstack and OpenSolaris, 
but I thought that I'd give it a try here.

I compiled varnish (2.0.2 and 2.0.3) on Solaris 10 and I'm seeing some buggy 
behavior when using it. I also tried using your varnish IPS package on a open 
solaris box and I don't see the same problems there, so I wonder if you did 
something incorrectly and that is causing my problems.

Here is what I did:

1) I patched varnish to compile on Solaris:

diff -ur lib/libvarnish/num.c varnish-2.0.3-patched/lib/libvarnish/num.c
--- lib/libvarnish/num.c  Thu Feb 12 03:15:24 2009
+++ lib/libvarnish/num.c  Fri Feb 13 13:24:10 2009
@@ -54,7 +54,7 @@
                return (err_miss_num);
 
        fval = strtod(p, &end);
-       if (end == p || !isfinite(fval))
+       if (end == p || !finite(fval))
                return (err_invalid_num);
 
        if (*end == '\0') {

--- config.h.in    Fri Feb 13 16:38:45 2009
+++ config.h.in Fri Feb 13 14:25:47 2009
@@ -222,3 +222,10 @@
 
 /* Define to `unsigned int' if <sys/types.h> does not define. */
 /* #undef size_t */
+
+# ifndef NAN 
+# define NAN (0.0/0.0) 
+# endif
+
+# define __BEGIN_DECLS /* empty */
+# define __END_DECLS /* empty */ 

2) compiled and installed varnish
export PATH=$PATH:/usr/ccs/bin
VCC_CC="gcc -fPIC -O2 -shared -o %o %s" ./configure --prefix=/usr/varnish
make
make install

3) started varnish
/usr/varnish/sbin/varnishd -a 0.0.0.0:9999 -f myapp.vcl -T 0.0.0.0:9998 -t 300 
-s malloc,2G


Now when I access my app via varnish, I occasionally see 503 errors and 
requests hanging or taking long to execute.

I looked at the varnish logs as well as the webserver logs from my app and it 
seems that when the 503 error occurs, varnish doesn't even make a request to 
the backend and somehow thinks that the backend request failed and thus it 
returns 503.

As I said, I just tested webstack's varnish on a opensolaris box, with the same 
backend server and it works flawlessly.

Jyri, or someone else, can you please share how you compiled varnish for your 
package?

thanks,
Igor
-- 
This message posted from opensolaris.org

Reply via email to