----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files.  Don't make us guess your problem!!!
----------------------------------------------------------------

I will take the liberty to answer my own question.  The problem was with
the test client, not with JServ itself.  Since testing was done from a
windows machine, and Wininet only handles 2 (!) simultaneous HTTP 1.1
connections, we got the result we did...  With ab we got the performance
we expected.

/Mårten

Mårten Larsson wrote:
 
> I am using JServ 1.0 with Stronghold 2.4.2 on a Solaris 2.7 machine.  I
> have written a very simple servlet as follows.  It just waits for five
> seconds and then returns, and it logs when it enters and when it
> leaves.  When I make several concurrent requests, JServ only seems to be
> able to execute two instances simultaneously, although more are "in the
> queue".  I am using the default configuration, although I have
> experimented with different settings. Any ideas of what the problem
> could be?
> 
> Mårten Larsson
> 
> -----
> 
> import java.io.IOException;
> 
> import javax.servlet.*;
> import javax.servlet.http.*;
> import java.io.*;
> import java.util.*;
> 
> public class JServTest extends HttpServlet
> {
>     private static String LOG_FILE_NAME = "/tmp/jserv_test_log";
>     private static PrintWriter log;
> 
>     static {
>         try {
>             log = new PrintWriter(new FileOutputStream(LOG_FILE_NAME));
>         } catch (IOException e) {
>             e.printStackTrace();
>         }
>     }
> 
>     public void doGet (HttpServletRequest req, HttpServletResponse res)
> throws ServletException, IOException
>     {
>         HttpSession session = req.getSession(true);
>         String sessionID = session.getId();
>         log.println("Running...."+new Date().toString()+" "+sessionID);
>         res.setContentType("text/html");
>         PrintWriter out = res.getWriter();
>         out.println("Run "+sessionID);
>         try {
>             Thread.sleep(5000);
>         } catch (Exception e) {
>         }
>         log.println("Ready..."+new Date().toString()+" "+sessionID);
>         log.flush();
>         session.invalidate();
>     }
> }
> 
> --
> --------------------------------------------------------------
> 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]


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