-----------------------------
Please read the FAQ!
<http://java.apache.org/faq/>
-----------------------------
Ludovic Bailly wrote:
> Jean-Luc Rochat wrote:
>
> > Ludovic Bailly wrote:
> >
> > > When one of the JServ doesn't respond, if y make a reload then it works
> > > assuming the query goes to a JServ which is working.
> > > If I wait for a response, I get a message like : "document contains no data"
> >
> > timeout (default=300 sec) between apache & jserv maybe ?
> >
> > > I have to kill the JServ and run it again, then mod_jserv find it and use it
> > > when load balancing.
> > > But It seems that mod_jserv doesn't detect that a JServ is down and continue
> > > to send requests to it.
> >
> > probably, it's not down, it's busy. and if the server is still alive,
> > the watchdog process could put it back alive in < 10 seconds.
>
> What do you mean by busy ?
> The server seems to be alive (telnet is ok) and it never get back !
>
> > > You said that telnet is not sufficient to know if a JServ engine is
> > > "completly" up,
> > > what is the right way to know it ?
> >
> > examine the logs
> > hit a helloworld servlet
>
> I've just try this :
>
> import java.io.*;
> import javax.servlet.*;
> import javax.servlet.http.*;
>
> public class CountHit extends HttpServlet {
> static int i=0;
>
> public void init(ServletConfig config) throws ServletException {
> super.init(config);
> }
>
> public void doPost (HttpServletRequest Request, HttpServletResponse Response)
> throws ServletException, IOException {
> doGet(Request, Response);
> }
>
> public void doGet (HttpServletRequest Request, HttpServletResponse Response)
> throws ServletException, IOException {
> char[] C = new char[1024 * 20];
> PrintWriter out = Response.getWriter();
> Response.setContentType("text/html");
> i++;
> out.print("<html><head>");
> out.print("<META HTTP-EQUIV=\"Pragma\" CONTENT=\"no cache\">");
> out.print("</head><body>");
> out.print("Remote Adresse : "+Request.getRemoteAddr()+" <br>");
> out.print(" nb hit "+i+"<br>");
> out.print(C);
> out.print("</body></html>");
> out.close();
> System.err.println("CountHit : " + i);
> }
> }
just remember i is updated at the same time by n threads, so you can get
funny results.
>
> and run ab -n 1500 -c 500 http://xxx/yyy/CountHit
I don't rember ab was able to do > ~120 concurrent threads (fd/ process
limit ?).
and Apache (except if hacked(one variable, little hack) & recompiled) is
limited to 254 sub-process. So you'll maybe have a queue.
> I've two computers :
> one bi P3 450 and one P3 450 (running apache)
> during the test with ab, I get one JServ busy
> if I try a new test, the JServ which was busy doesn't respond
> It seems to be done forever ...
I think that you maybe exceeded the processes capacity. Does the gc get
spare time to start ?
What's you heap size ? the answer is maybe here, do you knnow (option
-verbosegc) if the gc starts ?
What do you find in logs ?
If you can't find annything, what about testing it whith another jvm ?
the blackdown 1.1.7 is maybe less buggy, or IBM's ...
or try Solaris. ;-) Lots of people think it's the most stable, and so do
I.
Jean-Luc
--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/main/mail.html>
Problems?: [EMAIL PROTECTED]