RE: Possible causes of connection timeouts?
It looks like this is an issue with the tomcat native connector. If I remove it I have no connection issues at all. Any ideas why the native connector could be causing issues? I built the connector using TC native - 1.1.14 apr- 1.2.12 OpenSSL - 0.9.8h 28 May 2008 Java - 1.6.0_07-b06 ./configure --with-apr=/CTT/apr-1.2.12 --with-ssl=/usr/local/ssl --prefix=/CTT/tomcat6 --with-java-home=/usr/java I see there is a new version of the TC native so I will experiment with that and different versions of APR. ___ Gary Johnstone PLM System Administrator Cummins Turbo Technologies Ltd gary.l.johnstone@ cummins.com To 22/10/2008 08:12 Tomcat Users List users@tomcat.apache.org cc Please respond to Tomcat Users List Subject [EMAIL PROTECTED] RE: Possible causes of connection che.org timeouts? Connector port=8080 protocol=HTTP/1.1 connectionTimeout=2 redirectPort=8443 acceptCount=100 address=160.95.14.76/ One thing I have found is that when I set keepAliveTimeout=3 i.e different to the connectionTimeout The delay then becomes 30 seconds and not 20s as it would default to with just connectionTimeout set to 2. I think this means I am seeing issues with new requests for pages/items on a page rather than issues mid serving of a page. ___ Gary Johnstone PLM System Administrator Cummins Turbo Technologies Ltd Martin Gainty [EMAIL PROTECTED] com To Tomcat Users List 21/10/2008 19:40 users@tomcat.apache.org cc Please respond to Subject Tomcat Users List RE: Possible causes of connection [EMAIL PROTECTED] timeouts? che.org what are the values of your server.xml connection timeout parameters? connectionTimeout The number of milliseconds this Connector will wait, after accepting a connection, for the request URI line to be presented. The default value is 6 (i.e. 60 seconds). connectionTimeout=6 connectionLinger: The number of ms during which the sockets used by this connector will linger when they are closed..-1 keeps the connection open until socket read/write operation is complete connectionLinger=-1 disableUploadTimeout Allowed the servlet container to use a different longer connection timeout while a servlet is being executed. Allows the servlet a longer amount of time to complete execution or longer time during data upload disableUploadTimeout=true socketBuffer size of the socket buffer to be used for socket output buffering. -1 disables default is 9000 bytes socketBuffer=9000 Regards Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. Date: Tue, 21 Oct 2008 16:59:30 +0100 From: [EMAIL PROTECTED] Subject: Possible causes of connection timeouts? To: users@tomcat.apache.org Hi, I am having intermitent but far too frequent issues with connection timeouts on a local tomcat server. The server is on the local network and 9 times out of 10 the pages are served up with no issues but now and then the connection is dropped and a delay of connectionTimeout occurs until the server/client resume communication. I do not want to drop the value of connectionTimeout too low as this server will be
RE: Possible causes of connection timeouts?
Thanks Martin I will look into maven. Switching to solaris has been a steep learning curve, one more thing wont hurt :) ___ Gary Johnstone PLM System Administrator Cummins Turbo Technologies Ltd Martin Gainty [EMAIL PROTECTED] wrote on 23/10/2008 16:19:43: Hi Gary- i noticed you're using ./configure.sh? the only suggestion I can offer would be to use maven for this effort http://maven.apache.org that way version specific anomalies/abnormalities would be addressed by the version attribute-specifier an example: dependencies dependency groupIdfu/groupId artifactIdbar/artifactId version1.0/version /dependency ... //Here are the instructions I see from tcnative.spec which include includedir and define tcnver as 1 and not 1.1.10? %define tcnver 1 ##Summary: Tomcat Native Java library ##Name: tcnative ##Version: 1.1.10 ##Release: 1 %prep %setup -q %build %configure --with-apr=%{_prefix} \ --includedir=%{_includedir}/apr-%{tcnver} make %{?_smp_mflags} make dox %check # Run non-interactive tests pushd test make %{?_smp_mflags} testall CFLAGS=-fno-strict-aliasing ./testall -v || exit 1 popd %install rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT # Documentation mv docs/dox/html html # Unpackaged files rm -f $RPM_BUILD_ROOT%{_libdir}/tcnative.exp %clean rm -rf $RPM_BUILD_ROOT %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr(-,root,root,-) %doc CHANGES LICENSE NOTICE %{_libdir}/libtcnative-%{tcnver}.so.* %files devel %defattr(-,root,root,-) %{_libdir}/libtcnative-%{tcnver}.*a %{_libdir}/libtcnative-%{tcnver}.so %{_libdir}/pkgconfig/tcnative-%{tcnver}.pc %{_includedir}/apr-%{tcnver}/*.h %doc --parents html maybe mladen or some of the committers can weigh in? Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. Date: Thu, 23 Oct 2008 15:08:13 +0100 From: [EMAIL PROTECTED] Subject: RE: Possible causes of connection timeouts? To: users@tomcat.apache.org It looks like this is an issue with the tomcat native connector. If I remove it I have no connection issues at all. Any ideas why the native connector could be causing issues? I built the connector using TC native - 1.1.14 apr- 1.2.12 OpenSSL - 0.9.8h 28 May 2008 Java - 1.6.0_07-b06 ./configure --with-apr=/CTT/apr-1.2.12 --with-ssl=/usr/local/ssl --prefix=/CTT/tomcat6 --with-java-home=/usr/java I see there is a new version of the TC native so I will experiment with that and different versions of APR. ___ Gary Johnstone PLM System Administrator Cummins Turbo Technologies Ltd gary.l.johnstone@ cummins.com To 22/10/2008 08:12 Tomcat Users List users@tomcat.apache.org cc Please respond to Tomcat Users List Subject [EMAIL PROTECTED] RE: Possible causes of connection che.org timeouts? Connector port=8080 protocol=HTTP/1.1 connectionTimeout=2 redirectPort=8443 acceptCount=100 address=160.95.14.76/ One thing I have found is that when I set keepAliveTimeout=3 i.e different to the connectionTimeout The delay then becomes 30 seconds and not 20s as it would default to with just connectionTimeout set to 2. I think this means I am seeing issues with new requests for pages/items on a page rather than issues mid serving of a page. ___ Gary Johnstone PLM System Administrator Cummins Turbo Technologies Ltd Martin Gainty [EMAIL PROTECTED] com To Tomcat Users List 21/10/2008 19:40 users@tomcat.apache.org cc Please respond to Subject Tomcat Users List RE: Possible causes of connection [EMAIL PROTECTED] timeouts? che.org what are the values of your server.xml connection timeout parameters? connectionTimeout The number of milliseconds this Connector will wait, after accepting a connection, for the request URI line to be presented. The default value is 6 (i.e. 60 seconds). connectionTimeout=6 connectionLinger: The number of ms during which the sockets used
RE: Possible causes of connection timeouts?
Connector port=8080 protocol=HTTP/1.1 connectionTimeout=2 redirectPort=8443 acceptCount=100 address=160.95.14.76/ One thing I have found is that when I set keepAliveTimeout=3 i.e different to the connectionTimeout The delay then becomes 30 seconds and not 20s as it would default to with just connectionTimeout set to 2. I think this means I am seeing issues with new requests for pages/items on a page rather than issues mid serving of a page. ___ Gary Johnstone PLM System Administrator Cummins Turbo Technologies Ltd Martin Gainty [EMAIL PROTECTED] com To Tomcat Users List 21/10/2008 19:40 users@tomcat.apache.org cc Please respond to Subject Tomcat Users List RE: Possible causes of connection [EMAIL PROTECTED] timeouts? che.org what are the values of your server.xml connection timeout parameters? connectionTimeout The number of milliseconds this Connector will wait, after accepting a connection, for the request URI line to be presented. The default value is 6 (i.e. 60 seconds). connectionTimeout=6 connectionLinger: The number of ms during which the sockets used by this connector will linger when they are closed..-1 keeps the connection open until socket read/write operation is complete connectionLinger=-1 disableUploadTimeout Allowed the servlet container to use a different longer connection timeout while a servlet is being executed. Allows the servlet a longer amount of time to complete execution or longer time during data upload disableUploadTimeout=true socketBuffer size of the socket buffer to be used for socket output buffering. -1 disables default is 9000 bytes socketBuffer=9000 Regards Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. Date: Tue, 21 Oct 2008 16:59:30 +0100 From: [EMAIL PROTECTED] Subject: Possible causes of connection timeouts? To: users@tomcat.apache.org Hi, I am having intermitent but far too frequent issues with connection timeouts on a local tomcat server. The server is on the local network and 9 times out of 10 the pages are served up with no issues but now and then the connection is dropped and a delay of connectionTimeout occurs until the server/client resume communication. I do not want to drop the value of connectionTimeout too low as this server will be accessed from around the globe. What could be causing these timeouts? Is there a way I can look into what is causing them? Are there any specific settings I need on Solaris to run Tomcat correctly? After plenty of googling and searching these lists on MARC I have not found anything. The server is running tomcat 6, java 1.6 on solaris 10. Thanks ___ Gary Johnstone PLM System Administrator Cummins Turbo Technologies Ltd - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ You live life beyond your PC. So now Windows goes beyond your PC. http://clk.atdmt.com/MRT/go/115298556/direct/01/ __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __
Possible causes of connection timeouts?
Hi, I am having intermitent but far too frequent issues with connection timeouts on a local tomcat server. The server is on the local network and 9 times out of 10 the pages are served up with no issues but now and then the connection is dropped and a delay of connectionTimeout occurs until the server/client resume communication. I do not want to drop the value of connectionTimeout too low as this server will be accessed from around the globe. What could be causing these timeouts? Is there a way I can look into what is causing them? Are there any specific settings I need on Solaris to run Tomcat correctly? After plenty of googling and searching these lists on MARC I have not found anything. The server is running tomcat 6, java 1.6 on solaris 10. Thanks ___ Gary Johnstone PLM System Administrator Cummins Turbo Technologies Ltd - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 6 : timeoutConnect issues, intermitent long page load times
Hi, I am in the process of testing a move of our apache httpd tomcat application server from win2k3 to a solaris10 (5.10) environment. Apache/2.2.8 (Unix) mod_ssl/2.2.8 OpenSSL/0.9.8h mod_jk/1.2.26 Apache Tomcat/6.0.16 running on java 1.6.0_07-b06 During testing I am seeing intermitent high load times for jsp pages. 20s+ when normally they are around 5s To try and remove potential causes of the high load times I have been removing layers of the application, ie oracle backend etc Currently I am hitting a simple jsp directly on tomcat port 8080 this jsp just has img tags to 10 jpg files 105756 bytes in size html head/head body img src=images/100kb0.jpg img src=images/100kb1.jpg img src=images/100kb2.jpg img src=images/100kb3.jpg img src=images/100kb4.jpg img src=images/100kb5.jpg img src=images/100kb6.jpg img src=images/100kb7.jpg img src=images/100kb8.jpg img src=images/100kb9.jpg /body /html Even this simple page is showing intermitent high load times 20s plus when it is normally 5s I have been using jmeter to run multiple tests of accessing this page and this shows that the culprit for the long load time, however if I look in the tomcat access log file it thinks it has served up the files as soon as it has seen the request, it just gets the request 20 seconds later than the previous, note that the second request below is recived 20s after the first. extract from tomcat access log 160.95.12.187 - - [09/Oct/2008:10:23:27 +0100] 0 0.000 GET /dlTest/images/100kb1.jpg HTTP/1.1 200 - 160.95.12.187 - - [09/Oct/2008:10:23:48 +0100] 0 0.000 GET /dlTest/images/100kb2.jpg HTTP/1.1 200 - 160.95.12.187 - - [09/Oct/2008:10:23:48 +0100] 0 0.000 GET /dlTest/images/100kb3.jpg HTTP/1.1 200 - looking at the snoop log of the network interface we see that a repeat request has had to be made for this image, and is made 20s later 10:23:27.79488 l3bd5s3j.ced.corp.cummins.com - redcstcttapdm01 HTTP GET /dlTest/images/100kb1.jpg HTTP/1.1 10:23:27.80185 redcstcttapdm01 - l3bd5s3j.ced.corp.cummins.com HTTP HTTP/1.1 200 OK 10:23:28.31777 l3bd5s3j.ced.corp.cummins.com - redcstcttapdm01 HTTP GET /dlTest/images/100kb2.jpg HTTP/1.1 10:23:48.36992 l3bd5s3j.ced.corp.cummins.com - redcstcttapdm01 HTTP GET /dlTest/images/100kb2.jpg HTTP/1.1 10:23:48.37639 redcstcttapdm01 - l3bd5s3j.ced.corp.cummins.com HTTP HTTP/1.1 200 OK 10:23:48.90253 l3bd5s3j.ced.corp.cummins.com - redcstcttapdm01 HTTP GET /dlTest/images/100kb3.jpg HTTP/1.1 10:23:48.90934 redcstcttapdm01 - l3bd5s3j.ced.corp.cummins.com HTTP HTTP/1.1 200 OK This 20s happens to coincide with the connectionTimeout in the server.xml Connector port=8080 protocol=HTTP/1.1 connectionTimeout=2 maxThreads=150 redirectPort=8443 / Changing this to 2s i then see the delay in re-requests at 2s 9:00:29.1 l3bd5s3j.ced.corp.cummins.com - redcstcttapdm01 HTTP GET /dlTest/images/100kb9.jpg HTTP/1.1 9:00:31.08255 l3bd5s3j.ced.corp.cummins.com - redcstcttapdm01 HTTP GET /dlTest/images/100kb9.jpg HTTP/1.1 I think I have eliminated the network and any possible client issues as Apache will serve up this page over and over (basically the same page but .html extension) with no slow loads, i have been using jmeter to make 100s of requests for this page at different times of the day and not seen an issue. So I assume I am seeing some sort of connectionTimeout issue and the issue is with tomcat. I built tomcat from src using apache-ant-1.7.1 and java 1.5.0_06-b05 as I was seeing issues when it was built under 1.6.0_07-b06, but running it under the 1.6 version My question is why am I seeing the request coming into the server on the network card and it not being recieved by tomcat? Running top at the time of these delays shows the server is idle, I am the only person testing on this server. Can any one shed any light on this? Thanks ___ Gary Johnstone PLM System Administrator Cummins Turbo Technologies Ltd - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How do you access all sessions from a servlet in tomcat 6.0?
Thanks for all the feedback on this. ___ Gary Johnstone Engineering IT Cummins Turbo Technologies Ltd +44 1484 440532 Lyallex [EMAIL PROTECTED] m To Tomcat Users List 19/09/2007 10:38 users@tomcat.apache.org cc Please respond to Subject Tomcat Users Re: How do you access all sessions List from a servlet in tomcat 6.0? [EMAIL PROTECTED] che.org OK, for some reason I've been obsessing about this for a whole day now. If you hold an external reference to a Session then according to my tests the session will still time out as expected but the external reference will be non null. At the very least this means that you may end up with a large number of useless references taking up space in memory. Of course you can always remove an invalid or timed out reference in the sessionDestroyed method of your listener. There are a whole bunch of other issues surrounding this but I'm sure you've sussed them out for yourself already. Anyway, I'll shut up now. Rgds Duncan On 9/19/07, Lyallex [EMAIL PROTECTED] wrote: On 9/18/07, Lyallex [EMAIL PROTECTED] wrote: How about creating a SessionListener class SomeSessionListener implements HttpSessionListener ... Register it in web.xml in the sessionCreated method of your listener get a reference to the new session from the HttpSessionEvent you can now access the getLastAccessedTime(), maybe store the refs in some singleton ... ...er, actually I think this could be a REALLY STUPID idea as I hadn't thought about what happens if you maintain an external reference to a session and the session expires... Investigating now Duncan - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ This e-mail transmission and any attachments to it are intended solely for the use of the individual or entity to whom it is addressed and may contain confidential and privileged information. If you are not the intended recipient, your use, forwarding, printing, storing, disseminating, distribution, or copying of this communication is prohibited. If you received this communication in error, please notify the sender immediately by replying to this message and delete it from your computer. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How do you access all sessions from a servlet in tomcat 6.0?
We have tomcat configured to allow users sessions to stay alive for 12 hours. This is because this is how they like to work, login once at the start of the day and shutdown at the end of the day. I have a need to track their actual activity, like a concurrent license tool, and thought the best way of doing this would be to have a servlet start a timer at server startup, this servlet could then poll all the active sessions at a set interval and check the getLastAccessedtime() method, building up a view of the actual activity. Am I going about this in the right way? If I am how do I access all the currently active sessions from a servlet? It looks like if I can gain access to the servers engine/context I could access all sessions via the ManagerBase class but I do not know how to do this. Thanks Gary _ This e-mail transmission and any attachments to it are intended solely for the use of the individual or entity to whom it is addressed and may contain confidential and privileged information. If you are not the intended recipient, your use, forwarding, printing, storing, disseminating, distribution, or copying of this communication is prohibited. If you received this communication in error, please notify the sender immediately by replying to this message and delete it from your computer. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How do you access all sessions from a servlet in tomcat 6.0?
Thanks Duncan after a quick read on session listeners that looks like it will do the trick. Gary ___ Gary Johnstone Engineering IT Cummins Turbo Technologies Ltd +44 1484 440532 _ This e-mail transmission and any attachments to it are intended solely for the use of the individual or entity to whom it is addressed and may contain confidential and privileged information. If you are not the intended recipient, your use, forwarding, printing, storing, disseminating, distribution, or copying of this communication is prohibited. If you received this communication in error, please notify the sender immediately by replying to this message and delete it from your computer. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]