You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Peter Chen <pe...@aicent.com> on 2009/12/10 09:31:35 UTC

About the http requests cache of Tomcat 5.5.26

Hi,

 

I first start the DB Mysql 5.0, then start Tomcat 5.5.26. The Tomcat can
connect to the DB correctly.

Then I start LoadRunner to send lots of HTTP request.

 

During the period, I killed the process of MYSQL, so the tomcat can't
connect to DB.  And threads of processing HTTP requests have to wait.

 

In all, I emulate 300 users with the help of LoadRunner, and I finish
sending HTTP request in 5 minutes. 

 

I am watching the log of Tomcat.  I found after 20 minutes, the Tomcat
still create lots of new sessions. But the LoadRunner has stopped to
send request for 15 minutes.

 

Why? . And how many HTTP requests can the Tomcat put in cache? Thanks.

 


Re: About the http requests cache of Tomcat 5.5.26

Posted by Pid <pi...@pidster.com>.
On 10/12/2009 08:31, Peter Chen wrote:
> Hi,
>
>
>
> I first start the DB Mysql 5.0, then start Tomcat 5.5.26. The Tomcat can
> connect to the DB correctly.
>
> Then I start LoadRunner to send lots of HTTP request.
>
>
>
> During the period, I killed the process of MYSQL, so the tomcat can't
> connect to DB.  And threads of processing HTTP requests have to wait.
>
>
>
> In all, I emulate 300 users with the help of LoadRunner, and I finish
> sending HTTP request in 5 minutes.
>
>
>
> I am watching the log of Tomcat.  I found after 20 minutes, the Tomcat
> still create lots of new sessions. But the LoadRunner has stopped to
> send request for 15 minutes.

Maybe your disk is slow and the log is still catching up.


p

> Why? . And how many HTTP requests can the Tomcat put in cache? Thanks.
>
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: About the http requests cache of Tomcat 5.5.26

Posted by "Looijmans, Mike" <mi...@oce.com>.
 
> > I am watching the log of Tomcat.  I found after 20 minutes, 
> the Tomcat 
> > still create lots of new sessions. But the LoadRunner has 
> stopped to 
> > send request for 15 minutes.

Makes perfect sense to me.

The servlet times out on the DB connection, which may take up to a
minute or so, fails, and then processes the next request, which will
experience the same timeout. Since you have somehow asked for sessions
to be created for each, tomcat will still be processing requests and
thus creating sessions.

Your "caching" thing happens at the socket level. This pseudocode
application runs on any single system, without blocking or deadlocking:


#server
s = socket(..)
s.listen()

# Client - this will not block
c = socket(..)
c.connect(s.getaddr())
c.send("hello")
c.close()

# server again - no, we're not using threading
m = s.accept()
data = m.recv()
m.close()


In other words, you can connect, send and close a client socket, without
the server actually ever reading the request. If you set the SO_LINGER
option in the client, or simply wait for the response, you can alter
this behaviour.

This message and attachment(s) are intended solely for use by the addressee and may contain information that is privileged, confidential or otherwise exempt from disclosure under applicable law.

If you are not the intended recipient or agent thereof responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited.

If you have received this communication in error, please notify the sender immediately by telephone and with a 'reply' message.

Thank you for your co-operation.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: About the http requests cache of Tomcat 5.5.26

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Peter,

On 12/10/2009 3:31 AM, Peter Chen wrote:
> I first start the DB Mysql 5.0, then start Tomcat 5.5.26. The Tomcat
> can connect to the DB correctly.
> 
> Then I start LoadRunner to send lots of HTTP request.
> 
> During the period, I killed the process of MYSQL, so the tomcat
> can't connect to DB.  And threads of processing HTTP requests have to
> wait.

I'm not sure the above information is relevant to your question. Am I
missing something?

> In all, I emulate 300 users with the help of LoadRunner, and I
> finish sending HTTP request in 5 minutes.

So, you have 5 minutes of activity, followed by no activity?

> I am watching the log of Tomcat.  I found after 20 minutes, the 
> Tomcat still create lots of new sessions. But the LoadRunner has 
> stopped to send request for 15 minutes.

How are you observing the creation of new sessions?

> Why?

That remains to be determined.

> And how many HTTP requests can the Tomcat put in cache?

That depends on what you mean by "put in cache"?

If you mean "how many requests can Tomcat accept simultaneously?", then
that depends on the value of maxThreads in your <Connector> (or the
associated <Executor>, if you're using one).

If you mean "how many requests will the operating system queue on top of
those currently being processed by maxThreads?", then that depends on
the value of acceptCount in your <Connector>.

If you really mean "how many requests does Tomcat put in cache", then
the answer is "Tomcat does not put requests in any cache".

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkshffYACgkQ9CaO5/Lv0PD4rgCfZHhz+JBKNOMVS5ZrqOCy4wJe
HzIAoIT1NMxC5A89xBRUAATRrINIT/zf
=5Obg
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org