-----------------------------
Please read the FAQ!
<http://java.apache.org/faq/>
-----------------------------

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);
    }
}

and run ab -n 1500 -c 500 http://xxx/yyy/CountHit
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 ...

    Thanks.


    Ludo.




--
--------------------------------------------------------------
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]

Reply via email to