Re: mod_jk not working as expected - is there a bug??
On 06.03.2009 01:44, Mohit Anchlia wrote: Thanks ..But how do I tie the status worker to the list of nodes that I have. For eg in below config how do I say that appfe1 is now "stopped" and still keep servicing appfe2,3 and 4 worker.status.type=status worker.tc.type=lb worker.tc.balance_workers=appfe1,appfe2,appfe3,appfe4 worker.tc.sticky_session=true mount the worker named status to a URL, e.g. JkMount /mystatus status and then point your browser to this URL. It will show you a GUI, where you can edit the settings. E.g. there will be a block of data for the worker "tc", and there you can see a drop down list of attributes to edt. Choose activation then you get a page on which you can edit the activations of all members of "tc". See: http://tomcat.apache.org/connectors-doc/reference/status.html Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat Memory Leaks
May be some servlet is start up with tomcat. like load-on-startup check your server.xml and webapps directory - Original Message - From: "Black Friday" To: Sent: Friday, March 06, 2009 11:40 AM Subject: Tomcat Memory Leaks > Hi, > > My system environment is: Windows 2000 Server. JDK 1.5, tomcat 4.X, Oracle 9 > > The problem is: > > After tomcat was started, the memory of the tomcat grows continuosly, > reaches till 1.3G. The system is 2GB. > This happens when no application is running. After tomcat reaches 1.3G, when > application starts, the response is slow. > > Can some one help me with this? > > Thanks!! >
Tomcat Memory Leaks
Hi, My system environment is: Windows 2000 Server. JDK 1.5, tomcat 4.X, Oracle 9 The problem is: After tomcat was started, the memory of the tomcat grows continuosly, reaches till 1.3G. The system is 2GB. This happens when no application is running. After tomcat reaches 1.3G, when application starts, the response is slow. Can some one help me with this? Thanks!!
Re: nio connector configuration
hi Peter, I ran your jmeter test and I get an average request time for Comet to be 13.5 seconds. I'm running this on what will be 6.0.19, meaning 6.0.x/trunk With a 10second timeout, you wont get timed out in exactly 10 seconds. timeout are of absolutely lowest priority. If there is request data coming in for the poller, then that will get a preference. Timeouts happen when the poller thread is free, and the time has passed. But 13.5 sounds pretty reasonable in this case Filip otismo wrote: Thanks for the response, Filip. Hopefully this is more helpful... I put a war at http://www.nomad.org/test.war containing my web app, the source, and my jmeter test plan. My question: why are comet timeouts getting generated substantially behind the timeout setting? Is it because I have incorrectly configured tomcat? Is there something wrong with my test? Can anyone else confirm this behavior? It seems as though the normal (non-comet) http requests are taking priority over the comet requests. The test is very simple. One set of threads sends non-comet http requests every 10 seconds. Another set of threads sends comet requests with a single byte in the body. The comet servlet sets a comet timeout of 10 seconds, reads the request body, and then closes the connection on receiving the comet timeout event. On close of the connection, the comet test threads then send another comet request. I have JMeter set to start 100 threads for the http thread group and 100 threads for the comet thread group, ramping up at 1 thread per second. A fifteen minute test shows: http requests: 9750 samples http response time: avg 109ms, min 66ms, max 3699ms http errors: 0% http throughput: 9.5 requests/second comet requests: 1942 samples comet response time: avg 50149ms, min 10353ms, max 120876ms (tcp timeout is set to 12) comet errors: 0% comet throughput: 1.9 requests/second cpu use is minimal (1-4%) There are no errors in the catalina log. I also added timing code to the test servlet to confirm that JMeter's measurements are accurate and found they are. After confirming the measurements, I removed the timing code. I noticed on even short tests the http requests predominate, even though there should be roughly the same # of http requests as comet requests (1 request/10 seconds/thread and there are 100 threads for each thread group, http and comet). My NIO configuration is: os: ubuntu 8.10 (although also observed same behavior on Windows XP SP 3) tomcat 6.0.18 (Note: the following are also in the war bundle referenced at top) The client TCP request looks like this (without the s): POST /test/cometTest HTTP/1.1 Host: 173.45.237.215 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b2) Gecko/20081201 Firefox/3.1b2 Connection: keep-alive Content-Type: text/plain Content-Length: 1 5 The http test servlet's doGet method looks like this: protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException { response.getWriter().println("response"); } The comet test servlet's event method looks like this: public void event(CometEvent event) throws IOException, ServletException { HttpServletRequest request = event.getHttpServletRequest(); if (event.getEventType() == CometEvent.EventType.BEGIN) { event.setTimeout(1); } else if (event.getEventType() == CometEvent.EventType.ERROR) { event.close(); } else if (event.getEventType() == CometEvent.EventType.END) { event.close(); } else if (event.getEventType() == CometEvent.EventType.READ) { InputStream is = request.getInputStream(); byte[] buf = new byte[512]; do { is.read(buf); } while (is.available() > 0); } } Thanks for any help, Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat w/apr data lost in http post request?
Hi All, That's caused by the IE keep-alive bug, Please refer to my previous post : question : encounter java.net.SocketTimeoutException: Read timed out occasionally in below URL : http://www.nabble.com/question-%3A-encounter-java.net.SocketTimeoutException%3A-Read-timed-out-occasionally-td19326602.html#a19832518 On Thu, Mar 5, 2009 at 6:45 PM, Taylan Develioglu wrote: > Can the wget clone do this without modification, or do I need to change it? > > So basically you're saying: > > Send content larger then content-length. Then close the connection, see if > the post request gets processed? > > The ajax requests may be done over a seperate connection, but all > subsequent requests use keepalive and are definately done over the same > connection, this is in firefox 3.0.6. > I fired up my network analyzer, to be 100% sure and there are no new > outgoing connections there. > > T > > > Christopher Schultz wrote: > >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA1 >> >> Taylan, >> >> On 3/3/2009 2:07 PM, Taylan Develioglu wrote: >> >> >>> I can reproduce it on demand with our application, but I wouldn't know >>> how to create a post request that would stall, the servlet can stall the >>> response, but isn't processing of the request (i.e. fetching post >>> parameters) done by tomcat? >>> >>> >> >> You would write a client that sets Content-Length, sends half of it, and >> then does a sleep for a few seconds, then attempts to send the rest. I >> have a Java clone of wget that I could loan you if you wanna play with it. >> >> >> >>> You might be able to reproduce it as follows: >>> >>> - Create a http connector with a keepalive timeout of 5s. (apr w/ 10s in >>> our case, but it happens with NIO as well. Check previous post for our >>> connector definition) >>> >>> - Have an ajax app do post requests to servlet A that logs the post >>> parameters. (javascript/ajax in our case, check previous post for our >>> http header info) >>> >>> - See if any post parameters come up empty at servlet A. >>> >>> >> >> I would think that AJAX requests would be sent in separate HTTP >> connections, not in a keepalive connection that stays open for a long >> time, no? >> >> >> >>> Note that I almost certainly think this only happens w/ clients that use >>> IE 6/7. >>> >>> >> >> It's possible/probable that MSIE's Ajax implementation is broken. I'd be >> interested to see if there's any difference between HTTP communications >> on a well-behaved browser versus MSIE. >> >> - -chris >> -BEGIN PGP SIGNATURE- >> Version: GnuPG v1.4.9 (MingW32) >> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org >> >> iEYEARECAAYFAkmtutUACgkQ9CaO5/Lv0PDXDgCeNjewNeQRp7zz2svUA9cdAiyb >> hBgAn2PJQi6ezQeAjVW2rx5la9g5MTve >> =/87l >> -END PGP SIGNATURE- >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> >> >> > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Re: mod_jk not working as expected - is there a bug??
Thanks ..But how do I tie the status worker to the list of nodes that I have. For eg in below config how do I say that appfe1 is now "stopped" and still keep servicing appfe2,3 and 4 worker.status.type=status worker.tc.type=lb worker.tc.balance_workers=appfe1,appfe2,appfe3,appfe4 worker.tc.sticky_session=true On Thu, Mar 5, 2009 at 4:07 PM, Rainer Jung wrote: > On 05.03.2009 23:57, Mohit Anchlia wrote: >> >> So I tested again and it looks like Jboss accepts new connection when >> it already undeployed the service. Do you have any advice of how I can >> handle this scenario. I need to cleanly take that node out of service >> from mod_jk with no customer impact. Is there anyway in apache to do >> that so that it detects below scenario ..any possible way? Thanks for >> your help. >> >> I see the following of http code 503: >> > ... > > Use the status worker and set the node to "stopped". All requests to the > status worker are GET requests, so you can easily script/automate them. > > That's the cleanest way. > > Regards, > > Rainer > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat and Apache with mod_jk
You might want to have them not hit / but hit a small static file that apache will always have, maybe even keep it in cache. No sense in them monitoring / which you've shown goes through to your tomcat. Seems a little wasteful. Unless of course, you want their monitoring to hit tomcat. -Tony --- Manager, IT Operations Format Dynamics, Inc. 303-573-1800x27 abia...@formatdynamics.com http://www.formatdynamics.com -Original Message- From: Ian Long [mailto:ian.l...@opterus.com] Sent: Thursday, March 05, 2009 4:44 PM To: Tomcat Users List Subject: Re: Tomcat and Apache with mod_jk Here is some sample output from the system-status: Srv PID Acc M CPU SS Req ConnChild SlotClient VHost Request 0-0 20960/50/50 _ 0.0123 2 0.0 0.09 0.09X web1.opterus.comGET / lbcheck.faces HTTP/1.0 1-0 20970/12/12 W 0.01513 0 0.0 0.05 0.05X web1.opterus.comGET / HTTP/1.1 2-0 20980/24/24 W 0.00450 0 0.0 0.01 0.01X web1.opterus.comGET / login.faces HTTP/1.1 3-0 20990/39/39 W 0.01207 0 0.0 0.06 0.06X web1.opterus.comGET / HTTP/1.1 4-0 21000/11/11 W 0.00518 0 0.0 0.01 0.01X web1.opterus.comGET / HTTP/1.1 5-0 21010/31/31 W 0.00271 0 0.0 0.06 0.06X web1.opterus.comGET / HTTP/1.0 The 'Get /' is from my data center provider, it's a piece of monitoring software, but it looks like it doesn't wait for a response, because the processes are stuck in writing, and apache doesn't seem to realize the connection is gone, as you can see some of the SS times are over 10 minutes, which is longer than all my timeout settings... Is there any way to make apache realize the connections are gone? I will talk to the provider about what they see on their end Cheers, Ian Long Chief Software Architect, Opterus Inc. Email: ian.l...@opterus.com Phone: 416-840-8495 x666 Mobile: 416-817-9206 Web: http://www.opterus.com On 5-Mar-09, at 4:03 PM, Rainer Jung wrote: > On 05.03.2009 21:04, Ian Long wrote: >> I haven't actually - I will turn it on and restart the server >> tonight. >> >> Another thing that I find strange is the apache (using prefork MPM) >> seems to keep increasing the number of child processes. For example, >> when I run: >> >> service httpd status >> httpd (pid 31093 31055 31048 31047 31046 31045 31044 31043 31042 >> 31036 >> 30922 30919 30860 30853 30769 30753 30733 30728 30690 30684 30653 >> 30652 >> 30637 30555 30440 30439 30438 30421 30383 30348 30312 30310 30309 >> 30271 >> 30177 30158 30157 30086 30063 30057 29906 29905 29904 29796 29795 >> 29794 >> 29793 29791 29790 29701 29639 29638 29633 29600 29547 29530 29529 >> 29491 >> 29489 29480 29443 29442 29441 29440 29397 29396 29394 29358 29357 >> 29351 >> 29304 29270 29191 29190 29184 29138 29137 29116 29115 29051 29012 >> 29007 >> 29002 28966 28959 28957 28911 28904 28903 28897 28893 28848 28809 >> 28807 >> 28796 28790 28782 28773 28734 28719 28645 28544 28543 28542 28475 >> 28474 >> 28473 28471 28470 28428 28403 28365 28363 28325 28319 28318 28316 >> 28315 >> 28314 28271 28269 28228 28184 28183 28138 28132 28125 28063 28022 >> 28016 >> 28015 28014 28013 28011 27968 27966 27965 27964 27963 27882 27836 >> 27815 >> 2 27776 27689 27688 27687 27672 27671 27617 27615 27610 27568 >> 27567 >> 27560 27559 27523 27522 27521 27477 27476 27475 27474 27473 27467 >> 27466 >> 27465 27464 27457 27456 27455 27454 26439 26222 26045 26003 25855 >> 25854 >> 25853 25852 25851 25850 25849 25848 25846) is running... >> >> the number of processes is always increasing > > That's definitely something to worry about. Your configuration lets > us expect only 20 idle processes. So either the configuration is > something different, or those processes are not idle. > > What does the httpd server-status tell you? Are those processes > working on something? > > They are most likely the reason for the many established > connections, so it will be interesting to find out, what they do. > > You can also use gstack or gdb to look at the stack of some of them > and get an idea, what they do. In case they are inside mod_jk and > wait for an answer from the backend, do a "kill -QUIT" on the Tomcat > and look in catalina.out. It will contain a list of all Tomcat > threads and for each thread the full method stack, so you can see, > whether they are running requests, and what it is they are working > on or waiting for. > > Regards, > > Rainer > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org ---
Re: Tomcat and Apache with mod_jk
I just took a subset of the list, the other few hundred processes were also stuck in the same state. From the tomcat logs it looks like the response has been sent back. I have seen cases where a firewall doesn't recognize a connection has been closed. On 5-Mar-09, at 7:05 PM, Rainer Jung wrote: On 06.03.2009 00:44, Ian Long wrote: Here is some sample output from the system-status: Srv PID Acc M CPU SS Req Conn Child Slot Client VHost Request 0-0 2096 0/50/50 _ 0.01 23 2 0.0 0.09 0.09 X web1.opterus.com GET /lbcheck.faces HTTP/1.0 1-0 2097 0/12/12 W 0.01 513 0 0.0 0.05 0.05 X web1.opterus.com GET / HTTP/1.1 2-0 2098 0/24/24 W 0.00 450 0 0.0 0.01 0.01 X web1.opterus.com GET /login.faces HTTP/1.1 3-0 2099 0/39/39 W 0.01 207 0 0.0 0.06 0.06 X web1.opterus.com GET / HTTP/1.1 4-0 2100 0/11/11 W 0.00 518 0 0.0 0.01 0.01 X web1.opterus.com GET / HTTP/1.1 5-0 2101 0/31/31 W 0.00 271 0 0.0 0.06 0.06 X web1.opterus.com GET / HTTP/1.0 The 'Get /' is from my data center provider, it's a piece of monitoring software, but it looks like it doesn't wait for a response, because the processes are stuck in writing, and apache doesn't seem to realize the connection is gone, as you can see some of the SS times are over 10 minutes, which is longer than all my timeout settings... Is there any way to make apache realize the connections are gone? I will talk to the provider about what they see on their end "W" is not necessarily writing, it could also be waiting for Tomcat to produce an answer. If I remember it correctly, you also send "/" to Tomcat. Thos probe-but-not-wait requests could well be responsible for the client abort log messages. Usually once the web server tries to write back the first response packet, and the client has already closed or reset the connection, the web server will note this immediately. So somehow I suspect, that those requests are still waiting for the result form the backend. Is it just those few? What are the other 100-200 httpd processes doing? Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: mod_jk not working as expected - is there a bug??
On 05.03.2009 23:57, Mohit Anchlia wrote: So I tested again and it looks like Jboss accepts new connection when it already undeployed the service. Do you have any advice of how I can handle this scenario. I need to cleanly take that node out of service from mod_jk with no customer impact. Is there anyway in apache to do that so that it detects below scenario ..any possible way? Thanks for your help. I see the following of http code 503: ... Use the status worker and set the node to "stopped". All requests to the status worker are GET requests, so you can easily script/automate them. That's the cleanest way. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat and Apache with mod_jk
On 06.03.2009 00:44, Ian Long wrote: Here is some sample output from the system-status: Srv PID Acc M CPU SS Req Conn Child Slot Client VHost Request 0-0 2096 0/50/50 _ 0.01 23 2 0.0 0.09 0.09 X web1.opterus.com GET /lbcheck.faces HTTP/1.0 1-0 2097 0/12/12 W 0.01 513 0 0.0 0.05 0.05 X web1.opterus.com GET / HTTP/1.1 2-0 2098 0/24/24 W 0.00 450 0 0.0 0.01 0.01 X web1.opterus.com GET /login.faces HTTP/1.1 3-0 2099 0/39/39 W 0.01 207 0 0.0 0.06 0.06 X web1.opterus.com GET / HTTP/1.1 4-0 2100 0/11/11 W 0.00 518 0 0.0 0.01 0.01 X web1.opterus.com GET / HTTP/1.1 5-0 2101 0/31/31 W 0.00 271 0 0.0 0.06 0.06 X web1.opterus.com GET / HTTP/1.0 The 'Get /' is from my data center provider, it's a piece of monitoring software, but it looks like it doesn't wait for a response, because the processes are stuck in writing, and apache doesn't seem to realize the connection is gone, as you can see some of the SS times are over 10 minutes, which is longer than all my timeout settings... Is there any way to make apache realize the connections are gone? I will talk to the provider about what they see on their end "W" is not necessarily writing, it could also be waiting for Tomcat to produce an answer. If I remember it correctly, you also send "/" to Tomcat. Thos probe-but-not-wait requests could well be responsible for the client abort log messages. Usually once the web server tries to write back the first response packet, and the client has already closed or reset the connection, the web server will note this immediately. So somehow I suspect, that those requests are still waiting for the result form the backend. Is it just those few? What are the other 100-200 httpd processes doing? Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat and Apache with mod_jk
Here is some sample output from the system-status: Srv PID Acc M CPU SS Req ConnChild Slot Client VHost Request 0-0 2096 0/50/50 _ 0.01 23 2 0.0 0.09 0.09 X web1.opterus.com GET / lbcheck.faces HTTP/1.0 1-0 2097 0/12/12 W 0.01 513 0 0.0 0.05 0.05 X web1.opterus.com GET / HTTP/1.1 2-0 2098 0/24/24 W 0.00 450 0 0.0 0.01 0.01 X web1.opterus.com GET / login.faces HTTP/1.1 3-0 2099 0/39/39 W 0.01 207 0 0.0 0.06 0.06 X web1.opterus.com GET / HTTP/1.1 4-0 2100 0/11/11 W 0.00 518 0 0.0 0.01 0.01 X web1.opterus.com GET / HTTP/1.1 5-0 2101 0/31/31 W 0.00 271 0 0.0 0.06 0.06 X web1.opterus.com GET / HTTP/1.0 The 'Get /' is from my data center provider, it's a piece of monitoring software, but it looks like it doesn't wait for a response, because the processes are stuck in writing, and apache doesn't seem to realize the connection is gone, as you can see some of the SS times are over 10 minutes, which is longer than all my timeout settings... Is there any way to make apache realize the connections are gone? I will talk to the provider about what they see on their end Cheers, Ian Long Chief Software Architect, Opterus Inc. Email: ian.l...@opterus.com Phone: 416-840-8495 x666 Mobile: 416-817-9206 Web: http://www.opterus.com On 5-Mar-09, at 4:03 PM, Rainer Jung wrote: On 05.03.2009 21:04, Ian Long wrote: I haven't actually - I will turn it on and restart the server tonight. Another thing that I find strange is the apache (using prefork MPM) seems to keep increasing the number of child processes. For example, when I run: service httpd status httpd (pid 31093 31055 31048 31047 31046 31045 31044 31043 31042 31036 30922 30919 30860 30853 30769 30753 30733 30728 30690 30684 30653 30652 30637 30555 30440 30439 30438 30421 30383 30348 30312 30310 30309 30271 30177 30158 30157 30086 30063 30057 29906 29905 29904 29796 29795 29794 29793 29791 29790 29701 29639 29638 29633 29600 29547 29530 29529 29491 29489 29480 29443 29442 29441 29440 29397 29396 29394 29358 29357 29351 29304 29270 29191 29190 29184 29138 29137 29116 29115 29051 29012 29007 29002 28966 28959 28957 28911 28904 28903 28897 28893 28848 28809 28807 28796 28790 28782 28773 28734 28719 28645 28544 28543 28542 28475 28474 28473 28471 28470 28428 28403 28365 28363 28325 28319 28318 28316 28315 28314 28271 28269 28228 28184 28183 28138 28132 28125 28063 28022 28016 28015 28014 28013 28011 27968 27966 27965 27964 27963 27882 27836 27815 2 27776 27689 27688 27687 27672 27671 27617 27615 27610 27568 27567 27560 27559 27523 27522 27521 27477 27476 27475 27474 27473 27467 27466 27465 27464 27457 27456 27455 27454 26439 26222 26045 26003 25855 25854 25853 25852 25851 25850 25849 25848 25846) is running... the number of processes is always increasing That's definitely something to worry about. Your configuration lets us expect only 20 idle processes. So either the configuration is something different, or those processes are not idle. What does the httpd server-status tell you? Are those processes working on something? They are most likely the reason for the many established connections, so it will be interesting to find out, what they do. You can also use gstack or gdb to look at the stack of some of them and get an idea, what they do. In case they are inside mod_jk and wait for an answer from the backend, do a "kill -QUIT" on the Tomcat and look in catalina.out. It will contain a list of all Tomcat threads and for each thread the full method stack, so you can see, whether they are running requests, and what it is they are working on or waiting for. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: mod_jk not working as expected - is there a bug??
So I tested again and it looks like Jboss accepts new connection when it already undeployed the service. Do you have any advice of how I can handle this scenario. I need to cleanly take that node out of service from mod_jk with no customer impact. Is there anyway in apache to do that so that it detects below scenario ..any possible way? Thanks for your help. I see the following of http code 503: JBossWeb/2.0.0.GA_CP01 - Error report HTTP Status 503 - This application is not currently availabletype Status reportmessage This application is not currently availabledescription The requested service (This application is not currently available) is not currently available.JBossWeb/2.0.0.GA_CP01 On Mon, Mar 2, 2009 at 5:01 PM, Rainer Jung wrote: > On 03.03.2009 01:45, Mohit Anchlia wrote: >> >> Is there a way to configure ping in workers.properties to also check >> for 503 in addition to cping/cpong? I am sure you are going to laugh >> at me. > > No I'm not laughing, but as I wrote, at the time Tomcat returns the cpong, > there is no http status. There isn't yet a request. > > So this feature doesn't make sense. > > Regards, > > Rainer > >> On Mon, Mar 2, 2009 at 1:26 PM, Rainer Jung >> wrote: >>> >>> On 02.03.2009 20:28, Mohit Anchlia wrote: I will change the JkLogLevel and post the results. I have a question though: Does prepost_timeout also detect if it received http code such as 503 from app server. >>> >>> prepost_timeout activates Cping/Cpong before each request. mod_jk will >>> send >>> a tiny test packet to the ap server before each request, and the AJP >>> protocol stack of the app server will immediately respond with a tiny >>> reply >>> packet, indicating that it is still alive and able to parse AJP messages. >>> The web application itself is not involved in this part of the >>> processing, >>> neither is any http request or response (or their AJP equivalent). >>> >>> So prepose_timeout will detect, if it receives some garbage (anything >>> different from a Cpong packet), but http responses with http status codes >>> are only generated much later and will thus not influence the prepose >>> Cping/Cpong result. >>> >>> See also: >>> >>> http://tomcat.apache.org/connectors-doc/generic_howto/timeouts.html >>> >>> Regards, >>> >>> Rainer >>> On Wed, Feb 25, 2009 at 9:05 AM, Rainer Jung wrote: > > On 25.02.2009 17:10, Mohit Anchlia wrote: >> >> you are right there is a mod-jk.conf. So given my workers.properties >> file what should I change so that mod_jk detects that app server is >> down before attempting to send the request. Shouldn't "retries" in >> workers.properties try to connect to some other app server instead. > > Just a wild guess: your prepost timeout of 5 milliseconds produces the > error > messages you cited. First correct this timeout, then do another clean > test > on your test system. You can even increase JkLogLevel to trace (not in > production) so we can see exactly what is going on. Do not send many > requests with JkLogLevel trace, just do a minimal test that shows the > problem. > > The early detection of a broken instance should be possible with your > configuration. > >> Here is mod-jk.conf >> >> # Where to find workers.properties >> JkWorkersFile conf/workers.properties >> >> # Where to put jk logs >> JkLogFile /var/log/apache2/mod_jk.log >> >> # Set the jk log level [debug/error/info] >> JkLogLevel error >> >> # Allow mod_jk worker status reports, with the URL of >> http://servername/JkStatus >> ## This is very helpful for monitoring purposes, but should be >> ## allowed from the local machine. >> >> Order deny,allow >> Deny from all >> Allow from localhost >> >> >> #JkMount /JkStatus status >> >> # Below line forward all requests to application server >> #JkMount /* local >> >> >> On Wed, Feb 25, 2009 at 2:55 AM, Rainer Jung >> wrote: >>> >>> On 25.02.2009 02:47, Mohit Anchlia wrote: In httpd conf I just see JkMount and no other directive. I searched for Jk. >>> >>> There should be others as well, for instance JkWorkersFile to point >>> to >>> your >>> workers.properties. The names of the dir
Re: Tomcat and Apache with mod_jk
BTW, I finally got this working. The final key was using the latest version of tcnative binary. Note to others, make sure your code sets the cache-control header to "no-transform, max-age=0". buzzterrier wrote: > > Actually this may not be just a case of the end user clicking away. There > is an Internet Explorer issue with downloading files, where IE deletes the > cached file before the user can load it. Your tomcat logs would probably > show an error like: ClientAbortException: java.io.IOException. I am > suffering with this at present, and the suggestion of setting the > cache-control headers to max-age=0 does not work. > > > - Buzzterrier http://buzzterrier.blogspot.com/ View my blog: Ordinary Average Developer... -- View this message in context: http://www.nabble.com/Tomcat-and-Apache-with-mod_jk-tp22356983p22361683.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Content length when HTTP Transfer-encoding is chunked
On 05.03.2009 20:08, Mahesh Seshan wrote: Rainer, Thank you very much for the prompt response. To be more specific, Apache CXF is the consumer of HTTP request. Are you indicating that Apache CXF is the one reading from Socket input stream ? And that Tomcat HTTP Connector simply hands over the Inputstream to CXF to consume the chunked contents ? Tomcat does the chunk decoding when the application consumes the data via reading from the input stream. So the application will not be able to see the real chunks, but Tomcat doesn't buffer the full POST body before the application consumes it. It is important for chunked encoding to support a streaming architecture. Think about uploading a DVD ISO image, and the web server buffering the whole image im memory before handing it over to an aplication. That wouldn't be nice. Regards, Rainer -mahesh On Thu, Mar 5, 2009 at 10:39 AM, Rainer Jung wrote: On 05.03.2009 16:16, Mahesh Seshan wrote: Hello, I can obtain the content-length of a HTTP Servlet Request when the Content-Length header is added by the client. However, when the Transfer-encoding is chunked, how do I programatically obtain the content length ? You can't without consuming the body. The task at hand for me is to prevent a HTTP client from issuing a request that has a huge payload that could pose a resource risk on the HTTP server. Exactly that's the reason, why there is no easy way to get the length. Whatever component that could provide you with that information would need to read all of the body (and buffer it for your later use) in order to measure its length. Chunked encoding works with chunks, individual chunks usually are small and the protocol tells us, how big the next chunk is, but we never know how big the size of all chunks together is. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat and Apache with mod_jk
On 05.03.2009 21:04, Ian Long wrote: I haven't actually - I will turn it on and restart the server tonight. Another thing that I find strange is the apache (using prefork MPM) seems to keep increasing the number of child processes. For example, when I run: service httpd status httpd (pid 31093 31055 31048 31047 31046 31045 31044 31043 31042 31036 30922 30919 30860 30853 30769 30753 30733 30728 30690 30684 30653 30652 30637 30555 30440 30439 30438 30421 30383 30348 30312 30310 30309 30271 30177 30158 30157 30086 30063 30057 29906 29905 29904 29796 29795 29794 29793 29791 29790 29701 29639 29638 29633 29600 29547 29530 29529 29491 29489 29480 29443 29442 29441 29440 29397 29396 29394 29358 29357 29351 29304 29270 29191 29190 29184 29138 29137 29116 29115 29051 29012 29007 29002 28966 28959 28957 28911 28904 28903 28897 28893 28848 28809 28807 28796 28790 28782 28773 28734 28719 28645 28544 28543 28542 28475 28474 28473 28471 28470 28428 28403 28365 28363 28325 28319 28318 28316 28315 28314 28271 28269 28228 28184 28183 28138 28132 28125 28063 28022 28016 28015 28014 28013 28011 27968 27966 27965 27964 27963 27882 27836 27815 2 27776 27689 27688 27687 27672 27671 27617 27615 27610 27568 27567 27560 27559 27523 27522 27521 27477 27476 27475 27474 27473 27467 27466 27465 27464 27457 27456 27455 27454 26439 26222 26045 26003 25855 25854 25853 25852 25851 25850 25849 25848 25846) is running... the number of processes is always increasing That's definitely something to worry about. Your configuration lets us expect only 20 idle processes. So either the configuration is something different, or those processes are not idle. What does the httpd server-status tell you? Are those processes working on something? They are most likely the reason for the many established connections, so it will be interesting to find out, what they do. You can also use gstack or gdb to look at the stack of some of them and get an idea, what they do. In case they are inside mod_jk and wait for an answer from the backend, do a "kill -QUIT" on the Tomcat and look in catalina.out. It will contain a list of all Tomcat threads and for each thread the full method stack, so you can see, whether they are running requests, and what it is they are working on or waiting for. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat and Apache with mod_jk
Actually this may not be just a case of the end user clicking away. There is an Internet Explorer issue with downloading files, where IE deletes the cached file before the user can load it. Your tomcat logs would probably show an error like: ClientAbortException: java.io.IOException. I am suffering with this at present, and the suggestion of setting the cache-control headers to max-age=0 does not work. - Buzzterrier http://buzzterrier.blogspot.com/ View my blog: Ordinary Average Developer... -- View this message in context: http://www.nabble.com/Tomcat-and-Apache-with-mod_jk-tp22356983p22360196.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat and Apache with mod_jk
I haven't actually - I will turn it on and restart the server tonight. Another thing that I find strange is the apache (using prefork MPM) seems to keep increasing the number of child processes. For example, when I run: service httpd status httpd (pid 31093 31055 31048 31047 31046 31045 31044 31043 31042 31036 30922 30919 30860 30853 30769 30753 30733 30728 30690 30684 30653 30652 30637 30555 30440 30439 30438 30421 30383 30348 30312 30310 30309 30271 30177 30158 30157 30086 30063 30057 29906 29905 29904 29796 29795 29794 29793 29791 29790 29701 29639 29638 29633 29600 29547 29530 29529 29491 29489 29480 29443 29442 29441 29440 29397 29396 29394 29358 29357 29351 29304 29270 29191 29190 29184 29138 29137 29116 29115 29051 29012 29007 29002 28966 28959 28957 28911 28904 28903 28897 28893 28848 28809 28807 28796 28790 28782 28773 28734 28719 28645 28544 28543 28542 28475 28474 28473 28471 28470 28428 28403 28365 28363 28325 28319 28318 28316 28315 28314 28271 28269 28228 28184 28183 28138 28132 28125 28063 28022 28016 28015 28014 28013 28011 27968 27966 27965 27964 27963 27882 27836 27815 2 27776 27689 27688 27687 27672 27671 27617 27615 27610 27568 27567 27560 27559 27523 27522 27521 27477 27476 27475 27474 27473 27467 27466 27465 27464 27457 27456 27455 27454 26439 26222 26045 26003 25855 25854 25853 25852 25851 25850 25849 25848 25846) is running... the number of processes is always increasing Thanks, Ian Long Chief Software Architect, Opterus Inc. Email: ian.l...@opterus.com Phone: 416-840-8495 x666 Mobile: 416-817-9206 Web: http://www.opterus.com On 5-Mar-09, at 1:32 PM, Anthony J. Biacco wrote: Have you counted the actual # of requests for both apaches via something like server-status, or looked in mod_jk.log, that they are both receiving an equal # of successful requests? The "Writing to client aborted or client network problems" are nothing to really worry about. They usually mean the browser/client has closed the connection (clicked Stop or clicked Back) before the request was done being processed/sent. -Tony --- Manager, IT Operations Format Dynamics, Inc. 303-573-1800x27 abia...@formatdynamics.com http://www.formatdynamics.com -Original Message- From: Ian Long [mailto:ian.l...@opterus.com] Sent: Thursday, March 05, 2009 10:57 AM To: users@tomcat.apache.org Subject: Tomcat and Apache with mod_jk Hi, I have dedicated RHEL5 boxes (dedicate quad core, 4GB RAM) setup with both apache httpd and tomcat running on the same box, with a hardware load balancer selecting the node a user is routed to. I have mod_jk setup, but am seeing some behaviour I'm not sure is correct. This is on httpd 2.2.3, tomcat 6.0.16, and mod_lk version of 1.2.26. The load balancer pings the machines every 2 seconds as part of a health check. Below are the relevant bits of my configuration: mod_jk.conf == LoadModule jk_module modules/mod_jk.so JkLogFile /var/log/httpd/mod_jk.log JkLogLevel info JkWorkersFile /etc/httpd/conf.d/workers.properties JkShmFile /var/log/httpd/jk.shm JkShmSize 800 JkOptions +ForwardURICompatUnparsed JkMount /* ajp13 JkUnMount /cacti/* ajp13 JkUnMount /manager/* ajp13 workers.properties == worker.list=ajp13 worker.ajp13.port=8009 worker.ajp13.host=localhost worker.ajp13.maintain=60 worker.ajp13.type=ajp13 # worker.ajp13.connection_pool_minsize=0 worker.ajp13.connection_pool_timeout=600 worker.ajp13.connect_timeout=1 worker.ajp13.prepost_timeout=1 worker.ajp13.max_packet_size=16384 httpd.conf StartServers 8 MinSpareServers5 MaxSpareServers 20 ServerLimit 800 MaxClients 800 MaxRequestsPerChild 0 server.xml On one machine, after 5 or 6 hours, when I run netstat to look at connections between http and tomcat, I have 250 or so: tcp0 0 :::127.0.0.1:8009 ::: 127.0.0.1:60408 ESTABLISHED whereas the other machine only has 40 or so, and they are equally load balanced. I tried setting worker.ajp13.connection_pool_minsize=0 but this has no effect on what I'm seeing. Is this the behaviour I should expect? The load on the machine is not that heavy, at the busiest period there would be 3 request per second going to the box. I wouldn't expect this number to keep growing, especially under light load. I'm also seeing a few errors like the following in mod_jk.log: [Thu Mar 05 10:34:08.878 2009] [25849:3086382864] [info] ajp_process_callback::jk_ajp_common.c (1603): Writing to client aborted or client network problems [Thu Mar 05 10:34:08.878 2009] [25849:3086382864] [info] ajp_service::jk_ajp_common.c (2186): (ajp13) sending request to tomcat failed (unrecoverable), because of client write error (attempt=1) [Thu Mar 05 10:34:08.878 2009] [25849:3086382864] [info] jk_handler::mod_jk.c (2357): Aborting connection for worker=ajp13 [Thu Mar 05 10:34:28
Re: Too many threads
Hi Martin. Thank you for your answer. If I have understood correctly, I use Http11Protocol Connector, as it is default connector for attribute protocol and it isn't set in my server.xml (I wrote full listing of this file it in my first letter). And this is clear from the line of the log of catalina.out: ... Mar 5, 2009 9:32:46 PM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on http-123.123.123.123-50002 And I don't have attribute executor anywhere. Mar 5, 2009 9:32:46 PM org.apache.catalina.startup.Catalina start On Wed, Mar 04, 2009 at 05:12:47PM -0500, Martin Gainty wrote: > > check your Connectors: > > are you using the tomcatThreadPool executor? > maxThreads="150" minSpareThreads="4"/> > > /> > > or are you using the NIOConnector? > useSendfile="true" > useExecutor="true" > acceptorThreadCount="1" > pollerThreadCount="1" > pollerThreadPriority="java.lang.Thread#NORM_PRIORITY" > selectorTimeout="1000" > useComet="true" > prcessCache="200" > socket.directBuffer="false" > socket.rxBufSize="25188" > socket.txBufSize="43800" > socket.appReadBufSize="8192" > socket.appWriteBufSize="8192" > socket.bufferPool="500" > socket.bufferPoolSize="1" > socket.processorCache="500" > socket.keyCache="500" > socket.eventCache="500" > socket.tcpNoDelay="false" > socket.soKeepAlive="true" > socket.soTimeout="5000" > protocol="org.apache.coyote.http11.Http11NioProtocol" > maxThreads="150" > connectionTimeout="6" > redirectPort="8443" /> > > ? > 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, 5 Mar 2009 00:52:34 +0300 > > From: ren...@renton.name > > To: users@tomcat.apache.org > > Subject: Too many threads > > > > Hi. > > > > After daemon starting parenting process creayes too many threads. I > > would like to know if they are useful and if not how to lessen their > > number. > > > > $ pstree -p -a tomcat > > java,10869 -server -Xms128M > > -Xmx256M-Djava.util.logging.manager=org.apache.juli.Cl > > |-{java},10877 > > |-{java},10883 > > |-{java},10884 > > |-{java},10885 > > |-{java},10886 > > |-{java},10887 > > |-{java},10888 > > |-{java},10889 > > |-{java},10890 > > |-{java},10898 > > |-{java},10899 > > |-{java},10900 > > |-{java},10918 > > |-{java},10919 > > |-{java},10920 > > |-{java},10921 > > |-{java},10922 > > |-{java},11909 > > |-{java},11928 > > |-{java},7641 > > |-{java},10067 > > |-{java},10069 > > |-{java},10828 > > |-{java},28452 > > |-{java},28453 > > |-{java},28454 > > `-{java},8381 > > > > $ ps axuwww > > > > 7913010869 0.0 0.6 610632 105532 pts/5 Sl Mar03 1:37 > > /opt/sun-jdk-1.6.0.06/bin/java -server -Xms128M -Xmx256M > > -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager > > -Djava.util.logging.config.file=/home/tomcat/http//conf/logging.properties > > -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager > > -Djava.util.logging.config.file=/home/tomcat/http//conf/logging.properties > > -classpath > > /home/tomcat/http/lib/:/home/tomcat/http//lib:/opt/sun-jdk-1.6.0.06/lib/tools.jar:/home/tomcat/http//bin/bootstrap.jar:/home/tomcat/http//bin/tomcat-juli.jar:/home/tomcat/http//lib:/opt/sun-jdk-1.6.0.06/lib/tools.jar:/home/tomcat/http//bin/bootstrap.jar:/home/tomcat/http//bin/tomcat-juli.jar > > -Dcatalina.base=/home/tomcat/http/ -Dcatalina.home=/home/tomcat/http/ > > -Djava.io.tmpdir=/home/tomcat/http//temp > > org.apache.catalina.startup.Bootstrap start > > > > My server.xml > > > > > > > > > SSLEngine="off" /> > > > className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" /> > > > > > type="org.apache.catalina.UserDatabase" > > description="User database that can be updated and saved" > > > > factory="org.apache.catalina.users.MemoryUserDatabaseFactory" > > pathname="conf/tomcat-users.xml" /> > > > > > > > protocol="HTTP/1.1" > >connectionTimeout="2" maxThreads="10" > > minSpareThreads="2" maxSpareThreads="5" /> > > > > >resourceName="UserDatabase"/> > > > unpackWARs="true" autoDeploy="true" > > xmlValidation="false" xmlNamespaceAware="false"> > > > > > > > > > > > > > > -- > > BRGDS. Alexey Vlasov. > > > > - > >
Re: Content length when HTTP Transfer-encoding is chunked
Rainer, Thank you very much for the prompt response. To be more specific, Apache CXF is the consumer of HTTP request. Are you indicating that Apache CXF is the one reading from Socket input stream ? And that Tomcat HTTP Connector simply hands over the Inputstream to CXF to consume the chunked contents ? -mahesh On Thu, Mar 5, 2009 at 10:39 AM, Rainer Jung wrote: > On 05.03.2009 16:16, Mahesh Seshan wrote: >> >> Hello, >> >> I can obtain the content-length of a HTTP Servlet Request when the >> Content-Length header is added by the client. However, when the >> Transfer-encoding is chunked, how do I programatically obtain the >> content length ? > > You can't without consuming the body. > >> The task at hand for me is to prevent a HTTP client from issuing a >> request that has a huge payload that could pose a resource risk on the >> HTTP server. > > Exactly that's the reason, why there is no easy way to get the length. > Whatever component that could provide you with that information would need > to read all of the body (and buffer it for your later use) in order to > measure its length. > > Chunked encoding works with chunks, individual chunks usually are small and > the protocol tells us, how big the next chunk is, but we never know how big > the size of all chunks together is. > > Regards, > > Rainer > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat and Apache with mod_jk
Ok thanks. Based on monitoring, I don't think it's the server taking a long time to respond, it's probably the users doing as you suggested - I just wanted to make sure the log file entries weren't serious. I want to make sure the rising established connection count isn't something to worry about. I will watch it to make sure it doesn't keep growing until it reaches the tomcat thread limit, since the server really isn't that busy. I would assume that even with a request every second, only a small # of established connections should be required to service the load. Basically, the application is unused after 9PM, so I would expect the # of established connections to be cleaned up as they are no longer required. Ian Long Chief Software Architect, Opterus Inc. On 5-Mar-09, at 1:38 PM, André Warnier wrote: Ian Long wrote: [...] Hi Ian. I don't know about the load balancing part, but the following errors : I'm also seeing a few errors like the following in mod_jk.log: [Thu Mar 05 10:34:08.878 2009] [25849:3086382864] [info] ajp_process_callback::jk_ajp_common.c (1603): Writing to client aborted or client network problems [Thu Mar 05 10:34:08.878 2009] [25849:3086382864] [info] ajp_service::jk_ajp_common.c (2186): (ajp13) sending request to tomcat failed (unrecoverable), because of client write error (attempt=1) [Thu Mar 05 10:34:08.878 2009] [25849:3086382864] [info] jk_handler::mod_jk.c (2357): Aborting connection for worker=ajp13 [Thu Mar 05 10:34:28.527 2009] [26222:3086382864] [info] ajp_process_callback::jk_ajp_common.c (1603): Writing to client aborted or client network problems etc... indicate, more often than not, simply that the connection with the client was dropped (by the client or something else - but not the server), before the server could send the response to the client's request. For instance, this happens when the user hits the cancel button in the browser, or when the user gets impatient and starts clicking all over before he gets the server response to his request. If you are absolutely sure that neither of the above is the case (e.g. you issue a request yourself, and patiently wait, and note this message in the logs when it can only be due to your request, then it /could/ indicate some network issue. One such issue which I have experienced is some piece of software or hardware between your browser and the server, dropping the connection unilaterally, because for instance the connection was idle more than xxx seconds. But from the part of the server, it indicates with 100% certainty, that the server was trying to send a response to the client, but no longer could because the connection was no longer there. In the absence of a cancel click or a click on another link, a browser client will only "give up" after a request and close the connection, after several minutes. That's when you get the kind of message "This server does not respond, is maybe down, etc..". HTH (if only inasmuch as the above messages do not lead you into the wrong path for the problem you are experiencing. Of course, a user clicking on cancel or another link, could be the result of your server really taking an inordinate amount of time to respond, causing the user to get impatient...) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat and Apache with mod_jk
Ian Long wrote: [...] Hi Ian. I don't know about the load balancing part, but the following errors : I'm also seeing a few errors like the following in mod_jk.log: [Thu Mar 05 10:34:08.878 2009] [25849:3086382864] [info] ajp_process_callback::jk_ajp_common.c (1603): Writing to client aborted or client network problems [Thu Mar 05 10:34:08.878 2009] [25849:3086382864] [info] ajp_service::jk_ajp_common.c (2186): (ajp13) sending request to tomcat failed (unrecoverable), because of client write error (attempt=1) [Thu Mar 05 10:34:08.878 2009] [25849:3086382864] [info] jk_handler::mod_jk.c (2357): Aborting connection for worker=ajp13 [Thu Mar 05 10:34:28.527 2009] [26222:3086382864] [info] ajp_process_callback::jk_ajp_common.c (1603): Writing to client aborted or client network problems etc... indicate, more often than not, simply that the connection with the client was dropped (by the client or something else - but not the server), before the server could send the response to the client's request. For instance, this happens when the user hits the cancel button in the browser, or when the user gets impatient and starts clicking all over before he gets the server response to his request. If you are absolutely sure that neither of the above is the case (e.g. you issue a request yourself, and patiently wait, and note this message in the logs when it can only be due to your request, then it /could/ indicate some network issue. One such issue which I have experienced is some piece of software or hardware between your browser and the server, dropping the connection unilaterally, because for instance the connection was idle more than xxx seconds. But from the part of the server, it indicates with 100% certainty, that the server was trying to send a response to the client, but no longer could because the connection was no longer there. In the absence of a cancel click or a click on another link, a browser client will only "give up" after a request and close the connection, after several minutes. That's when you get the kind of message "This server does not respond, is maybe down, etc..". HTH (if only inasmuch as the above messages do not lead you into the wrong path for the problem you are experiencing. Of course, a user clicking on cancel or another link, could be the result of your server really taking an inordinate amount of time to respond, causing the user to get impatient...) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat and Apache with mod_jk
Have you counted the actual # of requests for both apaches via something like server-status, or looked in mod_jk.log, that they are both receiving an equal # of successful requests? The "Writing to client aborted or client network problems" are nothing to really worry about. They usually mean the browser/client has closed the connection (clicked Stop or clicked Back) before the request was done being processed/sent. -Tony --- Manager, IT Operations Format Dynamics, Inc. 303-573-1800x27 abia...@formatdynamics.com http://www.formatdynamics.com -Original Message- From: Ian Long [mailto:ian.l...@opterus.com] Sent: Thursday, March 05, 2009 10:57 AM To: users@tomcat.apache.org Subject: Tomcat and Apache with mod_jk Hi, I have dedicated RHEL5 boxes (dedicate quad core, 4GB RAM) setup with both apache httpd and tomcat running on the same box, with a hardware load balancer selecting the node a user is routed to. I have mod_jk setup, but am seeing some behaviour I'm not sure is correct. This is on httpd 2.2.3, tomcat 6.0.16, and mod_lk version of 1.2.26. The load balancer pings the machines every 2 seconds as part of a health check. Below are the relevant bits of my configuration: mod_jk.conf == LoadModule jk_module modules/mod_jk.so JkLogFile /var/log/httpd/mod_jk.log JkLogLevel info JkWorkersFile /etc/httpd/conf.d/workers.properties JkShmFile /var/log/httpd/jk.shm JkShmSize 800 JkOptions +ForwardURICompatUnparsed JkMount /* ajp13 JkUnMount /cacti/* ajp13 JkUnMount /manager/* ajp13 workers.properties == worker.list=ajp13 worker.ajp13.port=8009 worker.ajp13.host=localhost worker.ajp13.maintain=60 worker.ajp13.type=ajp13 # worker.ajp13.connection_pool_minsize=0 worker.ajp13.connection_pool_timeout=600 worker.ajp13.connect_timeout=1 worker.ajp13.prepost_timeout=1 worker.ajp13.max_packet_size=16384 httpd.conf StartServers 8 MinSpareServers5 MaxSpareServers 20 ServerLimit 800 MaxClients 800 MaxRequestsPerChild 0 server.xml On one machine, after 5 or 6 hours, when I run netstat to look at connections between http and tomcat, I have 250 or so: tcp0 0 :::127.0.0.1:8009 ::: 127.0.0.1:60408 ESTABLISHED whereas the other machine only has 40 or so, and they are equally load balanced. I tried setting worker.ajp13.connection_pool_minsize=0 but this has no effect on what I'm seeing. Is this the behaviour I should expect? The load on the machine is not that heavy, at the busiest period there would be 3 request per second going to the box. I wouldn't expect this number to keep growing, especially under light load. I'm also seeing a few errors like the following in mod_jk.log: [Thu Mar 05 10:34:08.878 2009] [25849:3086382864] [info] ajp_process_callback::jk_ajp_common.c (1603): Writing to client aborted or client network problems [Thu Mar 05 10:34:08.878 2009] [25849:3086382864] [info] ajp_service::jk_ajp_common.c (2186): (ajp13) sending request to tomcat failed (unrecoverable), because of client write error (attempt=1) [Thu Mar 05 10:34:08.878 2009] [25849:3086382864] [info] jk_handler::mod_jk.c (2357): Aborting connection for worker=ajp13 [Thu Mar 05 10:34:28.527 2009] [26222:3086382864] [info] ajp_process_callback::jk_ajp_common.c (1603): Writing to client aborted or client network problems [Thu Mar 05 10:34:28.527 2009] [26222:3086382864] [info] ajp_service::jk_ajp_common.c (2186): (ajp13) sending request to tomcat failed (unrecoverable), because of client write error (attempt=1) [Thu Mar 05 10:34:28.528 2009] [26222:3086382864] [info] jk_handler::mod_jk.c (2357): Aborting connection for worker=ajp13 [Thu Mar 05 10:36:01.071 2009] [25855:3086382864] [info] ajp_process_callback::jk_ajp_common.c (1603): Writing to client aborted or client network problems [Thu Mar 05 10:36:01.072 2009] [25855:3086382864] [info] ajp_service::jk_ajp_common.c (2186): (ajp13) sending request to tomcat failed (unrecoverable), because of client write error (attempt=1) [Thu Mar 05 10:36:01.072 2009] [25855:3086382864] [info] jk_handler::mod_jk.c (2357): Aborting connection for worker=ajp13 [Thu Mar 05 11:53:42.298 2009] [27523:3086382864] [info] ajp_process_callback::jk_ajp_common.c (1603): Writing to client aborted or client network problems [Thu Mar 05 11:53:42.298 2009] [27523:3086382864] [info] ajp_service::jk_ajp_common.c (2186): (ajp13) sending request to tomcat failed (unrecoverable), because of client write error (attempt=1) [Thu Mar 05 11:53:42.298 2009] [27523:3086382864] [info] jk_handler::mod_jk.c (2357): Aborting connection for worker=ajp13 [Thu Mar 05 12:08:07.551 2009] [28365:3086382864] [info] ajp_process_callback::jk_ajp_common.c (1603): Writing to client aborted or client network problems [Thu Mar 05 12:08:07.551 2009] [28365:3086382864] [info] ajp_se
Tomcat and Apache with mod_jk
Hi, I have dedicated RHEL5 boxes (dedicate quad core, 4GB RAM) setup with both apache httpd and tomcat running on the same box, with a hardware load balancer selecting the node a user is routed to. I have mod_jk setup, but am seeing some behaviour I'm not sure is correct. This is on httpd 2.2.3, tomcat 6.0.16, and mod_lk version of 1.2.26. The load balancer pings the machines every 2 seconds as part of a health check. Below are the relevant bits of my configuration: mod_jk.conf == LoadModule jk_module modules/mod_jk.so JkLogFile /var/log/httpd/mod_jk.log JkLogLevel info JkWorkersFile /etc/httpd/conf.d/workers.properties JkShmFile /var/log/httpd/jk.shm JkShmSize 800 JkOptions +ForwardURICompatUnparsed JkMount /* ajp13 JkUnMount /cacti/* ajp13 JkUnMount /manager/* ajp13 workers.properties == worker.list=ajp13 worker.ajp13.port=8009 worker.ajp13.host=localhost worker.ajp13.maintain=60 worker.ajp13.type=ajp13 # worker.ajp13.connection_pool_minsize=0 worker.ajp13.connection_pool_timeout=600 worker.ajp13.connect_timeout=1 worker.ajp13.prepost_timeout=1 worker.ajp13.max_packet_size=16384 httpd.conf StartServers 8 MinSpareServers5 MaxSpareServers 20 ServerLimit 800 MaxClients 800 MaxRequestsPerChild 0 server.xml minSpareThreads="5" packetSize="16384" address="127.0.0.1" enableLookups="false" disableUploadTimeout="true" maxSpareThreads="75" maxThreads="800" protocol="AJP/1.3" /> On one machine, after 5 or 6 hours, when I run netstat to look at connections between http and tomcat, I have 250 or so: tcp0 0 :::127.0.0.1:8009 ::: 127.0.0.1:60408 ESTABLISHED whereas the other machine only has 40 or so, and they are equally load balanced. I tried setting worker.ajp13.connection_pool_minsize=0 but this has no effect on what I'm seeing. Is this the behaviour I should expect? The load on the machine is not that heavy, at the busiest period there would be 3 request per second going to the box. I wouldn't expect this number to keep growing, especially under light load. I'm also seeing a few errors like the following in mod_jk.log: [Thu Mar 05 10:34:08.878 2009] [25849:3086382864] [info] ajp_process_callback::jk_ajp_common.c (1603): Writing to client aborted or client network problems [Thu Mar 05 10:34:08.878 2009] [25849:3086382864] [info] ajp_service::jk_ajp_common.c (2186): (ajp13) sending request to tomcat failed (unrecoverable), because of client write error (attempt=1) [Thu Mar 05 10:34:08.878 2009] [25849:3086382864] [info] jk_handler::mod_jk.c (2357): Aborting connection for worker=ajp13 [Thu Mar 05 10:34:28.527 2009] [26222:3086382864] [info] ajp_process_callback::jk_ajp_common.c (1603): Writing to client aborted or client network problems [Thu Mar 05 10:34:28.527 2009] [26222:3086382864] [info] ajp_service::jk_ajp_common.c (2186): (ajp13) sending request to tomcat failed (unrecoverable), because of client write error (attempt=1) [Thu Mar 05 10:34:28.528 2009] [26222:3086382864] [info] jk_handler::mod_jk.c (2357): Aborting connection for worker=ajp13 [Thu Mar 05 10:36:01.071 2009] [25855:3086382864] [info] ajp_process_callback::jk_ajp_common.c (1603): Writing to client aborted or client network problems [Thu Mar 05 10:36:01.072 2009] [25855:3086382864] [info] ajp_service::jk_ajp_common.c (2186): (ajp13) sending request to tomcat failed (unrecoverable), because of client write error (attempt=1) [Thu Mar 05 10:36:01.072 2009] [25855:3086382864] [info] jk_handler::mod_jk.c (2357): Aborting connection for worker=ajp13 [Thu Mar 05 11:53:42.298 2009] [27523:3086382864] [info] ajp_process_callback::jk_ajp_common.c (1603): Writing to client aborted or client network problems [Thu Mar 05 11:53:42.298 2009] [27523:3086382864] [info] ajp_service::jk_ajp_common.c (2186): (ajp13) sending request to tomcat failed (unrecoverable), because of client write error (attempt=1) [Thu Mar 05 11:53:42.298 2009] [27523:3086382864] [info] jk_handler::mod_jk.c (2357): Aborting connection for worker=ajp13 [Thu Mar 05 12:08:07.551 2009] [28365:3086382864] [info] ajp_process_callback::jk_ajp_common.c (1603): Writing to client aborted or client network problems [Thu Mar 05 12:08:07.551 2009] [28365:3086382864] [info] ajp_service::jk_ajp_common.c (2186): (ajp13) sending request to tomcat failed (unrecoverable), because of client write error (attempt=1) [Thu Mar 05 12:08:07.551 2009] [28365:3086382864] [info] jk_handler::mod_jk.c (2357): Aborting connection for worker=ajp13 [Thu Mar 05 12:08:17.432 2009] [28428:3086382864] [info] ajp_process_callback::jk_ajp_common.c (1603): Writing to client aborted or client network problems [Thu Mar 05 12:08:17.432 2009] [28428:3086382864] [info] ajp_service::jk_ajp_common.c (2186): (ajp13) sending request to tomcat failed (unreco
Re: RemoteAddrValve and RemoteHostValve
I'm always a few days behind the thread, but wanted to share. If I had only known that I can configure the Valve at the Context level (from Chuck's prior email). Regardless, I recently wrote a java filter to filter IP's at the application level, which replicates the valve functionality. http://j2eewebprogrammer.blogspot.com/2008/12/filtering-ip-traffic-using-java-filter.html HTH On Mon, Mar 2, 2009 at 12:18 PM, Christopher Schultz < ch...@christopherschultz.net> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Zak, > > On 2/27/2009 9:28 PM, Zak Mc Kracken wrote: > > I'd like to filter incoming requests with this criterion: > > > > if it's www.somewhere.com -> OK > > else if it's 1.2.3.4 -> OK > > else -> KO > > You could always use our favorite urlrewrite tool: > http://tuckey.org/urlrewrite/ > > This can manage many criteria, "chained" or not. > > - -chris > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.9 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iEYEARECAAYFAkmsFQIACgkQ9CaO5/Lv0PC2mACdEmW+hq/u2W+jY7kgr9Md4Qhm > dBQAnRxW3YE+wsbX3Nabkauk513AtYpc > =DXBg > -END PGP SIGNATURE- > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > -- Regards, Edward Song Java Web Developer 631-396-5000 x306
RE: CAS on tomcat 6.0.18
Agreed - installing tomcat from tomcat.apache.org fixed this issue. ThanKs, Paul From: Caldarale, Charles R [chuck.caldar...@unisys.com] Sent: 04 March 2009 16:47 To: Tomcat Users List Subject: RE: CAS on tomcat 6.0.18 > From: Paul Maxted [mailto:paul.max...@aricent.com] > Subject: CAS on tomcat 6.0.18 > > Before you say ask the spring or cas forum, I've trawled > there forums and found a thread that indicates a bug in tomcat 5.5.25 > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=460839 This is not a bug in Tomcat, but rather yet another error in the repackaging done by the 3rd-party vendor. Try using a real Tomcat from tomcat.apache.org, and see what happens. If the problem cannot be reproduced on a real Tomcat, you need to take it up with your package vendor. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org "DISCLAIMER: This message is proprietary to Aricent and is intended solely for the use of the individual to whom it is addressed. It may contain privileged or confidential information and should not be circulated or used for any purpose other than for what it is intended. If you have received this message in error,please notify the originator immediately. If you are not the intended recipient, you are notified that you are strictly prohibited from using, copying, altering, or disclosing the contents of this message. Aricent accepts no responsibility for loss or damage arising from the use of the information transmitted by this email including damage from virus." - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: mod_jk and Named URLs
On 05.03.2009 16:44, Alexander Diedler wrote: Hello, The trainer on a Tomcat Training told us, that Apache 2.2 development project will be closed as it happens with mod_jk2. So the Apache 2.0.x should be the main development path and I found the Configuration in Apache 2.2 with many included files in the httpd.conf very difficult. Sorry to be rude, but that's complete bullshit. Have a look yourself at the release history and commit frequency. 2.2 is the active line of development and at the moment we are there at 2.2.11, which is pretty stable. 1.3 and 2.0 only will get new releases, when serious security patches need to be applied (or for 2.0 maybe also for other serious problems). The project is now actively working towards 2.4. The httpd development versions are the odd version numbers, so 2.1 waqs development and 2.3 will be. Either you misunderstood him, or he's got no idea. Look at http://httpd.apache.org/ which calls 2.0 "legacy release". The developers for 1.3, 2.0 and 2.2 are the same. Regards, Rainer -Ursprüngliche Nachricht- Von: Rainer Jung [mailto:rainer.j...@kippdata.de] Gesendet: Donnerstag, 5. März 2009 16:35 An: Tomcat Users List Betreff: Re: mod_jk and Named URLs On 05.03.2009 16:10, Alexander Diedler wrote: Hmm in Apache 2.0.xx and mod_jk same issue... That’s bad,.. it should be possible to use "/" in URLS I can only guess, since you didn't really answer mail mail, so I don't know, whether I'm on the right track here. When using Apache, you can allow encoded slashes with AllowEncodedSlashes See: http://httpd.apache.org/docs/2.2/mod/core.html#allowencodedslashes If you plan to use Apache, then why don't you directly move to Apache 2.2 instead of the old 2.0? Regards, Rainer -Ursprüngliche Nachricht- Von: Rainer Jung [mailto:rainer.j...@kippdata.de] Gesendet: Dienstag, 3. März 2009 14:38 An: Tomcat Users List Betreff: Re: mod_jk and Named URLs On 03.03.2009 13:39, Alexander Diedler wrote: Hello, There are a functionalliity, that I don´t understand. We have a Tomcat 6.0.18 installed with mod_jk connected to a IIS 5.0. The CMS uses namedURLs like http://[blabla]/company/menuitem1/ . In the Tomcat everything works fine but the IIS and mod_jk don´t serve the following URLS : The menuitem is called "Bugs/Features/" the URL is now http://[blabla]/go/Bugs/Features/";. So the slash between Bugs and Features will be interpreted as a Menuitem separator, but is not correct. In the mod_jk.log we can find: [Tue Mar 03 12:29:55.075 2009] [4148:504] [emerg] HttpFilterProc::jk_isapi_plugin.c (1877): [/go/Bugs/Features/] contains forbidden escape sequences. What we have to do that the IIS seems to look up for the coorect NamedURL? It seems your URLs contained either encoded slashes (%2f) or encoded null bytes (%00). Both are not allowed by the iis isapi redirector because of security reasons. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
AW: mod_jk and Named URLs
Hello, The trainer on a Tomcat Training told us, that Apache 2.2 development project will be closed as it happens with mod_jk2. So the Apache 2.0.x should be the main development path and I found the Configuration in Apache 2.2 with many included files in the httpd.conf very difficult. -Ursprüngliche Nachricht- Von: Rainer Jung [mailto:rainer.j...@kippdata.de] Gesendet: Donnerstag, 5. März 2009 16:35 An: Tomcat Users List Betreff: Re: mod_jk and Named URLs On 05.03.2009 16:10, Alexander Diedler wrote: > Hmm in Apache 2.0.xx and mod_jk same issue... That’s bad,.. it should be > possible to use "/" in URLS I can only guess, since you didn't really answer mail mail, so I don't know, whether I'm on the right track here. When using Apache, you can allow encoded slashes with AllowEncodedSlashes See: http://httpd.apache.org/docs/2.2/mod/core.html#allowencodedslashes If you plan to use Apache, then why don't you directly move to Apache 2.2 instead of the old 2.0? Regards, Rainer > -Ursprüngliche Nachricht- > Von: Rainer Jung [mailto:rainer.j...@kippdata.de] > Gesendet: Dienstag, 3. März 2009 14:38 > An: Tomcat Users List > Betreff: Re: mod_jk and Named URLs > > On 03.03.2009 13:39, Alexander Diedler wrote: >> Hello, >> >> There are a functionalliity, that I don´t understand. We have a >> Tomcat 6.0.18 installed with mod_jk connected to a IIS 5.0. The CMS >> uses namedURLs like http://[blabla]/company/menuitem1/ . In the >> Tomcat everything works fine but the IIS and mod_jk don´t serve the >> following URLS : The menuitem is called "Bugs/Features/" the URL is >> now http://[blabla]/go/Bugs/Features/";. So the slash between Bugs and >> Features will be interpreted as a Menuitem separator, but is not >> correct. In the mod_jk.log we can find: >> >> [Tue Mar 03 12:29:55.075 2009] [4148:504] [emerg] >> HttpFilterProc::jk_isapi_plugin.c (1877): [/go/Bugs/Features/] >> contains forbidden escape sequences. >> >> What we have to do that the IIS seems to look up for the coorect >> NamedURL? > > It seems your URLs contained either encoded slashes (%2f) or encoded > null bytes (%00). Both are not allowed by the iis isapi redirector > because of security reasons. > > Regards, > > Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org smime.p7s Description: S/MIME cryptographic signature
Re: Content length when HTTP Transfer-encoding is chunked
On 05.03.2009 16:16, Mahesh Seshan wrote: Hello, I can obtain the content-length of a HTTP Servlet Request when the Content-Length header is added by the client. However, when the Transfer-encoding is chunked, how do I programatically obtain the content length ? You can't without consuming the body. The task at hand for me is to prevent a HTTP client from issuing a request that has a huge payload that could pose a resource risk on the HTTP server. Exactly that's the reason, why there is no easy way to get the length. Whatever component that could provide you with that information would need to read all of the body (and buffer it for your later use) in order to measure its length. Chunked encoding works with chunks, individual chunks usually are small and the protocol tells us, how big the next chunk is, but we never know how big the size of all chunks together is. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: mod_jk and Named URLs
On 05.03.2009 16:10, Alexander Diedler wrote: Hmm in Apache 2.0.xx and mod_jk same issue... That’s bad,.. it should be possible to use "/" in URLS I can only guess, since you didn't really answer mail mail, so I don't know, whether I'm on the right track here. When using Apache, you can allow encoded slashes with AllowEncodedSlashes See: http://httpd.apache.org/docs/2.2/mod/core.html#allowencodedslashes If you plan to use Apache, then why don't you directly move to Apache 2.2 instead of the old 2.0? Regards, Rainer -Ursprüngliche Nachricht- Von: Rainer Jung [mailto:rainer.j...@kippdata.de] Gesendet: Dienstag, 3. März 2009 14:38 An: Tomcat Users List Betreff: Re: mod_jk and Named URLs On 03.03.2009 13:39, Alexander Diedler wrote: Hello, There are a functionalliity, that I don´t understand. We have a Tomcat 6.0.18 installed with mod_jk connected to a IIS 5.0. The CMS uses namedURLs like http://[blabla]/company/menuitem1/ . In the Tomcat everything works fine but the IIS and mod_jk don´t serve the following URLS : The menuitem is called "Bugs/Features/" the URL is now http://[blabla]/go/Bugs/Features/";. So the slash between Bugs and Features will be interpreted as a Menuitem separator, but is not correct. In the mod_jk.log we can find: [Tue Mar 03 12:29:55.075 2009] [4148:504] [emerg] HttpFilterProc::jk_isapi_plugin.c (1877): [/go/Bugs/Features/] contains forbidden escape sequences. What we have to do that the IIS seems to look up for the coorect NamedURL? It seems your URLs contained either encoded slashes (%2f) or encoded null bytes (%00). Both are not allowed by the iis isapi redirector because of security reasons. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Content length when HTTP Transfer-encoding is chunked
Hello, I can obtain the content-length of a HTTP Servlet Request when the Content-Length header is added by the client. However, when the Transfer-encoding is chunked, how do I programatically obtain the content length ? The task at hand for me is to prevent a HTTP client from issuing a request that has a huge payload that could pose a resource risk on the HTTP server. Any help or pointers appreciated. Thank you, -mahesh - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat 6 / Apache 2.2 Cluster Issue
I have one Apache http server version 2.2.3 (on Red Hat Enterprise Linux 5) and three Tomcat 6 servers (on Windows Server 2003) running in my cluster. Everything "appears" to be working well. It looks like it is using RoundRobin because every time I refresh the page it goes from web001 -> web002 -> web003 -> web001 -> etc. I used some of the examples that are provided with Tomcat in the "examples" directory - specifically the "Sessions" servlet and it looks like my sessions are staying the same and holding information. My issue is this. When I stop one of the Tomcat servers (let's say web002), I will sometimes get the following error message when I refresh the page: - - - - - - - - - - Proxy Error The proxy server received an invalid response from an upstream server. The proxy server could not handle the request GET /examples/instance.html. Reason: Error reading from remote server Apache/2.2.3 (Red Hat) Server at 150.37.0.20 Port 80 - - - - - - - - - - I don't get this error message every single time I refresh the page but I do get it often. It looks like Apache http server is still trying to access the Tomcat server web002 even though it is down. Does this sound like I have an incorrect configuration to anybody or is this normal? I would not think that it was normal, as clustering is supposed to prevent errors like this. I have been following the examples in the O'Reilly book "Tomcat: The Definitive Guide" in chapter 10 - "Tomcat Clustering". Any help anybody can provide will be greatly appreciated. Thank you for reading, have a good day. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
AW: mod_jk and Named URLs
Hello, Hmm in Apache 2.0.xx and mod_jk same issue... That’s bad,.. it should be possible to use "/" in URLS Alex -Ursprüngliche Nachricht- Von: Rainer Jung [mailto:rainer.j...@kippdata.de] Gesendet: Dienstag, 3. März 2009 14:38 An: Tomcat Users List Betreff: Re: mod_jk and Named URLs On 03.03.2009 13:39, Alexander Diedler wrote: > Hello, > > There are a functionalliity, that I don´t understand. We have a > Tomcat 6.0.18 installed with mod_jk connected to a IIS 5.0. The CMS > uses namedURLs like http://[blabla]/company/menuitem1/ . In the > Tomcat everything works fine but the IIS and mod_jk don´t serve the > following URLS : The menuitem is called "Bugs/Features/" the URL is > now http://[blabla]/go/Bugs/Features/";. So the slash between Bugs and > Features will be interpreted as a Menuitem separator, but is not > correct. In the mod_jk.log we can find: > > [Tue Mar 03 12:29:55.075 2009] [4148:504] [emerg] > HttpFilterProc::jk_isapi_plugin.c (1877): [/go/Bugs/Features/] > contains forbidden escape sequences. > > What we have to do that the IIS seems to look up for the coorect > NamedURL? It seems your URLs contained either encoded slashes (%2f) or encoded null bytes (%00). Both are not allowed by the iis isapi redirector because of security reasons. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org smime.p7s Description: S/MIME cryptographic signature
Is there a configurable parameter in web.xml for....
... the time period that tomcat spends honouring current requests when the server is shutdown? We have a web app used for secure file transfers and occasionally we need to take it down, however some requests for downloads can take more than an hour as the system allows very large files to be uploaded. I know tomcat will stop taking new requests when the server is stopped, but what would be good would be to set a parameter saying fully honour all current requests before you completely finish (tomcat may already do this I am not sure). Thanks, Paul *** This message may contain confidential and privileged information. If you are not the intended recipient you should not disclose, copy or distribute information in this e-mail or take any action in reliance on its contents. To do so is strictly prohibited and may be unlawful. Please inform the sender that this message has gone astray before deleting it. Thank you. 2008 marks the 60th anniversary of the NHS. It's an opportunity to pay tribute to the NHS staff and volunteers who help shape the service, and celebrate their achievements. If you work for the NHS and would like an NHSmail email account, go to: www.connectingforhealth.nhs.uk/nhsmail *** - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat w/apr data lost in http post request?
Can the wget clone do this without modification, or do I need to change it? So basically you're saying: Send content larger then content-length. Then close the connection, see if the post request gets processed? The ajax requests may be done over a seperate connection, but all subsequent requests use keepalive and are definately done over the same connection, this is in firefox 3.0.6. I fired up my network analyzer, to be 100% sure and there are no new outgoing connections there. T Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Taylan, On 3/3/2009 2:07 PM, Taylan Develioglu wrote: I can reproduce it on demand with our application, but I wouldn't know how to create a post request that would stall, the servlet can stall the response, but isn't processing of the request (i.e. fetching post parameters) done by tomcat? You would write a client that sets Content-Length, sends half of it, and then does a sleep for a few seconds, then attempts to send the rest. I have a Java clone of wget that I could loan you if you wanna play with it. You might be able to reproduce it as follows: - Create a http connector with a keepalive timeout of 5s. (apr w/ 10s in our case, but it happens with NIO as well. Check previous post for our connector definition) - Have an ajax app do post requests to servlet A that logs the post parameters. (javascript/ajax in our case, check previous post for our http header info) - See if any post parameters come up empty at servlet A. I would think that AJAX requests would be sent in separate HTTP connections, not in a keepalive connection that stays open for a long time, no? Note that I almost certainly think this only happens w/ clients that use IE 6/7. It's possible/probable that MSIE's Ajax implementation is broken. I'd be interested to see if there's any difference between HTTP communications on a well-behaved browser versus MSIE. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkmtutUACgkQ9CaO5/Lv0PDXDgCeNjewNeQRp7zz2svUA9cdAiyb hBgAn2PJQi6ezQeAjVW2rx5la9g5MTve =/87l -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Effect of Heap Size on Performance?
I always hold this as a ground rule: Increase heapsize as much as possible as long as: latency goals are met (gc does note take too long) enough memory is spared for system and vm. (enough to compensate for spikes, watch your swap usage to determine this) hope this helps a bit Peter Crowther wrote: From: Robinson, Eric [eric.robin...@psmnv.com] Is there a way to tell what the optimal heap size is for our application, and whether the current small size is effecting performance (aside from trial-and-error or repeated benchmarking with tools like jmeter)? Smaller heap sizes may lead to more frequent garbage collection, which costs CPU cycles* and hence affects performance. If your app is spending much of its time in the garbage collector, increasing heap would help - but it's then a process of trial-and-error to work out what the "optimal" size is, as it's a trade-off between %CPU spent in garbage collection and memory. As a sketch, I'd turn on some of the GC monitoring in the virtual machine and see if you can get a feel for how much time it's spending in the GC. Most of my apps are well below 1%, though I have one (.Net app) that spends c. 98% of its time in the GC as it loads state from disk. You also need to decide what's "good enough". The difference in "real-world" performance between spending 0.1% and 1% in the GC is negligible; the difference between 10% and 90% is rather obvious! - Peter * Some of the cycles would be spent no matter when the garbage happened to be collected; others are overhead each time, though GC algorithms have improved a lot and the overhead's far lower than it used to be. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: can tomcat 5.0 run ejb's and support online credit cardpayments
l...@work wrote: > hi, > 1. i decide to take up tomcat 6.0 .but how do i make the credit > card page secure. That's a very broad question and not really a Tomcat support question. You may find this site useful: http://www.owasp.org/ > i am coding in java and is it possible to code the transactions without > storing information and pass it to the API's from payment processor. Yes. > 2.when i launch this site how do i ensure it's security .. Study security best practices. A lot. > so that people can freely use it as a secure site..what are the requirements > for it to be a > secure site. That's not really a Tomcat support question either. The CPI security specs are pretty explicit, though they are complicated. I suggest you start by reading your payment services providers documentation and doing follow up research on any concepts you don't understand. The good people of this list *may* choose to give you a tutorial on this topic, but most people are interested in solving actual problems with the server, which you don't appear to be having yet. p > thanks in advance. > > > Caldarale, Charles R wrote: >>> From: l...@work [mailto:surya...@gmail.com] >>> Subject: RE: can tomcat 5.0 run ejb's and support online >>> credit cardpayments >>> what do you suggest ..better to use ejb's with >>> jboss or write servlet in tomcat..which will have >>> less problems when it comes to integration with >>> the payment processr and security issues. >> If you're writing your own application, it shouldn't make any difference. >> If you obtain an application from somewhere else, you'll need to run that >> application in the kind of container the application is designed for. >> It's all up to you. >> >> - Chuck >> >> >> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY >> MATERIAL and is thus for use only by the intended recipient. If you >> received this in error, please contact the sender and delete the e-mail >> and its attachments from all computers. >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> >> >> > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org