-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Simão,

On 11/11/2009 6:42 AM, Simão Fontes wrote:
> The 2 applications being used serve different purposes, one presents a
> terms search in a index, the other application is meant to show archived
> pages, similar to what happens in internet archive
> (internetarchive.org). For the second application to work is needs to
> contact the first so that it can locate the required files to show the
> user.

Ok.

> But my main problem is the increase in response time, does having a lot
> of connectors cause thread synchronization issues?

There shouldn't be any synchronization issues, here, unless your
applications have introduced them. Each request processing thread
operates independently and only encounters synchronization when
entering/exiting the connection pool or accessing session data.

If you make a loopback call (one request triggers a request back to the
same Tomcat instance), the two threads shouldn't interfere with each
other at all (again, unless your webapp does some locking).

> Does any one have a reason for such an increase in time, from 1 sec to 16 ?

I can't imagine why this might be happening. Is this easily reproduced?
With a 16-second delay? If so, issue a request to the primary service,
wait 'till it stalls (which should be pretty much immediately) and then
take a thread dump of your JVM. In fact, take several and save them to
separate files. Then, look to see what (if any) differences there are
and what your threads are doing during that delay.

This will give you some insight into why your threads are waiting.

Another option for you, instead of setting up two <Service>
declarations, would be to set up a <Connector> that binds to 127.0.0.1
and is used exclusively by one app to access the others. That way, you
could ensure that there are enough threads to service as many requests
as come into the primary webapp even if all of them require a call to
the secondary one.

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

iEYEARECAAYFAkr7M8kACgkQ9CaO5/Lv0PAF8gCgqGnzgxJcKwD5x6HC8nzUXno/
iUMAn0kQK4ZJOjPrOQG0stohhHEc779O
=0qll
-----END PGP SIGNATURE-----

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

Reply via email to