[Building Sakai] Sakai load balancing (self fires requests like machne gun).
Ahmed Dini
asdini at hotmail.com
Sun Mar 22 10:24:32 PDT 2009
Thanks Aaron for the reply.
I am still having the problem, I thought I was using load balancing with sticky sessions enabled. Below is what I did so far.
In apache httpd.properties
I enabled:-
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
In this same file I also included:-
ProxyPass / balancer://sakaiCluster/ stickysession=JSESSIONID nofailover=On lbmethod=bytraffic
<Proxy balancer://sakaiCluster>
BalancerMember ajp://localhost:18009 route=tomcat1
BalancerMember ajp://localhost:28009 route=tomcat2
</Proxy>
<Location /manager>
SetHandler balancer-manager
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Location>
In the server.xml of tomcat1
<Server port="18005" shutdown="SHUTDOWN">
<!-- Define a non-SSL HTTP/1.1 Connector on port 8080 --> this might not be relevant but i just enabled
<Connector port="18080" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true" />
<Connector port="18009"
enableLookups="false" redirectPort="8443" protocol="AJP/1.3" />
<Engine name="Catalina" defaultHost="localhost" jvmRoute="tomcat1">
In the server.xml of tomcat2
<Server port="28005" shutdown="SHUTDOWN">
<Connector port="28080" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true" />
<Connector port="28009"
enableLookups="false" redirectPort="8443" protocol="AJP/1.3" />
<Engine name="Catalina" defaultHost="localhost" jvmRoute="tomcat2">
In addition to That I am also getting warning in the console of one of the tomcat instances.
WARN: run(): ghost-busting server: Bar Ama Baro-1237730244240 from : Bar Ama Baro 1237737377592 <2009-03-22 15:47, 35 SakaiClusterService.Mainatanance_org.Sakaiproject.cluster.impl.SakaiClusterService>
I also attached few lines from the apache/logs/Access produced from a single request in the browser. All I did, was type the url and hit enter. and it sent requests continuesly. I am thinking that this is all happening within second (please look at the time stamp).
[22/Mar/2009:16:47:28 +0000] "GET /portal/tool/!gateway-120?panel=Main HTTP/1.1" 200 678
[22/Mar/2009:16:47:28 +0000] "GET /portal/tool/!gateway-110?panel=Main HTTP/1.1" 200 678
[22/Mar/2009:16:47:28 +0000] "GET /portal HTTP/1.1" 200 7357
[22/Mar/2009:16:47:28 +0000] "GET /portal/tool/!gateway-110?panel=Main HTTP/1.1" 200 678
[22/Mar/2009:16:47:28 +0000] "GET /portal/tool/!gateway-120?panel=Main HTTP/1.1" 200 678
[22/Mar/2009:16:47:28 +0000] "GET /portal HTTP/1.1" 200 7357
[22/Mar/2009:16:47:28 +0000] "GET /portal/tool/!gateway-110?panel=Main HTTP/1.1" 200 678
[22/Mar/2009:16:47:28 +0000] "GET /portal/tool/!gateway-120?panel=Main HTTP/1.1" 200 678
[22/Mar/2009:16:47:28 +0000] "GET /portal HTTP/1.1" 200 7357
[22/Mar/2009:16:47:28 +0000] "GET /portal/tool/!gateway-120?panel=Main HTTP/1.1" 200 678
[22/Mar/2009:16:47:28 +0000] "GET /portal/tool/!gateway-110?panel=Main HTTP/1.1" 200 678
[22/Mar/2009:16:47:28 +0000] "GET /portal HTTP/1.1" 200 7357
[22/Mar/2009:16:47:28 +0000] "GET /portal/tool/!gateway-120?panel=Main HTTP/1.1" 200 678
[22/Mar/2009:16:47:28 +0000] "GET /portal/tool/!gateway-110?panel=Main HTTP/1.1" 200 678
[22/Mar/2009:16:47:28 +0000] "GET /portal HTTP/1.1" 200 7357
[22/Mar/2009:16:47:28 +0000] "GET /portal/tool/!gateway-110?panel=Main HTTP/1.1" 200 678
[22/Mar/2009:16:47:28 +0000] "GET /portal/tool/!gateway-120?panel=Main HTTP/1.1" 200 678
[22/Mar/2009:16:47:28 +0000] "GET /portal HTTP/1.1" 200 7357
[22/Mar/2009:16:47:28 +0000] "GET /portal/tool/!gateway-120?panel=Main HTTP/1.1" 200 678
[22/Mar/2009:16:47:28 +0000] "GET /portal/tool/!gateway-110?panel=Main HTTP/1.1" 200 678
[22/Mar/2009:16:47:28 +0000] "GET /portal HTTP/1.1" 200 7357
[22/Mar/2009:16:47:28 +0000] "GET /portal/tool/!gateway-120?panel=Main HTTP/1.1" 200 678
[22/Mar/2009:16:47:28 +0000] "GET /portal/tool/!gateway-110?panel=Main HTTP/1.1" 200 678
[22/Mar/2009:16:47:28 +0000] "GET /portal HTTP/1.1" 200 7357
> Date: Sun, 22 Mar 2009 08:32:14 +0000
> Subject: Re: [Building Sakai] Sakai load balancing (self fires requests like machne gun).
> From: aaronz at vt.edu
> To: asdini at hotmail.com
> CC: sakai-dev at collab.sakaiproject.org
>
> Sounds like you are using a round-robin strategy when you need to be
> using a sticky-session strategy for load balancing. Try that and see
> if it fixes it.
> -AZ
>
>
> On Sun, Mar 22, 2009 at 5:27 AM, Ahmed Dini <asdini at hotmail.com> wrote:
> > Hello, Everybody,
> >
> >
> >
> > I have finished integrating Apache with tomcat. I have two instances of
> > Tomcat running on my machine and I am trying to load balance the two
> > instances using mod_proxy_ajp.
> >
> >
> >
> > The problem is, if I run one instance of tomcat, everything works fine. But
> > when I run the second tomcat and access it through
> > http://localhost/ apache's url, the gateway page of Sakai starts flushing as
> > if it is firing requesting like a machine gun to apache. I can't click on
> > any link because it is flushing so fast.
> >
> > To see if the problem has something to do with my load balancing, I have
> > placed two static index.html files in the Webapp/ROOT directories of both
> > tomcat instances, but, it worked fined. it doesn't flush this time, and
> > every time I refresh manually it shows the index pages in turns. My guess of
> > the problem is that my sakai load balancing settings are not correct, but i
> > don't know where i can set them. I could not find any thing in the
> > sakai.properties file. Remeber if I shutdown one of the tomcat instances the
> > remaining one works, both will work, it doesn't matter which one I close.
> >
> >
> >
> > I have tried all versions of tomcat, 5.5.26 and 5.5.27 with both sakai 2.5.4
> > and 2.6.0-beta-3.
> >
> >
> >
> > Please Help.
> > ________________________________
> > Windows Live just got better. Find out more!
> > _______________________________________________
> > sakai-dev mailing list
> > sakai-dev at collab.sakaiproject.org
> > http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
> >
> > TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org
> > with a subject of "unsubscribe"
> >
> >
>
>
>
> --
> Aaron Zeckoski (aaronz at vt.edu)
> Senior Research Engineer - CARET - Cambridge University
> [http://bugs.sakaiproject.org/confluence/display/~aaronz/]
> Sakai Fellow - [http://aaronz-sakai.blogspot.com/]
_________________________________________________________________
25GB of FREE Online Storage – Find out more
http://clk.atdmt.com/UKM/go/134665320/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20090322/507902b5/attachment-0001.html
More information about the sakai-dev
mailing list