I am running Apache Tomcat v5.5.12 behind an Apache (v2) Reverse Proxy
server. I'm also running a SunONE Application Server behind the same RP.
Some of the Servlets/Applications on either Tomcat or SunONE have
features to upload data into databases. When the data is sufficiently
large (about 2.5MB), the upload fails and I get an error:
Proxy Error
The proxy server received an invalid response from an upstream
server.
The proxy server could not handle the request POST
/<path>Submit.do.
Reason: Error reading from remote server
Apache/2.0.55 (Unix) Server at j2ee.<test domain>.com Port 80
The RP intercepts any "j2ee" URL and redirects it to the proper
server-port (tomcat or SunONE) based on the URI.
The error occurs consistently at just over 30sec after initiating the
upload.
On my RP server, I tried modifying httpd.conf, putting the following
into the Location Directive:
SetEnv force-proxy-request-1.0 1
SetEnv proxy-nokeepalive 1
(this per http://httpd.apache.org/docs/2.0/mod/mod_proxy.html)
Didn't work. Also tried putting those lines in the appropriate
VirtualHost directive, instead. No good.
I tried changing "KeepAliveTimeout 15" to "KeepAliveTimeout 60", no luck
there either.
References to the error I'm getting (through google and elsewhere) have
not been particularly helpful.
Finally, I focused on two attributes of the Connector configuration in
server.xml: connectionTimeout and disableUploadTimeout. The former was
set to 20000 and the latter to "true". Changing connectionTimeout to 0,
or even to 60000 solved the problem.
Reference http://tomcat.apache.org/tomcat-5.5-doc/config/http.html shows
the default value of connectionTimeout is 60000. "Apache Tomcat 5,
Chopra, et.al." shows it as either 20000 or 60000 depending on where you
look. I assume that means that the value if not explicitly set is 60000,
but that the default file explicitly sets it at 20000. The
disableUploadTimeout attribute is described on the above website thusly:
" This flag allows the servlet container to use a different, longer
connection timeout while a servlet is being executed, which in the end
allows either the servlet a longer amount of time to complete its
execution, or a longer timeout during data upload. If not specified,
this attribute is set to "false"." It does not specify whether there is
a different timeout attribute that is used, nor how much longer it will
wait. Either I overlooked it, or Chopra doesn't mention
disableUploadTimeout
So, being green, I have 4 questions:
1) Is there a better resource that will clarify what I see as being
vague in the resources I've referenced?
2) Assuming there's a tradeoff in modifying connectionTimeout, what do I
need to watch out for?
3) Can I specify the behavior of disableUploadTimeout?
4) Am I pursuing this in absolutely the wrong direction?
The same problem occurs in some of the SunONE hosted apps. More fun!
Thanks,
William J. "Bill" Campillo
System Administrator, Senior Professional
UNIX System and Web Administration
CSC(GIS/Glass House) for Raytheon Missile Systems
Tucson, AZ
520.545-6469 (office)
520.247.5892 (mobile)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery. NOTE: Regardless of content, this e-mail shall not operate to
bind CSC to any order or other contract unless pursuant to explicit written
agreement or government initiative expressly permitting the use of e-mail
for such purpose.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------
To start a new topic, e-mail: [email protected]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]