You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "L.W. van Braam van Vloten" <lu...@dds.nl> on 2007/04/06 16:09:02 UTC
Make Tomcat run slow
Hello group,
I am using a Tomcat webservice to send data from an application under
IBM Websphere on a
Windows 2003 server to a DB2 database on an iSeries.
Tomcat runs on the iSeries, version is 5.5.4, java version is 1.4.2.
In the setup of one customer an error occurs in the Websphere
application, which seems to
be a timeout. The iSeries machine this customer uses is seriously
outdated and the load
from other applications is rather heavy. Tomcat / my webservice run
without any errors,
just a bit slow. However, I can not reproduce the error in my own
testing application
because the machine I use myself is very modern - and fast. Therefore
I am not sure
whether a timeout is the actual problem. My loggings do not give me any useful
information.
So my question is: would there be an easy way to make Tomcat on my
iSeries machine run
rediculously slow? Unfortunately I can't modify any OS400 settings,
and also I can't
modify the code of my webservice. I am looking for a method in the
Tomcat configuration
itself, if that is possible at all.
Kind regards,
Lucas
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Make Tomcat run slow
Posted by Leon Rosenberg <ro...@googlemail.com>.
You could write a valve for tomcat, put that into server/libs and
configure your tomcat via server.xml to use it. This valve could
basically sleep 1 second or longer before allowing the tomcat to
continue with request processing. This was you willnot modify the
webapp neither slow down the entire machine. Just your tomcat
instance.
regards
Leon
On 4/7/07, L.W. van Braam van Vloten <lu...@dds.nl> wrote:
> Thanks for this reply!
>
> Shankar Unni wrote:
> > * Renice these make-work processes so that they are at the highest
> > priority (not real-time, though, or you'll have to reboot your box :-);
> > and renice the Tomcat so that it's at the lowest priority.
>
> Unfortunately this will not work:
> - I can not modify the code for my webservice
> - I need to slow down only my own implementation om Tomcat, and most
> definately not the entire machine! I am not by far the only user of this
> machine, my entire company depends on it :)
>
> Besides, I have no idea how to renice a process on a modern iSeries so
> that it runs unimaginably slow...
>
> Greetings, Lucas
>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Make Tomcat run slow
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Lucas,
L.W. van Braam van Vloten wrote:
> Unfortunately this will not work:
> - I can not modify the code for my webservice
> - I need to slow down only my own implementation om Tomcat, and most
> definately not the entire machine! I am not by far the only user of this
> machine, my entire company depends on it :)
If you can't modify your webapp, and you can't modify the machine, then
you basically can't do what you are trying to do. :(
If you just need to simulate some network lag time, you could use a
firewall to block traffic until you get a timeout. Presumably you can
find a port to block that will stall your webapp...
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGF6eV9CaO5/Lv0PARAvkQAKCRivFiLBIPQjfKY2FTNFO6SupuFQCePW7x
RBaXzVpZf02WLurphaUHI1w=
=r30A
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Make Tomcat run slow
Posted by "L.W. van Braam van Vloten" <lu...@dds.nl>.
Thanks for this reply!
Shankar Unni wrote:
> * Renice these make-work processes so that they are at the highest
> priority (not real-time, though, or you'll have to reboot your box :-);
> and renice the Tomcat so that it's at the lowest priority.
Unfortunately this will not work:
- I can not modify the code for my webservice
- I need to slow down only my own implementation om Tomcat, and most
definately not the entire machine! I am not by far the only user of this
machine, my entire company depends on it :)
Besides, I have no idea how to renice a process on a modern iSeries so
that it runs unimaginably slow...
Greetings, Lucas
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Make Tomcat run slow
Posted by Shankar Unni <sh...@netscape.net>.
L.W. van Braam van Vloten wrote:
> So my question is: would there be an easy way to make Tomcat on my
> iSeries machine run rediculously slow?
Lots of funny replies come to mind, but the simplest is:
* Run a process that just spins forever:
while (1) ;
Run as many of these as you have CPUs.
* Renice these make-work processes so that they are at the highest
priority (not real-time, though, or you'll have to reboot your box :-);
and renice the Tomcat so that it's at the lowest priority.
Relax, and enjoy the scenery while Tomcat groans and wheezes..
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org