Re: Tomcat and Windows 2003 Server

2004-05-07 Thread Matt Woodings
I am running Tomcat 4.1.30 on Win 2k3 and it runs just fine :-)
- Original Message - 
From: Anderson Boechat Lopes [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, May 07, 2004 2:11 PM
Subject: Tomcat and Windows 2003 Server


   Hi.

 Sorry.I don´t know if this is the right email to answer my question.
I´m
 new here.

 I have a web-application running with Tomcat on Win 2000 Server and I
 need to move to Win 2003 Server. However, I have already listened that
there
 are some problems running Tomcat on win 2003. It´s true?

 Thanks.

 []'s
 __
  Anderson Boechat Lopes


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: webservices

2004-05-03 Thread Matt Woodings
Take a look at the Axis project and any other you may find interesting at
http://ws.apache.org/

Matt
- Original Message - 
From: Malai [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Monday, May 03, 2004 8:52 AM
Subject: webservices


Hi.,
1.Does Tomcat Support Webservices?. If no anyother way to handle this?
2.what is wevservices project in jakarta site?

Thanks.,
MALAI



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ajp13.service() ajpGetReply recoverable error 3

2004-04-19 Thread Matt Woodings
hi I get the exact same thing with the same configuration and I have been
trawling the news groups and web for answers but to no avail, so I am with
you on getting a definitive answer on this log file output.

Matt
- Original Message - 
From: Michael Sanders [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, April 19, 2004 10:09 AM
Subject: ajp13.service() ajpGetReply recoverable error 3


 I'm using Apache 2.0.49, Tomcat 4.1.29, and mod_jk2 2.04 on Windows
 2000 Server. I'm getting errors in my Apache  Tomcat logs (shown
 below), BUT I do not get any errors shown in the browser and my servlet
 appears to be functioning correctly. I guess the fact that it says
 recoverable error means that it recovers which is why users do not
 see any errors. However I suspect it does mean that the system is
 working sub-optimally. I'd be grateful if someone could give me a clue
 as to the meaning of the errors  any pointers on fixing the problem.

 Many thanks,
 Michael Sanders

 Apache 2.0.49 error log
 ===
 [Mon Apr 19 15:48:53 2004] [error] ajp13.service() ajpGetReply
 recoverable error 3
 [Mon Apr 19 15:48:53 2004] [error] ajp13.service() ajpGetReply
 recoverable error 3
 [Mon Apr 19 15:48:53 2004] [error] ajp13.service() Error  forwarding
 ajp13:localhost:8009 1 0
 [Mon Apr 19 15:48:53 2004] [error] mod_jk2.handler() Error connecting
 to tomcat 3, status 200


 Tomcat 4.1.29 stderr
 
 [ERROR] JkCoyoteHandler - -Error in action code
 java.net.SocketException: Connection aborted by peer: socket write
 errorjava.net.SocketException: Connection aborted by peer: socket
 write error
 at java.net.SocketOutputStream.socketWrite(Native Method)
 at java.net.SocketOutputStream.write(SocketOutputStream.java:91)
 at org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:457)
 at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:654)
 at
 org.apache.jk.server.JkCoyoteHandler.action(JkCoyoteHandler.java:435)
 at org.apache.coyote.Response.action(Response.java:222)
 at org.apache.coyote.Response.finish(Response.java:343)
 at
 org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:314)
 at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:387)
 at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:673)
 at

org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:615)
 at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:786)
 at

org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:666)
 at java.lang.Thread.run(Thread.java:479)

 workers2.properties
 ===
 #define the shared memory file
 [shm]
 file=C:/Program Files/Apache Group/Apache2/jk2.shm

 # Define the communication channel
 [channel.socket:localhost:8009]
 tomcatId=localhost:8009

 [ajp13:localhost:8009]
 channel=channel.socket:localhost:8009

 [uri:/servlet/*]
 worker=ajp13:localhost:8009

 server.xml
 ==
 Server port=8005 shutdown=SHUTDOWN debug=0


   !-- Uncomment these entries to enable JMX MBeans support --
   Listener
 className=org.apache.catalina.mbeans.ServerLifecycleListener
 debug=0/
   Listener
 className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener
 debug=0/

   !-- Global JNDI resources --
   GlobalNamingResources

 !-- Test entry for demonstration purposes --
 Environment name=simpleValue type=java.lang.Integer
 value=30/

 !-- Editable user database that can also be used by
  UserDatabaseRealm to authenticate users --
 Resource name=UserDatabase auth=Container
   type=org.apache.catalina.UserDatabase
description=User database that can be updated and saved
 /Resource
 ResourceParams name=UserDatabase
   parameter
 namefactory/name

 valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value
   /parameter
   parameter
 namepathname/name
 valueconf/tomcat-users.xml/value
   /parameter
 /ResourceParams

   /GlobalNamingResources


   !-- Define the Tomcat Stand-Alone Service --
   Service name=Tomcat-Standalone

 !-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 --
 Connector className=org.apache.coyote.tomcat4.CoyoteConnector
port=8080 minProcessors=5 maxProcessors=75
enableLookups=true redirectPort=8443
acceptCount=100 debug=0 connectionTimeout=2
useURIValidationHack=false disableUploadTimeout=true
 /

 !-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 --
 Connector className=org.apache.coyote.tomcat4.CoyoteConnector
port=8009 minProcessors=5 maxProcessors=100
enableLookups=true redirectPort=8443
acceptCount=100 debug=0 connectionTimeout=30
useURIValidationHack=false

 protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler/

 !-- Define the top level container in our 

Re: Session Mess

2004-04-14 Thread Matt Woodings
Session crossover is a common problem especially when many people log in
from the same machine.  The reason for this could be from caching of the
browser.  What you need to do is to force it to go back to the server and
get the user the latest information.  One way to do this is to add timestamp
data and session id in the url of the page, as this is unique to the user,
and if you run checks on the timestamp etc you can add extra security to
your site also.  This way you will be able to guarantee that the sessions
will stop getting crossed and the right info gets put infront of the user.

Matt
- Original Message - 
From: shyam [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Wednesday, April 14, 2004 8:17 AM
Subject: Session Mess


 Hi All,

 I have an application running on tomcat 4.1.24. Recently I have seen
 some cases where the session is getting messed up. When a user logs in ,
 the data shown is for another user. Recently I had some session expiring
 problems as lot of my sessions never expired. I just fixed the bug by
 setting maxInactiveInterval time. Is it because of this the sessions are
 getting messed up or any other reason. Any help would be thankful

 Thanks
 shyam



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Session Mess

2004-04-14 Thread Matt Woodings
Ahhh, I see.

This might not be a session problem but a code problem.  When you are
uploading, do you store this file using a tmp file or something similar ...
check for synchronization problems, and also check for files with the same
name, i.e. does the files contents start with one set of data and finish
with another.

Matt

- Original Message - 
From: shyam [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Wednesday, April 14, 2004 8:34 AM
Subject: RE: Session Mess


 Hi Matt,
 Thanks for the reply. I understand that if people from the same machine
 log in. But I see an instance when people who are from different
 locations getting the same session. I have two people who have uploaded
 files to my server and both file are same.
 Thanks
 shyam

 Software Engineer
 Adamshand Inc
 www.interviewexchange.com


 -Original Message-
 From: Matt Woodings [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, April 14, 2004 9:45 AM
 To: Tomcat Users List
 Subject: Re: Session Mess

 Session crossover is a common problem especially when many people log in
 from the same machine.  The reason for this could be from caching of the
 browser.  What you need to do is to force it to go back to the server
 and
 get the user the latest information.  One way to do this is to add
 timestamp
 data and session id in the url of the page, as this is unique to the
 user,
 and if you run checks on the timestamp etc you can add extra security to
 your site also.  This way you will be able to guarantee that the
 sessions
 will stop getting crossed and the right info gets put infront of the
 user.

 Matt
 - Original Message - 
 From: shyam [EMAIL PROTECTED]
 To: 'Tomcat Users List' [EMAIL PROTECTED]
 Sent: Wednesday, April 14, 2004 8:17 AM
 Subject: Session Mess


  Hi All,
 
  I have an application running on tomcat 4.1.24. Recently I have seen
  some cases where the session is getting messed up. When a user logs in
 ,
  the data shown is for another user. Recently I had some session
 expiring
  problems as lot of my sessions never expired. I just fixed the bug by
  setting maxInactiveInterval time. Is it because of this the sessions
 are
  getting messed up or any other reason. Any help would be thankful
 
  Thanks
  shyam
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 4.1.30 Standalone and FOP ?

2004-04-14 Thread Matt Woodings
if you are refering to the jakarta Formatting Objects Processor libraries
then yes, I use them extensively for pdf report generation.  Put the FOP
jar, plus any of the XML/XSLT etc jars, in a suitable location and off you
go

Matt
- Original Message - 
From: Philippe Couas [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, April 14, 2004 11:29 AM
Subject: Tomcat 4.1.30 Standalone and FOP ?


Hi,

Can i associate FOP with Tomcat 4.1.30 without Apache ??

Thanks
Philippe

Philippe COUAS

Responsable Développement

INFODEV S.A.





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Can Not Get Tomcat 4.1.27 To Unpack Web Component When There Is A Context Defined For The Web Component

2004-04-14 Thread Matt Woodings
set the unpackWARs=true attribute in the host tag of your server.xml file
and see if that helps

Matt
- Original Message - 
From: Kam Lung Leung [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, April 14, 2004 12:42 PM
Subject: Can Not Get Tomcat 4.1.27 To Unpack Web Component When There Is A
Context Defined For The Web Component


 Hi,

 I installed Tomcat 4.1.27 on our linux Redhat 7.2 box. Tomcat did unpack
all web
 components when there is NO context definition defined for each of these
web
 components in the server.xml file. However, when I create a context for
each of
 these web components, then Tomcat did not unpack these web components.
 Any suggestion is greatly appreciated.


 Here is the context definition for one of my web component:
   Context path=/TestDistributedInputOutput
docBase=TestDistributedInputOutput debug=0
reloadable=true crossContext=true

   Logger className=org.apache.catalina.logger.FileLogger
   prefix=TestDistributedInputOutput suffix=.log
   timestamp=true/

   Resources
className=org.apache.naming.resources.FileDirContext
  allowLinking=true  /

   /Context

 Here is a listing of my steps to startup Tomcat:
 1) Stop Tomcat
 2) Remote the directory created by Tomcat for
TestDistributedInputOutput.war
 3) Add the above context definition in the server.xml for
 TestDistributedInputOutput.war.
 4) Startup Tomcat

 Here is the message from Tomcat.

 2004-04-13 14:20:26 StandardContext[/TestDistributedInputOutput]:
Resources
 start failed:
 java.lang.IllegalArgumentException: Document base
 /usr/local/catalina/webapps/TestDistributedInputOutput does not exist or
is not
 a readable directory
 at

org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:19
3)
 at

org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java
:3343)
 at
 org.apache.catalina.core.StandardContext.start(StandardContext.java:3473)
 at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
 at
org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
 at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
 at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
 at
 org.apache.catalina.core.StandardService.start(StandardService.java:497)
 at
 org.apache.catalina.core.StandardServer.start(StandardServer.java:2190)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:512)
 at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
 at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
 at

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
 at java.lang.reflect.Method.invoke(Method.java:324)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat performance issue?

2004-04-12 Thread Matt Woodings
I just read your post this morning (I am lurking today as I have a few
issues of my own to clear up :-) ) and I think that is some really good
advice you gave.  I do have a question though.

Once you have noticed you have a memory leak, how do you go about locating
it?

Matt
- Original Message - 
From: Peter Lin [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Monday, April 12, 2004 1:07 PM
Subject: Re: Tomcat performance issue?


 From my own experience, this kind of behavior appears when a session isn't
getting timed out for one reason or another.  For example, say you get data
from some remote site using your own Http client libraries that is
multi-threaded. If that thread sits around and the socket it has isn't
explicitly closed, it can prevent tomcat from invalidating the session. this
would create a memory leak which may not be noticeable if you don't get a
lot of load. One easy way to expose this kind of bug is to load test your
webapp before deploying.

 Throw the load you get in 16 hrs at tomcat and you'll likely see the
memory leak. In all cases, issues with performance was due to a bug in our
application. egular load testing is the best way to expose these issues
during development.

 peter




 David Rees [EMAIL PROTECTED] wrote:
 Daniel Gibby wrote:
 
  Tomcat config:
   className=org.apache.catalina.connector.http.HttpConnector
  port=8080 minProcessors=5 maxProcessors=255
  enableLookups=true redirectPort=8443
  acceptCount=100 debug=0 connectionTimeout=6/
 
  Hey, I just realized something... I think I have been having lockups
  around every 16 hours... 6 seconds! So what does that mean about
  this configuration?

 connectionTimeout is defined in milliseconds, not seconds, so that is 60
 seconds, not 16 hours.

  Is some servlet not returning content but hanging on to a connection?

 Could be, or could be that your server is really busy. When you look at
 the server-status through Apache, does it show 255 processes busy as well?

  Could you explain a little further about 'bug in a servlet causing it to
  not return'?

 You could either have a deadlock (synchronization issue) in your code, or
 an infinite loop.

  I have a stack trace, but I don't see how that helps me figure out where
  my problem might be... I'm not sure what exactly to look for.

 Compress it and post it to the list or put it on a public webserver so we
 can take a look.

 Cheers

 Dave

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 -
 Do you Yahoo!?
 Yahoo! Tax Center - File online by April 15th



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: can iframe include files in web-inf folder?

2004-04-09 Thread Matt Woodings
Do you run this through apache or other http server?

The reason that I ask is that the jsp file could have restricted access from
the outside world because it is in the WEB-INF folder.

As a pointer, I wouldn't put you want to be seen by the outside world under
the WEB-INF folder.  You need to keep this for config files, java files/jars
etc etc, because in the future you would want to block any http traffic from
seeing this.

Matt

- Original Message - 
From: bjyang_dream [EMAIL PROTECTED]
To: tomcat-user [EMAIL PROTECTED]
Sent: Friday, April 09, 2004 9:20 AM
Subject: can iframe include files in web-inf folder?


 1.in my jsp page information.jsp I do this:
  iframe width=100% height=400 frameborder=1 scrolling=Auto
src=/web-inf/test.jsp
   but when the Tomcat 5.0 just tell me that such page is not available.
 2.Then i try another way.
   i created another page called import page,in this page:
   c:import url=${HTMLUrl}/
   %jsp:include page=information.jsp %
   Here HTMLUrl comes from my Struts Action,and refer the URL in want to
import in
   the iframe.
   This time,I do get it worked and have HTMLUrl page in the iframe,The
problem
  is when the HTMLUrl has changed,The page in the iframe didn't changed at
the
  same time.
I use c:out value=${HTMLUrl}/,i can see this also changed.

   Hoping someone to help me,Thank you very much!


 dream_and_yang
 [EMAIL PROTECTED]
 2004-04-09


 bjyang_dream
 [EMAIL PROTECTED]
 2004-04-09




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: DefaultServlet character encoding

2004-04-09 Thread Matt Woodings
if your tomcat is a NT Service, this needs to go in the registry

HKLM/System/ControlSet001/Services/Apache Tomcat xxx/Parameters/JVM Option
Number n

also updating the JVM Option Count

you should see the other parameters there, just follow these as an example
when adding your new one

Matt

- Original Message - 
From: Allistair Crossley [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, April 09, 2004 10:56 AM
Subject: RE: DefaultServlet character encoding


or specify -Dfile.encoding=UTF or whatever in your tomcat startup

-Original Message-
From: Mark Thomas [mailto:[EMAIL PROTECTED]
Sent: 09 April 2004 16:55
To: 'Tomcat Users List'
Subject: RE: DefaultServlet character encoding


Hi,

Tomcat ignores META tags (for good reasons I won't go in to). Use %@ page
pagEncoding=... %.

Mark


 -Original Message-
 From: Hassan Schroeder [mailto:[EMAIL PROTECTED]
 Sent: Thursday, April 08, 2004 7:11 PM
 To: [EMAIL PROTECTED]
 Subject: DefaultServlet character encoding

 Config: Tomcat 4.1.29 -- Sun Java 1.4.2_01-b06 -- RedHat ES

 Problem: static HTML pages meta-tagged to use Shift_JIS are sent as
 ISO-8859-1.

 All the googling I've done turns up the suggestion to start Tomcat
 with -Dfile.encoding=UTF-8 in either JAVA_OPTS or CATALINA_OPTS to
 make UTF-8 the default. I've tried both, neither made a difference.

 To baffle me more, my two (unfortunately) divergent dev environments
 Tomcat 4.1.27 -- Sun Java 1.4.2_01-b06  -- W2k
 Tomcat 5.0.19 -- Sun Java 1.4.1_01-69.1 -- OSX.2.8
 serve a sample Shift_JIS page just fine out of the box...

 All suggestions gratefully accepted :-)

 -- 
 Hassan Schroeder - [EMAIL PROTECTED]
 Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

dream.  code.



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE
---
QAS Ltd.
Developers of QuickAddress Software
a href=http://www.qas.com;www.qas.com/a
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat configuration tuning

2004-04-08 Thread Matt Woodings
Hi guys,

I am at stage where I have all my various components talking to one another (Apache 
http server 2.0.49 - Mod JK2 - Tomcat 4.1.30) and running nicely with each other, 
but the loads on the server are increasing rapidly in our production environment ( 
~2000 logins/day and peak concurrency of ~75 currently ) and I want to get the best 
possible configuration for my server. (Dual 1GHz, 1GB Ram, Win 2k, SQL Server + 
Web/Apps servers).  

Now, ultimately this is up to me, but I am unsure of a few relationships and variables 
used in the configuration files.  The settings I have work, but I want them to be 
optimal and more importantly I want to understand them, so any help on the following 
would be greatly appreciated.

1) server.xml/Connector/bufferSize.  Is this allocated for every users session until 
it is terminated, or is it a peak size that could be allocated?
2) workers2.properties/shm.slots. Does this equate to the 
server.xml/Connector/maxProcessors? or are these fundamentally different?

I have attached my fully working configuration below for those who are interested, as 
I noticed a lot of people in the archives looking for working examples using JK2.

Many thanks,

Matt

P.S. I am new to the list but I have been using Tomcat for many years and love it, and 
if I can help with anyones queries, from the trivial to complex,  I would be only too 
happy to do so.

workers2.properties
[logger]
##
LOGGER
##
# Log level. Supported: EMERG, ERROR, INFO, DEBUG
level=ERROR
# Log file. XXX you may be able to change this at runtime, to 
# implement rolling. 
file=${serverRoot}/logs/jk2_error.log

[config]
##
CONFIG
##
# Location of the workers2.properties file
file=${serverRoot}/conf/workers2.properties
# Set the debug level of the config component
debug=0
# Set the debug level of the hidden env component
debugEnv=0

[shm]
##
SHARED MEMORY SETUP   
##
# Name of the file that will be mmapped to use as shared memory, 
# If set to 'anonymous' use the anonymous shered memory
file=${serverRoot}/logs/shm.file
# Number of shared memory slots. Set to the number of child 
# processes
slots=378
# Use process memory instead of shared memory. Useful for single 
# child mpm's
useMemory=0

[lb:lb_group]
##
LOAD BALANCER (EVEN IF USED ON ONE MACHINE)   
##
# If set, jk2 won't touch the headers in case of error and will 
# let for example Apache present the 
# ErrorDocument via mod_alias.
noErrorHeader=1
# 
noWorkerMsg=No workers available
# 
noWorkerCode=503
# 
hwBalanceErr=
# If all the workers are in the error state, probably by Tomcat 
# refusing any new connections due to the overload, you can set 
# the timeout forcing lb to wait that some worker becomes 
# available, instead of immediately returning error to the 
# client. This is very useful in situations with high peek 
# load. The timeout should be set to the maximum application 
# call time, but not less then 1 second. 
timeout=5000
# Number of attempts that lb will try on each worker before 
# giving up. 
attempts=6
# Time to wait before retrying to see if the worker came out of 
# the error state. Default = 60secs
recovery=30
# Sessions stick to the same worker, 1=true 0=false 
stickySession=1

[channel.socket:localhost:8009]
##
CHANNEL SETUP, LINKED TO LOAD BALANCER
##
# Port where Tomcat is listening. It is automatically extracted 
# from the name - you shouldn't have to specify it explicitely.
port=8009
# Remote host. You should use the name, no need to override it
host=127.0.0.1
# If 1, only requests for existing sessions will be forwarded
graceful=0
# ?
keepAlive=0
# Socket timeout for sending and receiving (0=infinite)
timeout=0
# Load balancing factor to use. At this moment, it'll be set on
# the worker, but in future it should be possible to use lb on 
# a channel level. 
lb_factor=100
# loadbalanced groups to which this channel and the associated 
# worker will be added, multivalued. You need to set it only if 
# you have an advanced setup with multiple clusters.
group=lb_group
# Must match the JVM route on tomcat Engine, for load balancing
tomcatId=hsInstance

[ajp13:localhost:8009]
##
AJP1.3 

Re: Tomcat configuration tuning

2004-04-08 Thread Matt Woodings
Hi Allistair,

Thanks for the quick response.  My server.xml file is below but to some of
the questions you had.  One of the biggest speed increases we gained was
from SQL optimization and table tuning.  One thing about server.xml
configuration which I realised is the acceptCount being set too high,
because if your server is struggling anyway having the requests backing up
is not going to help in fact may help it to go down.

What I mean by SQL optimization is we had java take over a lot of processing
rather than the database, so some of our queries may seem at first a little
broad but the speed increase was incredible.  Think how fast java can
iterate through a set of results rather than constantly referring to the db,
so that was one.   Also, one of our tables is heavily used and also ever
increasing in size, so to keep this fast I keep only a few weeks worth of
data in it (so its indexing is still really quick) and offload the rest to a
history table which is only used for reporting ... so based on date range I
either quickly recieve the latest info or slightly slower receive data from
the past.

Unfortunately I am unable to give you response times as they would be
meaningless (number of db hits, processing etc), but suffice to say its in
the region of 100msecs for non db jsp pages to 20+ secs (depending upon
connection) for insanely large amounts of db/processed pages and for the
vast majority of pages for select style queries are about 700msecs.  Sorry I
can't be of more help there.

I haven't read your post on caching yet, but I rely heavily on XML for our
site, from configuration to the menu options, and I also use streamed XML to
XSLT for all our views.  I guess it comes down to what you need to do, but I
would love to hear how you are using it.

One of the problems I am tackling at the moment is for places where there is
a lot of db inserts/updates which can't be done on-mass, so I am coming up
with a plan to assign these tasks to be fulfilled at off peak times, or in
manageable chunks so as to keep response times high.  One of the problems I
am overcoming is that our users aren't tech savvy and if a page doesn't load
fast enough they will hit reload constantly and escalate any memory problems
I may have had to the dreaded outOfMemory Exception.

Regards,

Matt

P.S. Struts ROCKS!!!

server.xml
?xml version='1.0' encoding='utf-8'?
Server className=org.apache.catalina.core.StandardServer port=8005
debug=0 shutdown=SHUTDOWN
  Listener className=org.apache.catalina.mbeans.ServerLifecycleListener
debug=0 jsr77Names=false/
  Listener
className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener
debug=0/
  GlobalNamingResources
Environment name=simpleValue override=true type=java.lang.Integer
value=30/
Resource name=UserDatabase scope=Shareable
type=org.apache.catalina.UserDatabase auth=Container description=User
database that can be updated and saved/
ResourceParams name=UserDatabase
  parameter
namefactory/name
valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value
  /parameter
  parameter
namepathname/name
valueconf/tomcat-users.xml/value
  /parameter
/ResourceParams
  /GlobalNamingResources
  Service className=org.apache.catalina.core.StandardService debug=0
name=Tomcat-Load-Balance-1
Connector className=org.apache.coyote.tomcat4.CoyoteConnector
redirectPort=8443 bufferSize=8192 port=8009 connectionTimeout=0
enableLookups=true
protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler debug=0
disableUploadTimeout=true maxProcessors=378 minProcessors=5
acceptCount=100 useURIValidationHack=false /
Engine jvmRoute=hsInstance debug=0 defaultHost=instance1
name=LoadBalance
  Host appBase=webapps autoDeploy=true debug=0 unpackWARs=true
name=instance1
Context crossContext=true reloadable=true debug=0
docBase=** path=/hs 
  Resource name=jdbc/** scope=Shareable
type=javax.sql.DataSource/
  ResourceParams name=jdbc/**
parameter
  nameurl/name
  value**/value
/parameter
parameter
  namemaxIdle/name
  value1000/value
/parameter
parameter
  namemaxActive/name
  value1/value
/parameter
parameter
  namedriverClassName/name
  valuecom.microsoft.jdbc.sqlserver.SQLServerDriver/value
/parameter
parameter
  namemaxWait/name
  value6/value
/parameter
parameter
  nameremoveAbandoned/name
  valuetrue/value
/parameter
parameter
  nameusername/name
  value**/value
/parameter
parameter
  namelogAbandoned/name
  valuetrue/value
/parameter
parameter
  

Re: Apache with JK ApacheConfig Class not found!

2004-04-08 Thread Matt Woodings
Hi,

Do you have your workers2.properties file setup and have the following entry
in your httpd.conf : LoadModule jk2_module modules/mod_jk2.so.  With this
setup I don't think you need to have any entries in your server.xml file
specifically about JK2, the only thing you need to worry about at that point
is setting the memory, loading etc params for the connection in server.xml.

Matt
- Original Message - 
From: Yang Xiao [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Thursday, April 08, 2004 1:15 PM
Subject: Apache with JK ApacheConfig Class not found!


 Hi list,
 I'm trying to configure JK 1.2.5 with Apache 2.0.49 and Tomcat 5.0.19, and
I
 have added the following lines to the server.xml file:
 Under Server container
   Listener className=org.apache.ajp.tomcat5.config.ApacheConfig
 modJk=/usr/local/apache/modules/mod_jk.so /

 and under Host

 Listener className=org.apache.ajp.tomcat5.config.ApacheConfig
 append=true forwardAll=false
modJk=/usr/local/apache/modules/mod_jk.so
 workersConfig=/usr/local/tomcat/conf/workers.properties /


 I have tried using tomcat4 according to the How-to, but none of them work
 and I get the cnfe which is shown below, thanks in advance!

 ---
 Catalina.start: java.lang.ClassNotFoundException:
 org.apache.ajp.tomcat5.config.ApacheConfig
 java.lang.ClassNotFoundException:
org.apache.ajp.tomcat5.config.ApacheConfig
 at

org.apache.commons.digester.Digester.createSAXException(Digester.java:2540)
 at

org.apache.commons.digester.Digester.createSAXException(Digester.java:2566)
 at
 org.apache.commons.digester.Digester.startElement(Digester.java:1276)
 at

org.apache.catalina.util.CatalinaDigester.startElement(CatalinaDigester.java
 :112)
 at
org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown
 Source)
 at
 org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown
 Source)
 at

org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unkno
 wn Source)
 at

org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatc
 her.dispatch(Unknown Source)
 at
 org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
 Source)
 at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
 Source)
 at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
 Source)
 at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
 at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
 at org.apache.commons.digester.Digester.parse(Digester.java:1548)
 at org.apache.catalina.startup.Catalina.load(Catalina.java:528)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:586)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
 )
 at

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
 .java:25)
 at java.lang.reflect.Method.invoke(Method.java:324)
 at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:297)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:398)
 Apr 8, 2004 3:10:31 PM org.apache.catalina.startup.Catalina start
 INFO: Server startup in 0 ms
 java.lang.reflect.InvocationTargetException
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
 )
 at

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
 .java:25)
 at java.lang.reflect.Method.invoke(Method.java:324)
 at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:297)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:398)
 Caused by: java.lang.NullPointerException
 at org.apache.catalina.startup.Catalina.await(Catalina.java:657)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:617)

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]