[OT] Re: So many timeout values
2009/10/28 Christopher Schultz ch...@christopherschultz.net: Everybody ought to learn a little C at some point. It will make you really appreciate a relatively clean language like Java. ICL PLAN3 asembler, anyone? :-) More seriously, I agree with you and would add a second reason: doing a little work in a language that is reasonably close to the metal gives an insight into how the machine actually works, which stands you in good stead when thinking about algorithms and resource usage in those higher-level languages. (And building a primitive CPU from components helps even more, but not many of us get to do that any more!) - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [OT] Re: So many timeout values
Peter Crowther wrote: 2009/10/28 Christopher Schultz ch...@christopherschultz.net: Everybody ought to learn a little C at some point. It will make you really appreciate a relatively clean language like Java. ICL PLAN3 asembler, anyone? :-) More seriously, I agree with you and would add a second reason: doing a little work in a language that is reasonably close to the metal gives an insight into how the machine actually works, which stands you in good stead when thinking about algorithms and resource usage in those higher-level languages. As long as we're on the [OT] subject, how about learning about the judicious and parcimonious usage of sorted data structures, on a computer with 16 Kb of RAM and punched paper cards as its only external memory store (IBM System 4, RPG) ? 2 GB heaps, ha ! Anyone else upping the ante ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [OT] Re: So many timeout values
I was the happiest man in the world when they delivered our shiny new System/34. No more punch cards! --Original Message-- From: André Warnier To: Tomcat Users List ReplyTo: Tomcat Users List ReplyTo: Tomcat Users List Subject: Re: [OT] Re: So many timeout values Sent: Oct 29, 2009 5:08 AM Peter Crowther wrote: 2009/10/28 Christopher Schultz ch...@christopherschultz.net: Everybody ought to learn a little C at some point. It will make you really appreciate a relatively clean language like Java. ICL PLAN3 asembler, anyone? :-) More seriously, I agree with you and would add a second reason: doing a little work in a language that is reasonably close to the metal gives an insight into how the machine actually works, which stands you in good stead when thinking about algorithms and resource usage in those higher-level languages. As long as we're on the [OT] subject, how about learning about the judicious and parcimonious usage of sorted data structures, on a computer with 16 Kb of RAM and punched paper cards as its only external memory store (IBM System 4, RPG) ? 2 GB heaps, ha ! Anyone else upping the ante ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org Sent from my Verizon Wireless BlackBerry
RE: [OT] Re: So many timeout values
From: André Warnier [mailto:a...@ice-sa.com] Subject: Re: [OT] Re: So many timeout values As long as we're on the [OT] subject, how about learning about the judicious and parcimonious usage of sorted data structures, on a computer with 16 Kb of RAM and punched paper cards as its only external memory store (IBM System 4, RPG) ? 2 GB heaps, ha ! Anyone else upping the ante ? Univac 1004: 961 *6-bit* bytes of core memory, programmed via squids on a plugboard. Handled punch cards, paper tape, and printing; tape drive optional (we didn't have one). Had a tendency to throw cards all over the room if not handled properly. - 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
Re: [OT] Re: So many timeout values
On Thu, Oct 29, 2009 at 9:14 AM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: André Warnier [mailto:a...@ice-sa.com] Subject: Re: [OT] Re: So many timeout values As long as we're on the [OT] subject, how about learning about the judicious and parcimonious usage of sorted data structures, on a computer with 16 Kb of RAM and punched paper cards as its only external memory store (IBM System 4, RPG) ? 2 GB heaps, ha ! Anyone else upping the ante ? Univac 1004: 961 *6-bit* bytes of core memory, programmed via squids on a plugboard. Handled punch cards, paper tape, and printing; tape drive optional (we didn't have one). Had a tendency to throw cards all over the room if not handled properly. - Chuck I'd say you win, 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
Re: [OT] Re: So many timeout values
2009/10/29 Caldarale, Charles R chuck.caldar...@unisys.com: Univac 1004: 961 *6-bit* bytes of core memory, programmed via squids on a plugboard. Handled punch cards, paper tape, and printing; tape drive optional (we didn't have one). Had a tendency to throw cards all over the room if not handled properly. - Chuck packs up and goes home, Chuck wins :-) That's not even a modern stored-program computer! - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: [OT] Re: So many timeout values
From: peter.crowth...@googlemail.com [mailto:peter.crowth...@googlemail.com] On Behalf Of Peter Crowther Subject: Re: [OT] Re: So many timeout values That's not even a modern stored-program computer! Just because it used relays as the logic elements? It was a stored-program computer, although we stored the various plugboards in a closet... This was 1969, and the 1004 was attached to an 1108a via a 6-bit channel. We occasionally had to reprogram the 1004 for special jobs, depending on the character set used for the paper tape or cards. - 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
Re: [OT] Re: So many timeout values
2009/10/29 Caldarale, Charles R chuck.caldar...@unisys.com: From: peter.crowth...@googlemail.com That's not even a modern stored-program computer! Just because it used relays as the logic elements? Hmm. I started writing a response here along the lines of because it didn't keep the code in main memory, then thought about EPROM, paging etc. Ignore that comment :-). I have no problem at all with relay computers, other than the noise! - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [OT] Re: So many timeout values
Warren Pace wrote: On Thu, Oct 29, 2009 at 9:14 AM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: André Warnier [mailto:a...@ice-sa.com] Subject: Re: [OT] Re: So many timeout values As long as we're on the [OT] subject, how about learning about the judicious and parcimonious usage of sorted data structures, on a computer with 16 Kb of RAM and punched paper cards as its only external memory store (IBM System 4, RPG) ? 2 GB heaps, ha ! Anyone else upping the ante ? Univac 1004: 961 *6-bit* bytes of core memory, programmed via squids on a plugboard. Handled punch cards, paper tape, and printing; tape drive optional (we didn't have one). Had a tendency to throw cards all over the room if not handled properly. - Chuck I'd say you win, Chuck. Yep, I give up. I was kind of baiting Chuck, I suspected he would win in the end. But I was hoping for someone to come up in-between up with a Cromemco or NortStar CPU board, for S-100 bus, with a telex paper tape reader as boot device.. The thing above kind of trumps that however. The only 6-bit bytes machine I remember was a Control Data 6600. It had 10 of them in a word though, so pretty big integers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [OT] Re: So many timeout values
On Thu, Oct 29, 2009 at 10:30 AM, André Warnier a...@ice-sa.com wrote: Warren Pace wrote: On Thu, Oct 29, 2009 at 9:14 AM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: André Warnier [mailto:a...@ice-sa.com] Subject: Re: [OT] Re: So many timeout values As long as we're on the [OT] subject, how about learning about the judicious and parcimonious usage of sorted data structures, on a computer with 16 Kb of RAM and punched paper cards as its only external memory store (IBM System 4, RPG) ? 2 GB heaps, ha ! Anyone else upping the ante ? Univac 1004: 961 *6-bit* bytes of core memory, programmed via squids on a plugboard. Handled punch cards, paper tape, and printing; tape drive optional (we didn't have one). Had a tendency to throw cards all over the room if not handled properly. - Chuck I'd say you win, Chuck. Yep, I give up. I was kind of baiting Chuck, I suspected he would win in the end. But I was hoping for someone to come up in-between up with a Cromemco or NortStar CPU board, for S-100 bus, with a telex paper tape reader as boot device.. The thing above kind of trumps that however. The only 6-bit bytes machine I remember was a Control Data 6600. It had 10 of them in a word though, so pretty big integers. I have to admit that I started out on a IBM System/32. Much more advanced system than anything mentioned in this thread. I still remember some RPG, though... - 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: [OT] Re: So many timeout values
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Peter, On 10/29/2009 4:16 AM, Peter Crowther wrote: More seriously, I agree with you and would add a second reason: doing a little work in a language that is reasonably close to the metal gives an insight into how the machine actually works, which stands you in good stead when thinking about algorithms and resource usage in those higher-level languages. +1000 I've seen programmers hack together components simply because they work and get the job done without regard to the performance of their code or sloppiness of the implementation in terms of resource usage, etc. Sorted heaps and vectors of objects instead of simple arrays, String representations of things instead of using native data types or custom objects. I've even seen a whole set of abstract (domain-specific) data types represented by multiply-nested Vector objects with the order of the objects in the Vector enforced by nothing more than (loosely-followed) convention. Ugh. Recently, someone posted to this list asking about serving images off the disk by using an ImageIO library to read a file and then serializing the image to the response's output stream (with no image processing). Sure, that gets the job done, but bytes are bytes so there was no reason whatsoever to use the ImageIO library, other than the fact that there was an API to work with images, and [I'm] working with images, so it makes sense, right [not the words of the poster, but I'm thinking that was his/her reasoning]. (And building a primitive CPU from components helps even more, but not many of us get to do that any more!) In college (university), I got to build a RISC CPU using a software package called LogicWorks. Very cool when it worked properly. We had several floppy disks laying around with time-stamped backups of the hardware laying around because one false move could irreparably ruin the virtual CPU. My team had the second-fastest CPU in the class, and the winners had brilliantly written some of their instructions to take multiple clock ticks so that the single-tick instructions were stupidly fast. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkrpuecACgkQ9CaO5/Lv0PCLWACgtOIKaizwRYAnWizO9TOjdYSj oa4AoJIVpKm2j1PxxZjDpJKS3IkijRLO =+MHY -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: So many timeout values
Based on what I have seen is that we often get HTTP code 502 and by increasing socket timeout those errors disappear. I am not sure why that happens. Based on the feedback I got it looks like the below properties file is ok except the socket timeout piece and I should probably remove that? Here is workers.properties file: ## worker.list=status,tc ## Worker Configuration## # All entries in this section take the form: # worker.workername.directive=value # Worker names are defined in the worker.list directive above. # Configuration specifying the worker named status as a status worker. # This worker can be used to administer the other configured workers. worker.status.type=status # Configuration for the default load balancer worker. # Uncomment the configuration for the tc # worker, and the two node workers below to enable. # Also add lb to the workers.list directive # above. The default for the load balancer worker is # round-robin distribution of requests over # all active nodes. There are currently two nodes set # up for the load balanced worker, add more # to this list if required. Sticky sessions is defaulted to true. worker.tc.type=lb worker.tc.balance_workers=appfe1,appfe2,appfe3,appfe4 worker.tc.sticky_session=true # Two load balanced workers, called node1 and node2. # Copy the configurations and add to the # worker.tc.balanced_workers # list above to add more nodes to the Tomcat cluster. # appfe1 worker.appfe1.type=ajp13 worker.appfe1.port=8009 worker.appfe1.host=appfe1 worker.appfe1.socket_timeout=5 worker.appfe1.socket_keepalive=true worker.appfe1.prepost_timeout=5 worker.appfe1.connect_timeout=5000 worker.appfe1.retries=3 worker.appfe1.recycle_timeout=900 # Refererence BHP Apache tuning guide before uncomment the following line. The unit of reply_timeout is millisecond. #worker.appfe1.reply_timeout=0 # appfe2 worker.appfe2.type=ajp13 worker.appfe2.port=8009 worker.appfe2.host=appfe2 worker.appfe2.socket_timeout=5 worker.appfe2.socket_keepalive=true worker.appfe2.prepost_timeout=5 worker.appfe2.connect_timeout=5000 worker.appfe2.retries=3 worker.appfe2.recycle_timeout=900 # Refererence BHP Apache tuning guide before uncomment the following line. The unit of reply_timeout is millisecond. #worker.appfe2.reply_timeout=0 # appfe3 worker.appfe3.type=ajp13 worker.appfe3.port=8009 worker.appfe3.host=appfe3 worker.appfe3.socket_timeout=5 worker.appfe3.socket_keepalive=true worker.appfe3.prepost_timeout=5 worker.appfe3.connect_timeout=5000 worker.appfe3.retries=3 worker.appfe3.recycle_timeout=900 # Refererence BHP Apache tuning guide before uncomment the following line. The unit of reply_timeout is millisecond. #worker.appfe3.reply_timeout=0 # appfe4 worker.appfe4.type=ajp13 worker.appfe4.port=8009 worker.appfe4.host=appfe4 worker.appfe4.socket_timeout=5 worker.appfe4.socket_keepalive=true worker.appfe4.prepost_timeout=5 worker.appfe4.connect_timeout=5000 worker.appfe4.retries=3 worker.appfe4.recycle_timeout=900 On Tue, Oct 27, 2009 at 1:01 PM, Christopher Schultz ch...@christopherschultz.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mohit, On 10/26/2009 6:40 PM, Mohit Anchlia wrote: Christopher in one of his earlier replies mentioned that we don't have failover set. I am not sure why he said that because we have worker.list and also we have loadbalancer set in our worker.properties. Here is the original workers.properties you listed: worker.host2533.type=ajp13 worker.host2533.port=8009 worker.host2533.host=host2533 worker.host2533.socket_timeout=5 worker.host2533.socket_keepalive=true worker.host2533.prepost_timeout=5 worker.host2533.connect_timeout=5000 worker.host2533.retries=3 worker.host2533.recycle_timeout=900 I see that type=ajp13, not type=lb. I also don't see a worker.list in there at all. Perhaps you didn't post as much configuration as you think you did? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkrnUaAACgkQ9CaO5/Lv0PDywQCfd3b03RtlQUjTc3HDAJAbyOlD a00An0h5vjYzErYfoSc3V5V6/aVSraTg =IF6M -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: So many timeout values
Mohit Anchlia wrote: Based on the feedback I got it looks like the below properties file is ok except the socket timeout piece and I should probably remove that? Do I not recall Rainer already telling you that ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: So many timeout values
On 28.10.2009 17:29, Mohit Anchlia wrote: Based on what I have seen is that we often get HTTP code 502 and by increasing socket timeout those errors disappear. I am not sure why that happens. Based on the feedback I got it looks like the below properties file is ok except the socket timeout piece and I should probably remove that? Yes. See below. Here is workers.properties file: ## worker.list=status,tc ## Worker Configuration## # All entries in this section take the form: # worker.workername.directive=value # Worker names are defined in the worker.list directive above. # Configuration specifying the worker named status as a status worker. # This worker can be used to administer the other configured workers. worker.status.type=status # Configuration for the default load balancer worker. # Uncomment the configuration for the tc # worker, and the two node workers below to enable. # Also add lb to the workers.list directive # above. The default for the load balancer worker is # round-robin distribution of requests over # all active nodes. There are currently two nodes set # up for the load balanced worker, add more # to this list if required. Sticky sessions is defaulted to true. worker.tc.type=lb worker.tc.balance_workers=appfe1,appfe2,appfe3,appfe4 worker.tc.sticky_session=true That's default, but setting it does not harm. # Two load balanced workers, called node1 and node2. # Copy the configurations and add to the # worker.tc.balanced_workers # list above to add more nodes to the Tomcat cluster. Think about using a template, which makes config management easier: # template worker.template.type=ajp13 worker.template.port=8009 worker.template.socket_timeout=5 worker.template.socket_keepalive=true worker.template.prepost_timeout=5 worker.template.connect_timeout=5000 worker.template.retries=3 worker.template.recycle_timeout=900 then worker.appfe1.reference=worker.template worker.appfe1.host=appfe1 worker.appfe2.reference=worker.template worker.appfe2.host=appfe2 ... Concerning the following config: prepost timeout is in milliseconds. 5 is way to short. # appfe1 worker.appfe1.type=ajp13 worker.appfe1.port=8009 worker.appfe1.host=appfe1 worker.appfe1.socket_timeout=5 worker.appfe1.socket_keepalive=true worker.appfe1.prepost_timeout=5 worker.appfe1.connect_timeout=5000 worker.appfe1.retries=3 worker.appfe1.recycle_timeout=900 # Refererence BHP Apache tuning guide before uncomment the following line. The unit of reply_timeout is millisecond. #worker.appfe1.reply_timeout=0 # appfe2 worker.appfe2.type=ajp13 worker.appfe2.port=8009 worker.appfe2.host=appfe2 worker.appfe2.socket_timeout=5 worker.appfe2.socket_keepalive=true worker.appfe2.prepost_timeout=5 worker.appfe2.connect_timeout=5000 worker.appfe2.retries=3 worker.appfe2.recycle_timeout=900 # Refererence BHP Apache tuning guide before uncomment the following line. The unit of reply_timeout is millisecond. #worker.appfe2.reply_timeout=0 # appfe3 worker.appfe3.type=ajp13 worker.appfe3.port=8009 worker.appfe3.host=appfe3 worker.appfe3.socket_timeout=5 worker.appfe3.socket_keepalive=true worker.appfe3.prepost_timeout=5 worker.appfe3.connect_timeout=5000 worker.appfe3.retries=3 worker.appfe3.recycle_timeout=900 # Refererence BHP Apache tuning guide before uncomment the following line. The unit of reply_timeout is millisecond. #worker.appfe3.reply_timeout=0 # appfe4 worker.appfe4.type=ajp13 worker.appfe4.port=8009 worker.appfe4.host=appfe4 worker.appfe4.socket_timeout=5 worker.appfe4.socket_keepalive=true worker.appfe4.prepost_timeout=5 worker.appfe4.connect_timeout=5000 worker.appfe4.retries=3 worker.appfe4.recycle_timeout=900 Now w.r.t. the params, I would slightly change (assuming version 1.2.28): # template worker.template.type=ajp13 worker.template.port=8009 # Only use it if you find a good reason for it :) # worker.template.socket_timeout=5 worker.template.socket_connect_timeout=1 worker.template.socket_keepalive=true worker.template.ping_mode=A worker.template.ping_timeout=1 worker.template.connection_pool_minsize=0 worker.template.connection_pool_timeout=900 worker.template.retries=3 worker.template.recovery_options=7 # Refererence BHP Apache tuning guide before uncomment the # following line. The unit of reply_timeout is millisecond. # Then also set worker.lb.max_reply_timeouts=10 #worker.template.reply_timeout=6 I would also recommend worker.lb.error_escalation_time=0 but opinions about this vary. Note that you need to check, whether your Java Memory and Garbage Collection configuration is fine. Otherwise in case of using large memory the backend might experience long GC pauses triggering some of the above timeouts. Note that connection_pool_timeout (the same as recycle_timeout but not deprecated) should be set to the same time interval than connectTimeout in Connector of server.xml. But in server.xml
Re: So many timeout values
Thanks a lot! Would this work with 1.2.27? Regarding recovery_options: Is there a default value it's set to? On the link http://tomcat.apache.org/connectors-doc/reference/workers.html it doesn't have option 7 Regarding ping_mode: What happens when Cping returns error for ping_mode C? Does it send that user request that's using that connection to other lb node? Wouldn't using Pre Post be the best thing to do? On Wed, Oct 28, 2009 at 10:55 AM, Rainer Jung rainer.j...@kippdata.de wrote: On 28.10.2009 17:29, Mohit Anchlia wrote: Based on what I have seen is that we often get HTTP code 502 and by increasing socket timeout those errors disappear. I am not sure why that happens. Based on the feedback I got it looks like the below properties file is ok except the socket timeout piece and I should probably remove that? Yes. See below. Here is workers.properties file: ## worker.list=status,tc ## Worker Configuration## # All entries in this section take the form: # worker.workername.directive=value # Worker names are defined in the worker.list directive above. # Configuration specifying the worker named status as a status worker. # This worker can be used to administer the other configured workers. worker.status.type=status # Configuration for the default load balancer worker. # Uncomment the configuration for the tc # worker, and the two node workers below to enable. # Also add lb to the workers.list directive # above. The default for the load balancer worker is # round-robin distribution of requests over # all active nodes. There are currently two nodes set # up for the load balanced worker, add more # to this list if required. Sticky sessions is defaulted to true. worker.tc.type=lb worker.tc.balance_workers=appfe1,appfe2,appfe3,appfe4 worker.tc.sticky_session=true That's default, but setting it does not harm. # Two load balanced workers, called node1 and node2. # Copy the configurations and add to the # worker.tc.balanced_workers # list above to add more nodes to the Tomcat cluster. Think about using a template, which makes config management easier: # template worker.template.type=ajp13 worker.template.port=8009 worker.template.socket_timeout=5 worker.template.socket_keepalive=true worker.template.prepost_timeout=5 worker.template.connect_timeout=5000 worker.template.retries=3 worker.template.recycle_timeout=900 then worker.appfe1.reference=worker.template worker.appfe1.host=appfe1 worker.appfe2.reference=worker.template worker.appfe2.host=appfe2 ... Concerning the following config: prepost timeout is in milliseconds. 5 is way to short. # appfe1 worker.appfe1.type=ajp13 worker.appfe1.port=8009 worker.appfe1.host=appfe1 worker.appfe1.socket_timeout=5 worker.appfe1.socket_keepalive=true worker.appfe1.prepost_timeout=5 worker.appfe1.connect_timeout=5000 worker.appfe1.retries=3 worker.appfe1.recycle_timeout=900 # Refererence BHP Apache tuning guide before uncomment the following line. The unit of reply_timeout is millisecond. #worker.appfe1.reply_timeout=0 # appfe2 worker.appfe2.type=ajp13 worker.appfe2.port=8009 worker.appfe2.host=appfe2 worker.appfe2.socket_timeout=5 worker.appfe2.socket_keepalive=true worker.appfe2.prepost_timeout=5 worker.appfe2.connect_timeout=5000 worker.appfe2.retries=3 worker.appfe2.recycle_timeout=900 # Refererence BHP Apache tuning guide before uncomment the following line. The unit of reply_timeout is millisecond. #worker.appfe2.reply_timeout=0 # appfe3 worker.appfe3.type=ajp13 worker.appfe3.port=8009 worker.appfe3.host=appfe3 worker.appfe3.socket_timeout=5 worker.appfe3.socket_keepalive=true worker.appfe3.prepost_timeout=5 worker.appfe3.connect_timeout=5000 worker.appfe3.retries=3 worker.appfe3.recycle_timeout=900 # Refererence BHP Apache tuning guide before uncomment the following line. The unit of reply_timeout is millisecond. #worker.appfe3.reply_timeout=0 # appfe4 worker.appfe4.type=ajp13 worker.appfe4.port=8009 worker.appfe4.host=appfe4 worker.appfe4.socket_timeout=5 worker.appfe4.socket_keepalive=true worker.appfe4.prepost_timeout=5 worker.appfe4.connect_timeout=5000 worker.appfe4.retries=3 worker.appfe4.recycle_timeout=900 Now w.r.t. the params, I would slightly change (assuming version 1.2.28): # template worker.template.type=ajp13 worker.template.port=8009 # Only use it if you find a good reason for it :) # worker.template.socket_timeout=5 worker.template.socket_connect_timeout=1 worker.template.socket_keepalive=true worker.template.ping_mode=A worker.template.ping_timeout=1 worker.template.connection_pool_minsize=0 worker.template.connection_pool_timeout=900 worker.template.retries=3 worker.template.recovery_options=7 # Refererence BHP Apache tuning guide before uncomment the # following line. The unit of reply_timeout is millisecond. # Then also set worker.lb.max_reply_timeouts=10
Re: So many timeout values
On 28.10.2009 19:29, Mohit Anchlia wrote: Thanks a lot! Would this work with 1.2.27? Remove the escalation parameter, I guess that's the only 1.2.28 special param. Regarding recovery_options: Is there a default value it's set to? On the link http://tomcat.apache.org/connectors-doc/reference/workers.html it doesn't have option 7 Yes, the default is 0 and that's bad. Regarding ping_mode: What happens when Cping returns error for ping_mode C? Does it send that user request that's using that connection to other lb node? Yes after retries, because if not CPong is received the node is ery likely broken. Wouldn't using Pre Post be the best thing to do? Both. Connect cping is done after the initial connection setup, prepost cping is done directly before each followup request (2nd, 3rd, ...). On Wed, Oct 28, 2009 at 10:55 AM, Rainer Jung rainer.j...@kippdata.de wrote: On 28.10.2009 17:29, Mohit Anchlia wrote: Based on what I have seen is that we often get HTTP code 502 and by increasing socket timeout those errors disappear. I am not sure why that happens. Based on the feedback I got it looks like the below properties file is ok except the socket timeout piece and I should probably remove that? Yes. See below. Here is workers.properties file: ## worker.list=status,tc ## Worker Configuration## # All entries in this section take the form: # worker.workername.directive=value # Worker names are defined in the worker.list directive above. # Configuration specifying the worker named status as a status worker. # This worker can be used to administer the other configured workers. worker.status.type=status # Configuration for the default load balancer worker. # Uncomment the configuration for the tc # worker, and the two node workers below to enable. # Also add lb to the workers.list directive # above. The default for the load balancer worker is # round-robin distribution of requests over # all active nodes. There are currently two nodes set # up for the load balanced worker, add more # to this list if required. Sticky sessions is defaulted to true. worker.tc.type=lb worker.tc.balance_workers=appfe1,appfe2,appfe3,appfe4 worker.tc.sticky_session=true That's default, but setting it does not harm. # Two load balanced workers, called node1 and node2. # Copy the configurations and add to the # worker.tc.balanced_workers # list above to add more nodes to the Tomcat cluster. Think about using a template, which makes config management easier: # template worker.template.type=ajp13 worker.template.port=8009 worker.template.socket_timeout=5 worker.template.socket_keepalive=true worker.template.prepost_timeout=5 worker.template.connect_timeout=5000 worker.template.retries=3 worker.template.recycle_timeout=900 then worker.appfe1.reference=worker.template worker.appfe1.host=appfe1 worker.appfe2.reference=worker.template worker.appfe2.host=appfe2 ... Concerning the following config: prepost timeout is in milliseconds. 5 is way to short. # appfe1 worker.appfe1.type=ajp13 worker.appfe1.port=8009 worker.appfe1.host=appfe1 worker.appfe1.socket_timeout=5 worker.appfe1.socket_keepalive=true worker.appfe1.prepost_timeout=5 worker.appfe1.connect_timeout=5000 worker.appfe1.retries=3 worker.appfe1.recycle_timeout=900 # Refererence BHP Apache tuning guide before uncomment the following line. The unit of reply_timeout is millisecond. #worker.appfe1.reply_timeout=0 # appfe2 worker.appfe2.type=ajp13 worker.appfe2.port=8009 worker.appfe2.host=appfe2 worker.appfe2.socket_timeout=5 worker.appfe2.socket_keepalive=true worker.appfe2.prepost_timeout=5 worker.appfe2.connect_timeout=5000 worker.appfe2.retries=3 worker.appfe2.recycle_timeout=900 # Refererence BHP Apache tuning guide before uncomment the following line. The unit of reply_timeout is millisecond. #worker.appfe2.reply_timeout=0 # appfe3 worker.appfe3.type=ajp13 worker.appfe3.port=8009 worker.appfe3.host=appfe3 worker.appfe3.socket_timeout=5 worker.appfe3.socket_keepalive=true worker.appfe3.prepost_timeout=5 worker.appfe3.connect_timeout=5000 worker.appfe3.retries=3 worker.appfe3.recycle_timeout=900 # Refererence BHP Apache tuning guide before uncomment the following line. The unit of reply_timeout is millisecond. #worker.appfe3.reply_timeout=0 # appfe4 worker.appfe4.type=ajp13 worker.appfe4.port=8009 worker.appfe4.host=appfe4 worker.appfe4.socket_timeout=5 worker.appfe4.socket_keepalive=true worker.appfe4.prepost_timeout=5 worker.appfe4.connect_timeout=5000 worker.appfe4.retries=3 worker.appfe4.recycle_timeout=900 Now w.r.t. the params, I would slightly change (assuming version 1.2.28): # template worker.template.type=ajp13 worker.template.port=8009 # Only use it if you find a good reason for it :) # worker.template.socket_timeout=5 worker.template.socket_connect_timeout=1 worker.template.socket_keepalive=true
Re: So many timeout values
Thanks. I couldn't find what option retry_options 7 in http://tomcat.apache.org/connectors-doc/reference/workers.html is for. On Wed, Oct 28, 2009 at 11:37 AM, Rainer Jung rainer.j...@kippdata.de wrote: On 28.10.2009 19:29, Mohit Anchlia wrote: Thanks a lot! Would this work with 1.2.27? Remove the escalation parameter, I guess that's the only 1.2.28 special param. Regarding recovery_options: Is there a default value it's set to? On the link http://tomcat.apache.org/connectors-doc/reference/workers.html it doesn't have option 7 Yes, the default is 0 and that's bad. Regarding ping_mode: What happens when Cping returns error for ping_mode C? Does it send that user request that's using that connection to other lb node? Yes after retries, because if not CPong is received the node is ery likely broken. Wouldn't using Pre Post be the best thing to do? Both. Connect cping is done after the initial connection setup, prepost cping is done directly before each followup request (2nd, 3rd, ...). On Wed, Oct 28, 2009 at 10:55 AM, Rainer Jung rainer.j...@kippdata.de wrote: On 28.10.2009 17:29, Mohit Anchlia wrote: Based on what I have seen is that we often get HTTP code 502 and by increasing socket timeout those errors disappear. I am not sure why that happens. Based on the feedback I got it looks like the below properties file is ok except the socket timeout piece and I should probably remove that? Yes. See below. Here is workers.properties file: ## worker.list=status,tc ## Worker Configuration## # All entries in this section take the form: # worker.workername.directive=value # Worker names are defined in the worker.list directive above. # Configuration specifying the worker named status as a status worker. # This worker can be used to administer the other configured workers. worker.status.type=status # Configuration for the default load balancer worker. # Uncomment the configuration for the tc # worker, and the two node workers below to enable. # Also add lb to the workers.list directive # above. The default for the load balancer worker is # round-robin distribution of requests over # all active nodes. There are currently two nodes set # up for the load balanced worker, add more # to this list if required. Sticky sessions is defaulted to true. worker.tc.type=lb worker.tc.balance_workers=appfe1,appfe2,appfe3,appfe4 worker.tc.sticky_session=true That's default, but setting it does not harm. # Two load balanced workers, called node1 and node2. # Copy the configurations and add to the # worker.tc.balanced_workers # list above to add more nodes to the Tomcat cluster. Think about using a template, which makes config management easier: # template worker.template.type=ajp13 worker.template.port=8009 worker.template.socket_timeout=5 worker.template.socket_keepalive=true worker.template.prepost_timeout=5 worker.template.connect_timeout=5000 worker.template.retries=3 worker.template.recycle_timeout=900 then worker.appfe1.reference=worker.template worker.appfe1.host=appfe1 worker.appfe2.reference=worker.template worker.appfe2.host=appfe2 ... Concerning the following config: prepost timeout is in milliseconds. 5 is way to short. # appfe1 worker.appfe1.type=ajp13 worker.appfe1.port=8009 worker.appfe1.host=appfe1 worker.appfe1.socket_timeout=5 worker.appfe1.socket_keepalive=true worker.appfe1.prepost_timeout=5 worker.appfe1.connect_timeout=5000 worker.appfe1.retries=3 worker.appfe1.recycle_timeout=900 # Refererence BHP Apache tuning guide before uncomment the following line. The unit of reply_timeout is millisecond. #worker.appfe1.reply_timeout=0 # appfe2 worker.appfe2.type=ajp13 worker.appfe2.port=8009 worker.appfe2.host=appfe2 worker.appfe2.socket_timeout=5 worker.appfe2.socket_keepalive=true worker.appfe2.prepost_timeout=5 worker.appfe2.connect_timeout=5000 worker.appfe2.retries=3 worker.appfe2.recycle_timeout=900 # Refererence BHP Apache tuning guide before uncomment the following line. The unit of reply_timeout is millisecond. #worker.appfe2.reply_timeout=0 # appfe3 worker.appfe3.type=ajp13 worker.appfe3.port=8009 worker.appfe3.host=appfe3 worker.appfe3.socket_timeout=5 worker.appfe3.socket_keepalive=true worker.appfe3.prepost_timeout=5 worker.appfe3.connect_timeout=5000 worker.appfe3.retries=3 worker.appfe3.recycle_timeout=900 # Refererence BHP Apache tuning guide before uncomment the following line. The unit of reply_timeout is millisecond. #worker.appfe3.reply_timeout=0 # appfe4 worker.appfe4.type=ajp13 worker.appfe4.port=8009 worker.appfe4.host=appfe4 worker.appfe4.socket_timeout=5 worker.appfe4.socket_keepalive=true worker.appfe4.prepost_timeout=5 worker.appfe4.connect_timeout=5000 worker.appfe4.retries=3 worker.appfe4.recycle_timeout=900 Now w.r.t. the params, I would slightly change (assuming version 1.2.28): # template worker.template.type=ajp13
Re: So many timeout values
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mohit, On 10/28/2009 2:29 PM, Mohit Anchlia wrote: Regarding recovery_options: Is there a default value it's set to? On the link http://tomcat.apache.org/connectors-doc/reference/workers.html it doesn't have option 7 That's because 7 isn't a power of 2, and recovery_options is a /bit mask/ (http://en.wikipedia.org/wiki/Bit_mask). Everybody ought to learn a little C at some point. It will make you really appreciate a relatively clean language like Java. (No comments from the Smalltalk or LISP folks out there, please). - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkronyEACgkQ9CaO5/Lv0PCDXwCeL1fX0nErWfqEmDYTnTLhsYH6 5WwAnieOO4YVyYdthW6UGLkhhLVQlS4W =EcMF -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: So many timeout values
I actually have worked on C but didn't read the line about bit mask. Sorry. On Wed, Oct 28, 2009 at 12:44 PM, Christopher Schultz ch...@christopherschultz.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mohit, On 10/28/2009 2:29 PM, Mohit Anchlia wrote: Regarding recovery_options: Is there a default value it's set to? On the link http://tomcat.apache.org/connectors-doc/reference/workers.html it doesn't have option 7 That's because 7 isn't a power of 2, and recovery_options is a /bit mask/ (http://en.wikipedia.org/wiki/Bit_mask). Everybody ought to learn a little C at some point. It will make you really appreciate a relatively clean language like Java. (No comments from the Smalltalk or LISP folks out there, please). - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkronyEACgkQ9CaO5/Lv0PCDXwCeL1fX0nErWfqEmDYTnTLhsYH6 5WwAnieOO4YVyYdthW6UGLkhhLVQlS4W =EcMF -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: So many timeout values
On 26.10.2009 23:40, Mohit Anchlia wrote: I read about timeouts but I still have following questions: 1. From 1.2.28 onwards, if I don't set the ping_mode then the request will still be sent to the BE node from workers.list even if that node is down? Forwarding http requests to a node or not is not directly related to pind_mode. Requests are forwarded to nodes, that are not in error state as long as session stickyness allows to use the node. If by request you mean a CPing, then: by default all pings are disabled. You can enable using either ping_mode or (for compatibility reasons) the old style connect_timeout and prepost_timeout. From the point of view of mod_jk a node is not down, but either in error state or not. If it is in error state no communication is sent, but after a minute it is put in probe mode, which means it will get a single rquest to find out, whether it is again ok or not. In the latter case it is put in error mode again. 2. Does socket_timeout mean how long the socket connection will be kept open? So it actually is like a session timeout? socket_timeout is a difficult beast and I generally do not recommend using it. mod_jk uses it in some special situations in order to be able to abort waiting for data. It is not directly how long a socket will e kept open. How long a socket is kept open depends on how the swocket gets used. Usually you can get away pretty good using CPing and ping_timeout, socket_connect_timeout, eventually reply_timeout with max_reply_timeouts. 3. In 1.2.28 is there a way to dynamically tell mod_jk to stop sending new requests to one of the nodes instead of stopping the worker itself? Stopping the worker in the sense of setting activation to stop is *the* right way of telling mod_jk to not sending any more requests to the worker. If you only want to disable starting new sessions you use activation set to disable. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: So many timeout values
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mohit, On 10/26/2009 6:40 PM, Mohit Anchlia wrote: Christopher in one of his earlier replies mentioned that we don't have failover set. I am not sure why he said that because we have worker.list and also we have loadbalancer set in our worker.properties. Here is the original workers.properties you listed: worker.host2533.type=ajp13 worker.host2533.port=8009 worker.host2533.host=host2533 worker.host2533.socket_timeout=5 worker.host2533.socket_keepalive=true worker.host2533.prepost_timeout=5 worker.host2533.connect_timeout=5000 worker.host2533.retries=3 worker.host2533.recycle_timeout=900 I see that type=ajp13, not type=lb. I also don't see a worker.list in there at all. Perhaps you didn't post as much configuration as you think you did? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkrnUaAACgkQ9CaO5/Lv0PDywQCfd3b03RtlQUjTc3HDAJAbyOlD a00An0h5vjYzErYfoSc3V5V6/aVSraTg =IF6M -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: So many timeout values
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mohit, On 10/25/2009 12:12 PM, Mohit Anchlia wrote: I also trying to understand cpong, prepost and all other timeouts. But it's confusing in terms of which one should be used and which ones can be left alone. We currently have following values, do you see any problem? worker.host2533.type=ajp13 worker.host2533.port=8009 worker.host2533.host=host2533 worker.host2533.socket_timeout=5 worker.host2533.socket_keepalive=true worker.host2533.prepost_timeout=5 worker.host2533.connect_timeout=5000 worker.host2533.retries=3 worker.host2533.recycle_timeout=900 recycle_timeout has been deprecated as of 1.2.26. I feel like we've been through this before... I am assuming prepost_timeout means that try and connect before making a connection Why assume when you can read the documentation for that setting? http://tomcat.apache.org/connectors-doc/reference/workers.html and if that timesout then use other server to send the request It won't use another server: it will kill the connection and re-establish a new one to Tomcat. Note that you haven't set ping_mode, so I don't believe prepost_timeout or connect_timeout will be used for anything. So if server A prepost timeout then try Server B from the worker.list. Certainly not: neither load balancing nor failover have been defined in your configuration, so none will occur. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkrlvfoACgkQ9CaO5/Lv0PDVqgCgv6FmFdkLQnLf+p8rZ2XkUKTE HfAAn1iZUy02LtpN9Aw6On0SnwbekEEO =hBZW -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: So many timeout values
On 26.10.2009 16:19, Christopher Schultz wrote: On 10/25/2009 12:12 PM, Mohit Anchlia wrote: I also trying to understand cpong, prepost and all other timeouts. But it's confusing in terms of which one should be used and which ones can be left alone. We currently have following values, do you see any problem? ... Why assume when you can read the documentation for that setting? http://tomcat.apache.org/connectors-doc/reference/workers.html and also http://tomcat.apache.org/connectors-doc/generic_howto/timeouts.html which tries to collect all necessary infos about timeouts. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: So many timeout values
thanks I'll read that and let you know if I have any questions. On Mon, Oct 26, 2009 at 9:21 AM, Rainer Jung rainer.j...@kippdata.de wrote: On 26.10.2009 16:19, Christopher Schultz wrote: On 10/25/2009 12:12 PM, Mohit Anchlia wrote: I also trying to understand cpong, prepost and all other timeouts. But it's confusing in terms of which one should be used and which ones can be left alone. We currently have following values, do you see any problem? ... Why assume when you can read the documentation for that setting? http://tomcat.apache.org/connectors-doc/reference/workers.html and also http://tomcat.apache.org/connectors-doc/generic_howto/timeouts.html which tries to collect all necessary infos about timeouts. 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: So many timeout values
I read about timeouts but I still have following questions: 1. From 1.2.28 onwards, if I don't set the ping_mode then the request will still be sent to the BE node from workers.list even if that node is down? 2. Does socket_timeout mean how long the socket connection will be kept open? So it actually is like a session timeout? 3. In 1.2.28 is there a way to dynamically tell mod_jk to stop sending new requests to one of the nodes instead of stopping the worker itself? Christopher in one of his earlier replies mentioned that we don't have failover set. I am not sure why he said that because we have worker.list and also we have loadbalancer set in our worker.properties. On Mon, Oct 26, 2009 at 10:54 AM, Mohit Anchlia mohitanch...@gmail.com wrote: thanks I'll read that and let you know if I have any questions. On Mon, Oct 26, 2009 at 9:21 AM, Rainer Jung rainer.j...@kippdata.de wrote: On 26.10.2009 16:19, Christopher Schultz wrote: On 10/25/2009 12:12 PM, Mohit Anchlia wrote: I also trying to understand cpong, prepost and all other timeouts. But it's confusing in terms of which one should be used and which ones can be left alone. We currently have following values, do you see any problem? ... Why assume when you can read the documentation for that setting? http://tomcat.apache.org/connectors-doc/reference/workers.html and also http://tomcat.apache.org/connectors-doc/generic_howto/timeouts.html which tries to collect all necessary infos about timeouts. 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