Re: mod_jk question about socket_timeout

2010-04-16 Thread Philip Wigg
 Recent versions of mod_jk allow a very fine-grained response timeout
 configuration, so that you can e.g. set a general response timeout to 20
 seconds and a longer timeout like 60 seconds for special URLs you expect to
 take longer like report generation.

 The cases where you would need short timeouts are the cping/cpong and during
 connection setup. For the latter there is now also a special timeout, so
 that you can actually drop the socket timeout.

 Have a look at:

 http://tomcat.apache.org/connectors-doc/generic_howto/timeouts.html

 which tries to describe the possible timepouts and their implications in
 great length.

Thanks for your reply Rainer. I have had a read of that (very helpful)
document but I guess what I was wondering was if socket_timeout would
close a socket purely due to inactivity. The doc mentions timing out
on 'operations', which I would take to mean establishing a connection
or waiting for an ACK but actually it does seem to drop the connection
purely because it's inactive.

Cheers,
Phil.

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



Re: mod_jk question about socket_timeout

2010-04-16 Thread Rainer Jung

On 16.04.2010 11:20, Philip Wigg wrote:

Recent versions of mod_jk allow a very fine-grained response timeout
configuration, so that you can e.g. set a general response timeout to 20
seconds and a longer timeout like 60 seconds for special URLs you expect to
take longer like report generation.

The cases where you would need short timeouts are the cping/cpong and during
connection setup. For the latter there is now also a special timeout, so
that you can actually drop the socket timeout.

Have a look at:

http://tomcat.apache.org/connectors-doc/generic_howto/timeouts.html

which tries to describe the possible timepouts and their implications in
great length.


Thanks for your reply Rainer. I have had a read of that (very helpful)
document but I guess what I was wondering was if socket_timeout would
close a socket purely due to inactivity. The doc mentions timing out
on 'operations', which I would take to mean establishing a connection
or waiting for an ACK but actually it does seem to drop the connection
purely because it's inactive.


The exact behaviour of the socket_timeout is dependent on the platform 
and mod_jk version. It is not supposed to time out during wait for 
response, but I won't say it's 100% safe to rely on that.


Regards,

Rainer

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



mod_jk question about socket_timeout

2010-04-15 Thread Philip Wigg
Hi,

I'm using mod_jk 2.2.27 to connect via AJP to a JBoss backend. The
problem is that a reporting application takes a couple of minutes to
run a report but mod_jk seems to be closing the connection to the
back-end and the user receives a 502 Bad Gateway error. 10 seconds
after the request is made, I see the following in the mod_jk logs.:-

[Thu Apr 01 11:51:45.586 2010] [10148:1178638688] [debug]
jk_shutdown_socket::jk_connect.c (680): About to shutdown socket 13
[Thu Apr 01 11:51:45.726 2010] [10148:1084229984] [debug]
jk_watchdog_func::mod_jk.c (2850): Watchdog thread running
[Thu Apr 01 11:51:47.586 2010] [10148:1178638688] [debug]
jk_shutdown_socket::jk_connect.c (731): Shutdown socket 13 and read 0
lingering bytes
[Thu Apr 01 11:51:47.586 2010] [10148:1178638688] [info]
ajp_connection_tcp_get_message::jk_ajp_common.c (): (tomcat1)
can't receive the response message from tomcat, network problems or
tomcat (172.26.199.15:7032) is down (errno=11)
[Thu Apr 01 11:51:47.586 2010] [10148:1178638688] [error]
ajp_get_reply::jk_ajp_common.c (1920): (tomcat1) Tomcat is down or
refused connection. No response has been sent to the client (yet)
[Thu Apr 01 11:51:47.586 2010] [10148:1178638688] [info]
ajp_service::jk_ajp_common.c (2407): (tomcat1) sending request to
tomcat failed (recoverable),  (attempt=1)
[Thu Apr 01 11:51:47.586 2010] [10148:1178638688] [debug]
ajp_service::jk_ajp_common.c (2267): retry 1, sleeping for 100 ms
before retrying

The worker.properties file has only the following timeouts configured:-

worker.tomcat1.connect_timeout=1
worker.tomcat1.prepost_timeout=1
worker.tomcat1.socket_keepalive=true
worker.tomcat1.socket_timeout=10
worker.tomcat1.connection_pool_timeout=600

Which timeout is likely to be responsible for closing this connection?
I have run a network trace between the web and app servers and it
shows there's no AJP traffic at all between them whilst the report is
being generated and then the connection being closed after 10 seconds,
would socket_timeout close the connection in that case? I don't see
any errors about failing cping/cpongs.

Kind regards,
Phil.

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



Re: mod_jk question about socket_timeout

2010-04-15 Thread Rainer Jung

On 15.04.2010 13:22, Philip Wigg wrote:

Hi,

I'm using mod_jk 2.2.27 to connect via AJP to a JBoss backend. The
problem is that a reporting application takes a couple of minutes to
run a report but mod_jk seems to be closing the connection to the
back-end and the user receives a 502 Bad Gateway error. 10 seconds
after the request is made, I see the following in the mod_jk logs.:-

[Thu Apr 01 11:51:45.586 2010] [10148:1178638688] [debug]
jk_shutdown_socket::jk_connect.c (680): About to shutdown socket 13
[Thu Apr 01 11:51:45.726 2010] [10148:1084229984] [debug]
jk_watchdog_func::mod_jk.c (2850): Watchdog thread running
[Thu Apr 01 11:51:47.586 2010] [10148:1178638688] [debug]
jk_shutdown_socket::jk_connect.c (731): Shutdown socket 13 and read 0
lingering bytes
[Thu Apr 01 11:51:47.586 2010] [10148:1178638688] [info]
ajp_connection_tcp_get_message::jk_ajp_common.c (): (tomcat1)
can't receive the response message from tomcat, network problems or
tomcat (172.26.199.15:7032) is down (errno=11)
[Thu Apr 01 11:51:47.586 2010] [10148:1178638688] [error]
ajp_get_reply::jk_ajp_common.c (1920): (tomcat1) Tomcat is down or
refused connection. No response has been sent to the client (yet)
[Thu Apr 01 11:51:47.586 2010] [10148:1178638688] [info]
ajp_service::jk_ajp_common.c (2407): (tomcat1) sending request to
tomcat failed (recoverable),  (attempt=1)
[Thu Apr 01 11:51:47.586 2010] [10148:1178638688] [debug]
ajp_service::jk_ajp_common.c (2267): retry 1, sleeping for 100 ms
before retrying

The worker.properties file has only the following timeouts configured:-

worker.tomcat1.connect_timeout=1
worker.tomcat1.prepost_timeout=1
worker.tomcat1.socket_keepalive=true
worker.tomcat1.socket_timeout=10
worker.tomcat1.connection_pool_timeout=600

Which timeout is likely to be responsible for closing this connection?


The socket timeout.


I have run a network trace between the web and app servers and it
shows there's no AJP traffic at all between them whilst the report is
being generated and then the connection being closed after 10 seconds,
would socket_timeout close the connection in that case? I don't see
any errors about failing cping/cpongs.


Recent versions of mod_jk allow a very fine-grained response timeout 
configuration, so that you can e.g. set a general response timeout to 20 
seconds and a longer timeout like 60 seconds for special URLs you expect 
to take longer like report generation.


The cases where you would need short timeouts are the cping/cpong and 
during connection setup. For the latter there is now also a special 
timeout, so that you can actually drop the socket timeout.


Have a look at:

http://tomcat.apache.org/connectors-doc/generic_howto/timeouts.html

which tries to describe the possible timepouts and their implications in 
great length.


Regards,

Rainer

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