Thanks for the help Christopher, I'm going to try and use your option to bind things to the 127.0.0.1 in order to have a safe number of threads.

If anyone has other ideas I'm willing to try.

When I try this option I'm going to feedback to the mail list so the answer is registered.

Thanks for all the help
Simão Fontes

Christopher Schultz wrote:
-----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



--
Arquivo da Web Portuguesa | FCCN
Av. do Brasil, n.º 101
1700-066 Lisboa Tel.: +351 21 8440100 (facultativo) Fax: +351 21 8472167
www.arquivo.pt | www.fccn.pt



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

Reply via email to