Re: Tomcat Tuning Memory leak

2004-01-16 Thread David Strupl
Hi (yes that's me again),

I have more details for those that would be willing to help. I have 
started to use IBM's JDK that has the nice memory dump feature set up so 
that whenever OutOfMemory occurs the heap is dumped. So my heap is here
http://hry.atlas.cz/zaloha/heapdump.20040114.160700.8886.txt.gz
Probably no need to download the 12MB - I have tried to process it and 
interesting result is this:

I have used the k function of HeapRoots205 (here is its description):
This executes by first running 'p 0x1234'. This leaves every object 
reachable by 0x1234 owned by it. Then any objects which are owned by 
0x1234 but reachable from outside of this set are removed. This leaves 
0x1234 owning exactly those objects which are only reachable thru' it.

on following object:

 k 0x10102818

Calculating keep-alive size of 0x10102818 
'org/apache/coyote/RequestGroupInfo' ...

Requesting 17 mb of heapspace to process heapdump ...

done.
Finding pure Roots
.. done.
DFS from 0x10102818
.  done.
Total reach (inclusive) 1,245,481 objects. Total-size is 299,128,896.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Tomcat Tuning Memory leak

2004-01-16 Thread David Strupl
My previous post should be longer ... here is the rest:

DFS from pure Roots
...done.
DFS from objects unreached from Roots
...done.
Found 1,051,382 objects which are reachable from elsewhere.
These will be taken from 0x10102818 and then owned by other objects ...
DFS from 0x10102818
.  done.
Keep-alive size (inclusive) is 194,099 objects. Total-size is 154,016,544.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Tomcat Tuning Memory leak

2004-01-16 Thread David Strupl
Still I don't see the whole thing - and trying to send the rest here:

If I interpret it correctly the instance of 
org/apache/coyote/RequestGroupInfo
holds 150 MB of heap memory. Also if I understand it correctly from here
http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/
someone just recently tried to do something with it.

Am I totally paranoic when I suspect that the memory leak is in tomcat?

Thanks for any hints (as usually) and best regards,

David



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


RE: Tomcat Tuning Memory leak

2004-01-16 Thread Shapira, Yoav

Howdy,

If I interpret it correctly the instance of
org/apache/coyote/RequestGroupInfo
holds 150 MB of heap memory. Also if I understand it correctly from
here
http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-
connectors/coyote/src/java/org/apache/coyote/
someone just recently tried to do something with it.

Am I totally paranoic when I suspect that the memory leak is in tomcat?

You're not paranoid.  There's a memory leak related to the
RequestGroup/RequestGroupInfo connector code.  It's been discussed
during the past week on the dev mailing list, and addressed within the
past couple of days.  You can try the tomcat 5.0.18 build which has the
fix.

Yoav Shapira



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



Re: Tomcat Tuning Memory leak

2004-01-16 Thread David Strupl
Shapira, Yoav wrote:
You're not paranoid.  There's a memory leak related to the
RequestGroup/RequestGroupInfo connector code.  It's been discussed
during the past week on the dev mailing list, and addressed within the
past couple of days.  You can try the tomcat 5.0.18 build which has the
fix.
Yoav Shapira
Thanks for the pointer. Although they talk only about 5.0.x I thing that 
the problem is present even in 4.1.29 - it might make sense to only 
downgrade to 4.1.27 because the classes in question were not there ...
I will first try to set minProcessors==maxProcessors and see whether it 
helps even in 4.1.29. If it won't help I will think about moving to some 
other revision.

Thanks again and best regards,

David



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


Re: Tomcat Tuning Memory leak

2003-12-30 Thread David Strupl
Hi,

I have the very same problem. I have tried everything possible with no 
outcome (the fork atribute for the jsp compiler did not help (with this 
I refer to a previous discussion here)). I suspect the CoyoteConnector 
being at fault but have no proof yet. I plan to run profiler but doing 
that with users hanging on our machine it requires a bit of courage.

If you manage to solve this problem somehow please let me know (on this 
mailing list) because there is at least one person _very_ interested in 
solving this problem. Even if you succeed by trying another connector I 
would like to hear.

Good luck and best regards,

David

Mohit Gupta wrote:
Hi All

I am working on Tomcat 4.1.24 on Solatis-8, 12 CPU, 24GB RAM Machine. I am using Apache 2.0.43 and the Jdk version is 1.4.1_02.

When I start my server then after 5-6 hours my server becomes very slow and then I need to restart my server. I am taking the top stats for the tomcat and have found that normally the thread remains between 100- 140 but when the system crashes it reaches to 372 and the memory gradually increases from 256 to some where around 660. The top stats are as follows

   PID USERNAME THR PRI NICE  SIZE   RES STATETIMECPU COMMAND
 13082 root 115   00  653M  578M cpu/290 313:31 37.64% java
 13082 root 139   70  654M  579M cpu/291 388:08 40.78% java
 13082 root 143   00  654M  580M cpu/419 466:39 41.43% java
 13082 root 374   10  662M  589M cpu/323 547:47 47.03% java
 13082 root 374  100  662M  589M cpu/291 625:42 53.59% java
 Here the Thread count increases from 143 to 374 in just 10 min. Even though the no of user 
accessing this site has decreased. I really dont know what the problem is...
 I have set the Catalina Option as -Xms128M -Xmx512M but even setting the value of 
-XMx1024 doesn't solved my problem.
 The connector settings in my server.xml are as follows

 Connector className=org.apache.coyote.tomcat4.CoyoteConnector acceptCount=5 bufferSize=2048 connectionTimeout=2 debug=0 disableUploadTimeout=false enableLookups=false 
maxProcessors=350 minProcessors=5 port=8009 protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler proxyPort=0 redirectPort=8443 scheme=http secure=false 
tcpNoDelay=true useURIValidationHack=false
 Factory className=org.apache.catalina.net.DefaultServerSocketFactory/
 /Connector
 Please tell me what is the problem with my configuration. 
 Please help me

 Thanks  Regards
 Mohit


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


Re: Tomcat Tuning Memory leak

2003-12-30 Thread David Strupl
Ooops. I was too fast with my previous post. My config is different form 
yours:

Connector className=org.apache.coyote.tomcat4.CoyoteConnector 
address=212.47.18.50 acceptCount=100 bufferSize=2048 
compression=off connectionLinger=-1 connectionTimeout=2 
connectionUploadTimeout=30 debug=0 disableUploadTimeout=true 
enableLookups=false maxKeepAliveRequests=100 maxProcessors=250 
minProcessors=25 port=80 
protocolHandlerClassName=org.apache.coyote.http11.Http11Protocol 
proxyPort=0 redirectPort=8443 scheme=http secure=false 
serverSocketTimeout=0 tcpNoDelay=true tomcatAuthentication=true 
useURIValidationHack=false
  Factory 
className=org.apache.catalina.net.DefaultServerSocketFactory/
/Connector

Also my machine is a bit smaller ;-) (with linux). But the behaviour is 
very similar.

Best,

David

David Strupl wrote:
Hi,

I have the very same problem. I have tried everything possible with no 
outcome (the fork atribute for the jsp compiler did not help (with this 
I refer to a previous discussion here)). I suspect the CoyoteConnector 
being at fault but have no proof yet. I plan to run profiler but doing 
that with users hanging on our machine it requires a bit of courage.

If you manage to solve this problem somehow please let me know (on this 
mailing list) because there is at least one person _very_ interested in 
solving this problem. Even if you succeed by trying another connector I 
would like to hear.

Good luck and best regards,

David

Mohit Gupta wrote:

Hi All

I am working on Tomcat 4.1.24 on Solatis-8, 12 CPU, 24GB RAM Machine. 
I am using Apache 2.0.43 and the Jdk version is 1.4.1_02.

When I start my server then after 5-6 hours my server becomes very 
slow and then I need to restart my server. I am taking the top stats 
for the tomcat and have found that normally the thread remains between 
100- 140 but when the system crashes it reaches to 372 and the memory 
gradually increases from 256 to some where around 660. The top stats 
are as follows

   PID USERNAME THR PRI NICE  SIZE   RES STATETIMECPU COMMAND
 13082 root 115   00  653M  578M cpu/290 313:31 37.64% java
 13082 root 139   70  654M  579M cpu/291 388:08 40.78% java
 13082 root 143   00  654M  580M cpu/419 466:39 41.43% java
 13082 root 374   10  662M  589M cpu/323 547:47 47.03% java
 13082 root 374  100  662M  589M cpu/291 625:42 53.59% java
 Here the Thread count increases from 143 to 374 in just 10 min. Even 
though the no of user accessing this site has decreased. I really 
dont know what the problem is...
 I have set the Catalina Option as -Xms128M -Xmx512M but even 
setting the value of -XMx1024 doesn't solved my problem.

 The connector settings in my server.xml are as follows

 Connector className=org.apache.coyote.tomcat4.CoyoteConnector 
acceptCount=5 bufferSize=2048 connectionTimeout=2 debug=0 
disableUploadTimeout=false enableLookups=false maxProcessors=350 
minProcessors=5 port=8009 
protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler 
proxyPort=0 redirectPort=8443 scheme=http secure=false 
tcpNoDelay=true useURIValidationHack=false
 Factory 
className=org.apache.catalina.net.DefaultServerSocketFactory/
 /Connector

 Please tell me what is the problem with my configuration.  Please 
help me

 Thanks  Regards
 Mohit


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


Re: Tomcat Tuning Memory leak

2003-12-30 Thread David Rees
Mohit Gupta wrote:

I am working on Tomcat 4.1.24 on Solatis-8, 12 CPU, 24GB RAM Machine. 
I am using Apache 2.0.43 and the Jdk version is 1.4.1_02.

When I start my server then after 5-6 hours my server becomes very 
slow and then I need to restart my server. I am taking the top stats 
for the tomcat and have found that normally the thread remains between 
100- 140 but when the system crashes it reaches to 372 and the memory 
gradually increases from 256 to some where around 660. The top stats 
are as follows

   PID USERNAME THR PRI NICE  SIZE   RES STATETIMECPU COMMAND
 13082 root 115   00  653M  578M cpu/290 313:31 37.64% java
 13082 root 139   70  654M  579M cpu/291 388:08 40.78% java
 13082 root 143   00  654M  580M cpu/419 466:39 41.43% java
 13082 root 374   10  662M  589M cpu/323 547:47 47.03% java
 13082 root 374  100  662M  589M cpu/291 625:42 53.59% java
 Here the Thread count increases from 143 to 374 in just 10 min. Even 
though the no of user accessing this site has decreased. I really 
dont know what the problem is...
 I have set the Catalina Option as -Xms128M -Xmx512M but even 
setting the value of -XMx1024 doesn't solved my problem.

 The connector settings in my server.xml are as follows

 Connector className=org.apache.coyote.tomcat4.CoyoteConnector 
acceptCount=5 bufferSize=2048 connectionTimeout=2 debug=0 
disableUploadTimeout=false enableLookups=false maxProcessors=350 
minProcessors=5 port=8009 
protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler 
proxyPort=0 redirectPort=8443 scheme=http secure=false 
tcpNoDelay=true useURIValidationHack=false
 Factory 
className=org.apache.catalina.net.DefaultServerSocketFactory/
 /Connector

Please tell me what is the problem with my configuration.  Please 
help me
First thing to find out is to figure out what all the threads are doing. 
 Send the Tomcat process a -QUIT signal (`kill -QUIT 13082`) and 
capture the output which will be sent to stdout.  You will get a stack 
trace for each thread showing what it is doing.  You will probably find 
that the threads are busy somewhere in your application code.

Additionally, upgrading to the latest Tomcat (4.1.27 or 5.0.16) and JDK 
(1.4.2_03) is a good idea as the latest versions have bug fixes and 
performance improvements.

I doubt it is a Tomcat issue, it is more than likely an issue with your 
application, but the stack trace will show the cause.

-Dave

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


Re: Tomcat Tuning Memory leak

2003-12-30 Thread David Strupl
David Rees wrote:
Additionally, upgrading to the latest Tomcat (4.1.27 or 5.0.16) and JDK 
(1.4.2_03) is a good idea as the latest versions have bug fixes and 
performance improvements.

I doubt it is a Tomcat issue, it is more than likely an issue with your 
application, but the stack trace will show the cause.
I have tomcat 4.1.29, JDK1.4.2. Also my app was completely ok with 
tomcat 3.x.x. The 100% of processor time occurs in my case only after 
the OOME. Before the OOME all the threads (both tomcat's and mine) are 
happy.

Thanks for any hints,

David



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


Re: Tomcat Tuning Memory leak

2003-12-30 Thread Philipp Taprogge
Hi!

David Strupl wrote:
I have tomcat 4.1.29, JDK1.4.2. Also my app was completely ok with 
tomcat 3.x.x. The 100% of processor time occurs in my case only after 
the OOME. Before the OOME all the threads (both tomcat's and mine) are 
happy.
The processor usage is not too surprising. When your machine runs out 
of memory and there are still busy processes, most of the cpu time 
will go into swapping in and out those processes. Still, since most 
prople are perfectly happy with the tomcat build you are using, there 
seems to be a problem with your application code. Perhaps you could 
elaborate a bit further here?
And, as we had that subject a few days ago, are you by chance re-using 
StringBuffer instances ;-)

Regards,

	Phil

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


Re: Tomcat Tuning Memory leak

2003-12-30 Thread David Strupl
Philipp Taprogge wrote:
The processor usage is not too surprising. When your machine runs out of 
memory and there are still busy processes, most of the cpu time will go 
into swapping in and out those processes. Still, since most prople are 
perfectly happy with the tomcat build you are using, there seems to be a 
problem with your application code. Perhaps you could elaborate a bit 
further here?
And, as we had that subject a few days ago, are you by chance re-using 
StringBuffer instances ;-)
Yes - I was also not surprised with the CPU after the OOME. I will try 
to prepare a heap shapshot and post it here (only a link, don't worry) 
after I manage to get a usefull one.

My application does not do anything special - it is an online gaming 
server with couple of JSPs and servlets. The profiling has not revealed 
any memory leak in my code so far. Also the code was running for several 
years in tomcat 3.x without any problem. After migrating to tomcat 4.x 
the nightmare began.

Thanks for any hints,

David



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


Re: Tomcat Tuning Memory leak

2003-12-30 Thread Philipp Taprogge
Hi again!

David Strupl wrote:

 Also the code was running for several
years in tomcat 3.x without any problem. After migrating to tomcat 4.x 
the nightmare began.
Have you changed the JRE as well or are you running the tomcat 4 
instance in the same VM as the tomcat 3 before? Just to make sure your 
problems are not arising from changes made to the JVM in the meantime.

Regards,

		Phil

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


Re: Tomcat Tuning Memory leak

2003-12-30 Thread David Strupl
Philipp Taprogge wrote:
Have you changed the JRE as well or are you running the tomcat 4 
instance in the same VM as the tomcat 3 before? Just to make sure your 
problems are not arising from changes made to the JVM in the meantime.
I have upgraged the VM as well as the OS on the machine. In fact the 
whole machine is different now (being it dual-pentium this time). Right 
now I am further upgrading SUN JDK 1.4.2 to SUN 1.4.2_03 if that is 
going to have any impact.

David



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


RE: Tomcat Tuning Memory leak

2003-12-30 Thread Shapira, Yoav

Howdy,

Yes - I was also not surprised with the CPU after the OOME. I will try
to prepare a heap shapshot and post it here (only a link, don't worry)
after I manage to get a usefull one.

Make sure it's one before the OutOfMemoryError ;)

server with couple of JSPs and servlets. The profiling has not revealed
any memory leak in my code so far. Also the code was running for
several
years in tomcat 3.x without any problem. After migrating to tomcat 4.x
the nightmare began.

There's no doubt tomcat 4 (and 5's) memory usage characteristics are
significantly different from tomcat 3.  Nearly everything in the code is
significantly different.

Is it possible your app doesn't have any leaks, but simply needs more
memory under load than you're allocating it?

(BTW, to refresh my memory, is this setup where the JSP pages change
hourly?)

Yoav Shapira



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



Re: Tomcat Tuning Memory leak

2003-12-30 Thread David Strupl
Shapira, Yoav wrote:
(BTW, to refresh my memory, is this setup where the JSP pages change
hourly?)
I have already changed this ;-) Also added the fork attribute to true 
for jsp compile. It is not caused by the app - after the app starts and 
first 100 or so users connect the memory jumps up to approx 130 MB. But 
during the next 24 hours it eats more than 300 megs. From what I have 
seen from the profiler so far number of my objects is fairly decent. But 
there are more and more approx 100k (98320 chars) buffers created 
somewhere. I will post more precise info later after I
  a. upgrade to the latest and greatest JDK 1.4.2_03
  b. create some HTML output of the heap

Thanks for any hints so far, best regards,

David



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


Re: Tomcat Tuning Memory leak

2003-12-30 Thread James Black
David Strupl wrote:

I have already changed this ;-) Also added the fork attribute to true 
for jsp compile. It is not caused by the app - after the app starts 
and first 100 or so users connect the memory jumps up to approx 130 
MB. But during the next 24 hours it eats more than 300 megs. From what 
I have seen from the profiler so far number of my objects is fairly 
decent. But there are more and more approx 100k (98320 chars) buffers 
created somewhere. I will post more precise info later after I
  a. upgrade to the latest and greatest JDK 1.4.2_03
  b. create some HTML output of the heap 
 Your JSP page shouldn't have any business logic in it, that should be 
in beans that your JSP page uses. You can test the beans in a profiler 
and see if there is any memory leaks.

 If you are using JDK1.4.1 then that will probably be your problem as 
there was a memory leak in the String class that was fixed in JDK1.4.2.



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


RE: tomcat tuning

2003-03-17 Thread Kapil Sharma

Hi,
Please look at my tomcat confirmation below. I am having problems with
database connection now. I am getting the following errors in catalina.out
file:
java.sql.SQLException: Error while trying to retrieve text for error
ORA-12154

I am also unable to login to site. I get the above error. Any solutions?


Thanks
kapil
-Original Message-
From: Kapil Sharma [mailto:[EMAIL PROTECTED]
Sent: 16 March 2003 20:10
To: Tomcat Users List
Subject: RE: tomcat tuning


Thanks for reply. This answers one of the problem. Another problem is db
connections. I am monitoring db connections and they are just increasing
even if there is no load on the server. The problem is tomcat is not
clearing idle connections or timing out the db connections.
I still cannot understand how tomcat work directory fill up with 6GB of
space in 24 hours.

kapil

-Original Message-
From: Filip Hanik [mailto:[EMAIL PROTECTED]
Sent: 16 March 2003 19:43
To: Tomcat Users List
Subject: RE: tomcat tuning


the error is that you have a limited number of file descriptor.
so it doesn't look like your db pool is causing the problem, but your OS
configuration.
Increase the number of file descriptors for your system

Filip

-Original Message-
From: Kapil Sharma [mailto:[EMAIL PROTECTED]
Sent: Sunday, March 16, 2003 11:04 AM
To: [EMAIL PROTECTED]
Subject: tomcat tuning


Hi Guys,
I am facing a performance issue with tomcat 4.1.12 on Solaris. Following is
my setup

apache 1.3.27
tomcat 4.1.12
ajp 13

Following is my server.xml context for database and tomcat-apache connector

ResourceParams name=jdbc/foo
  parameter
nameurl/name
valuejdbc:oracle:oci8:@foo/value
  /parameter
  parameter
namevalidationQuery/name
valueselect 1 from dual/value
  /parameter
  parameter
namemaxIdle/name
value0/value
  /parameter
  parameter
namemaxActive/name
value255/value
  /parameter
  parameter
namedriverClassName/name
valueoracle.jdbc.driver.OracleDriver/value
  /parameter
  parameter
namemaxWait/name
   value3/value
  /parameter
  parameter
nameremoveAbandoned/name
valuetrue/value
  /parameter
  parameter
nameusername/name
valuetest/value
  /parameter
  parameter
namepassword/name
valuetest/value
  /parameter
  parameter
namefactory/name
valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
  /parameter
  parameter
nameremoveAbandonedTimeout/name
value300/value
  /parameter
/ResourceParams

   Connector className=org.apache.coyote.tomcat4.CoyoteConnector
   acceptCount=20
   bufferSize=2048
   connectionTimeout=2
   debug=4
   enableLookups=false
   maxProcessors=255
   minProcessors=21
   port=8009

protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler
   proxyPort=0
   redirectPort=8443
   scheme=http
   secure=false
   tcpNoDelay=true
   useURIValidationHack=false
  Factory
className=org.apache.catalina.net.DefaultServerSocketFactory/

/Connector

Following are the problems.

I changed some parameters in the server.xml file to match the number of
apache connections. I was also having heavy load on tomcat so I had to
increase the database connections. Now the problem is tomcat is not closing
the database connections and database pool is filling up. Tomcat filled up
the system partition to 100% and threw the following errors for some reason:

exception: java.net.SocketException: Too many open files
java.net.SocketException: Too many open files
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:353)
at java.net.ServerSocket.implAccept(ServerSocket.java:439)
at java.net.ServerSocket.accept(ServerSocket.java:410)
at
org.apache.tomcat.util.net.DefaultServerSocketFactory.acceptSocket(DefaultSe
rverSocketFactory.java:107)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.acceptSocket(PoolTcpEndpoint.java
:335)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:483)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:533)
at java.lang.Thread.run(Thread.java:536)


Can anyone help me with this problem and refer me to some good docs for
tomcat setup and performance issues for production heavy loaded servers?

Thanks
kapil



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



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

Re: tomcat tuning

2003-03-17 Thread Cédric Viaud
Hi,

I, personnaly, search archives using :
http://marc.theaimsgroup.com/?l=tomcat-userr=1w=2

Hope this helps,

   Cédric

- Original Message -
From: Kapil Sharma [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Monday, March 17, 2003 5:33 PM
Subject: RE: tomcat tuning



 Hi,
 Please look at my tomcat confirmation below. I am having problems with
 database connection now. I am getting the following errors in catalina.out
 file:
 java.sql.SQLException: Error while trying to retrieve text for error
 ORA-12154

 I am also unable to login to site. I get the above error. Any solutions?


 Thanks
 kapil
 -Original Message-
 From: Kapil Sharma [mailto:[EMAIL PROTECTED]
 Sent: 16 March 2003 20:10
 To: Tomcat Users List
 Subject: RE: tomcat tuning


 Thanks for reply. This answers one of the problem. Another problem is db
 connections. I am monitoring db connections and they are just increasing
 even if there is no load on the server. The problem is tomcat is not
 clearing idle connections or timing out the db connections.
 I still cannot understand how tomcat work directory fill up with 6GB of
 space in 24 hours.

 kapil

 -Original Message-
 From: Filip Hanik [mailto:[EMAIL PROTECTED]
 Sent: 16 March 2003 19:43
 To: Tomcat Users List
 Subject: RE: tomcat tuning


 the error is that you have a limited number of file descriptor.
 so it doesn't look like your db pool is causing the problem, but your OS
 configuration.
 Increase the number of file descriptors for your system

 Filip

 -Original Message-
 From: Kapil Sharma [mailto:[EMAIL PROTECTED]
 Sent: Sunday, March 16, 2003 11:04 AM
 To: [EMAIL PROTECTED]
 Subject: tomcat tuning


 Hi Guys,
 I am facing a performance issue with tomcat 4.1.12 on Solaris. Following
is
 my setup

 apache 1.3.27
 tomcat 4.1.12
 ajp 13

 Following is my server.xml context for database and tomcat-apache
connector

 ResourceParams name=jdbc/foo
   parameter
 nameurl/name
 valuejdbc:oracle:oci8:@foo/value
   /parameter
   parameter
 namevalidationQuery/name
 valueselect 1 from dual/value
   /parameter
   parameter
 namemaxIdle/name
 value0/value
   /parameter
   parameter
 namemaxActive/name
 value255/value
   /parameter
   parameter
 namedriverClassName/name
 valueoracle.jdbc.driver.OracleDriver/value
   /parameter
   parameter
 namemaxWait/name
value3/value
   /parameter
   parameter
 nameremoveAbandoned/name
 valuetrue/value
   /parameter
   parameter
 nameusername/name
 valuetest/value
   /parameter
   parameter
 namepassword/name
 valuetest/value
   /parameter
   parameter
 namefactory/name
 valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
   /parameter
   parameter
 nameremoveAbandonedTimeout/name
 value300/value
   /parameter
 /ResourceParams

Connector className=org.apache.coyote.tomcat4.CoyoteConnector
acceptCount=20
bufferSize=2048
connectionTimeout=2
debug=4
enableLookups=false
maxProcessors=255
minProcessors=21
port=8009

 protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler
proxyPort=0
redirectPort=8443
scheme=http
secure=false
tcpNoDelay=true
useURIValidationHack=false
   Factory
 className=org.apache.catalina.net.DefaultServerSocketFactory/

 /Connector

 Following are the problems.

 I changed some parameters in the server.xml file to match the number of
 apache connections. I was also having heavy load on tomcat so I had to
 increase the database connections. Now the problem is tomcat is not
closing
 the database connections and database pool is filling up. Tomcat filled up
 the system partition to 100% and threw the following errors for some
reason:

 exception: java.net.SocketException: Too many open files
 java.net.SocketException: Too many open files
 at java.net.PlainSocketImpl.socketAccept(Native Method)
 at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:353)
 at java.net.ServerSocket.implAccept(ServerSocket.java:439)
 at java.net.ServerSocket.accept(ServerSocket.java:410)
 at

org.apache.tomcat.util.net.DefaultServerSocketFactory.acceptSocket(DefaultSe
 rverSocketFactory.java:107)
 at

org.apache.tomcat.util.net.PoolTcpEndpoint.acceptSocket(PoolTcpEndpoint.java
 :335)
 at
 org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:483)
 at

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


 Can anyone help me with this problem

Re: tomcat tuning

2003-03-17 Thread Cédric Viaud
Sorry, i was responding to archive topic mail.

Cédric
- Original Message -
From: Cédric Viaud [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Monday, March 17, 2003 5:37 PM
Subject: Re: tomcat tuning


 Hi,

 I, personnaly, search archives using :
 http://marc.theaimsgroup.com/?l=tomcat-userr=1w=2

 Hope this helps,

Cédric

 - Original Message -
 From: Kapil Sharma [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Monday, March 17, 2003 5:33 PM
 Subject: RE: tomcat tuning


 
  Hi,
  Please look at my tomcat confirmation below. I am having problems with
  database connection now. I am getting the following errors in
catalina.out
  file:
  java.sql.SQLException: Error while trying to retrieve text for error
  ORA-12154
 
  I am also unable to login to site. I get the above error. Any solutions?
 
 
  Thanks
  kapil
  -Original Message-
  From: Kapil Sharma [mailto:[EMAIL PROTECTED]
  Sent: 16 March 2003 20:10
  To: Tomcat Users List
  Subject: RE: tomcat tuning
 
 
  Thanks for reply. This answers one of the problem. Another problem is db
  connections. I am monitoring db connections and they are just increasing
  even if there is no load on the server. The problem is tomcat is not
  clearing idle connections or timing out the db connections.
  I still cannot understand how tomcat work directory fill up with 6GB of
  space in 24 hours.
 
  kapil
 
  -Original Message-
  From: Filip Hanik [mailto:[EMAIL PROTECTED]
  Sent: 16 March 2003 19:43
  To: Tomcat Users List
  Subject: RE: tomcat tuning
 
 
  the error is that you have a limited number of file descriptor.
  so it doesn't look like your db pool is causing the problem, but your OS
  configuration.
  Increase the number of file descriptors for your system
 
  Filip
 
  -Original Message-
  From: Kapil Sharma [mailto:[EMAIL PROTECTED]
  Sent: Sunday, March 16, 2003 11:04 AM
  To: [EMAIL PROTECTED]
  Subject: tomcat tuning
 
 
  Hi Guys,
  I am facing a performance issue with tomcat 4.1.12 on Solaris. Following
 is
  my setup
 
  apache 1.3.27
  tomcat 4.1.12
  ajp 13
 
  Following is my server.xml context for database and tomcat-apache
 connector
 
  ResourceParams name=jdbc/foo
parameter
  nameurl/name
  valuejdbc:oracle:oci8:@foo/value
/parameter
parameter
  namevalidationQuery/name
  valueselect 1 from dual/value
/parameter
parameter
  namemaxIdle/name
  value0/value
/parameter
parameter
  namemaxActive/name
  value255/value
/parameter
parameter
  namedriverClassName/name
  valueoracle.jdbc.driver.OracleDriver/value
/parameter
parameter
  namemaxWait/name
 value3/value
/parameter
parameter
  nameremoveAbandoned/name
  valuetrue/value
/parameter
parameter
  nameusername/name
  valuetest/value
/parameter
parameter
  namepassword/name
  valuetest/value
/parameter
parameter
  namefactory/name
  valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter
parameter
  nameremoveAbandonedTimeout/name
  value300/value
/parameter
  /ResourceParams
 
 Connector className=org.apache.coyote.tomcat4.CoyoteConnector
 acceptCount=20
 bufferSize=2048
 connectionTimeout=2
 debug=4
 enableLookups=false
 maxProcessors=255
 minProcessors=21
 port=8009
 
  protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler
 proxyPort=0
 redirectPort=8443
 scheme=http
 secure=false
 tcpNoDelay=true
 useURIValidationHack=false
Factory
  className=org.apache.catalina.net.DefaultServerSocketFactory/
 
  /Connector
 
  Following are the problems.
 
  I changed some parameters in the server.xml file to match the number of
  apache connections. I was also having heavy load on tomcat so I had to
  increase the database connections. Now the problem is tomcat is not
 closing
  the database connections and database pool is filling up. Tomcat filled
up
  the system partition to 100% and threw the following errors for some
 reason:
 
  exception: java.net.SocketException: Too many open files
  java.net.SocketException: Too many open files
  at java.net.PlainSocketImpl.socketAccept(Native Method)
  at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:353)
  at java.net.ServerSocket.implAccept(ServerSocket.java:439)
  at java.net.ServerSocket.accept(ServerSocket.java:410)
  at
 

org.apache.tomcat.util.net.DefaultServerSocketFactory.acceptSocket(DefaultSe

RE: tomcat tuning

2003-03-16 Thread Filip Hanik
the error is that you have a limited number of file descriptor.
so it doesn't look like your db pool is causing the problem, but your OS
configuration.
Increase the number of file descriptors for your system

Filip

-Original Message-
From: Kapil Sharma [mailto:[EMAIL PROTECTED]
Sent: Sunday, March 16, 2003 11:04 AM
To: [EMAIL PROTECTED]
Subject: tomcat tuning


Hi Guys,
I am facing a performance issue with tomcat 4.1.12 on Solaris. Following is
my setup

apache 1.3.27
tomcat 4.1.12
ajp 13

Following is my server.xml context for database and tomcat-apache connector

ResourceParams name=jdbc/foo
  parameter
nameurl/name
valuejdbc:oracle:oci8:@foo/value
  /parameter
  parameter
namevalidationQuery/name
valueselect 1 from dual/value
  /parameter
  parameter
namemaxIdle/name
value0/value
  /parameter
  parameter
namemaxActive/name
value255/value
  /parameter
  parameter
namedriverClassName/name
valueoracle.jdbc.driver.OracleDriver/value
  /parameter
  parameter
namemaxWait/name
   value3/value
  /parameter
  parameter
nameremoveAbandoned/name
valuetrue/value
  /parameter
  parameter
nameusername/name
valuetest/value
  /parameter
  parameter
namepassword/name
valuetest/value
  /parameter
  parameter
namefactory/name
valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
  /parameter
  parameter
nameremoveAbandonedTimeout/name
value300/value
  /parameter
/ResourceParams

   Connector className=org.apache.coyote.tomcat4.CoyoteConnector
   acceptCount=20
   bufferSize=2048
   connectionTimeout=2
   debug=4
   enableLookups=false
   maxProcessors=255
   minProcessors=21
   port=8009

protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler
   proxyPort=0
   redirectPort=8443
   scheme=http
   secure=false
   tcpNoDelay=true
   useURIValidationHack=false
  Factory
className=org.apache.catalina.net.DefaultServerSocketFactory/

/Connector

Following are the problems.

I changed some parameters in the server.xml file to match the number of
apache connections. I was also having heavy load on tomcat so I had to
increase the database connections. Now the problem is tomcat is not closing
the database connections and database pool is filling up. Tomcat filled up
the system partition to 100% and threw the following errors for some reason:

exception: java.net.SocketException: Too many open files
java.net.SocketException: Too many open files
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:353)
at java.net.ServerSocket.implAccept(ServerSocket.java:439)
at java.net.ServerSocket.accept(ServerSocket.java:410)
at
org.apache.tomcat.util.net.DefaultServerSocketFactory.acceptSocket(DefaultSe
rverSocketFactory.java:107)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.acceptSocket(PoolTcpEndpoint.java
:335)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:483)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:533)
at java.lang.Thread.run(Thread.java:536)


Can anyone help me with this problem and refer me to some good docs for
tomcat setup and performance issues for production heavy loaded servers?

Thanks
kapil



-
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 tuning

2003-03-16 Thread Kapil Sharma
Thanks for reply. This answers one of the problem. Another problem is db
connections. I am monitoring db connections and they are just increasing
even if there is no load on the server. The problem is tomcat is not
clearing idle connections or timing out the db connections.
I still cannot understand how tomcat work directory fill up with 6GB of
space in 24 hours.

kapil

-Original Message-
From: Filip Hanik [mailto:[EMAIL PROTECTED]
Sent: 16 March 2003 19:43
To: Tomcat Users List
Subject: RE: tomcat tuning


the error is that you have a limited number of file descriptor.
so it doesn't look like your db pool is causing the problem, but your OS
configuration.
Increase the number of file descriptors for your system

Filip

-Original Message-
From: Kapil Sharma [mailto:[EMAIL PROTECTED]
Sent: Sunday, March 16, 2003 11:04 AM
To: [EMAIL PROTECTED]
Subject: tomcat tuning


Hi Guys,
I am facing a performance issue with tomcat 4.1.12 on Solaris. Following is
my setup

apache 1.3.27
tomcat 4.1.12
ajp 13

Following is my server.xml context for database and tomcat-apache connector

ResourceParams name=jdbc/foo
  parameter
nameurl/name
valuejdbc:oracle:oci8:@foo/value
  /parameter
  parameter
namevalidationQuery/name
valueselect 1 from dual/value
  /parameter
  parameter
namemaxIdle/name
value0/value
  /parameter
  parameter
namemaxActive/name
value255/value
  /parameter
  parameter
namedriverClassName/name
valueoracle.jdbc.driver.OracleDriver/value
  /parameter
  parameter
namemaxWait/name
   value3/value
  /parameter
  parameter
nameremoveAbandoned/name
valuetrue/value
  /parameter
  parameter
nameusername/name
valuetest/value
  /parameter
  parameter
namepassword/name
valuetest/value
  /parameter
  parameter
namefactory/name
valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
  /parameter
  parameter
nameremoveAbandonedTimeout/name
value300/value
  /parameter
/ResourceParams

   Connector className=org.apache.coyote.tomcat4.CoyoteConnector
   acceptCount=20
   bufferSize=2048
   connectionTimeout=2
   debug=4
   enableLookups=false
   maxProcessors=255
   minProcessors=21
   port=8009

protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler
   proxyPort=0
   redirectPort=8443
   scheme=http
   secure=false
   tcpNoDelay=true
   useURIValidationHack=false
  Factory
className=org.apache.catalina.net.DefaultServerSocketFactory/

/Connector

Following are the problems.

I changed some parameters in the server.xml file to match the number of
apache connections. I was also having heavy load on tomcat so I had to
increase the database connections. Now the problem is tomcat is not closing
the database connections and database pool is filling up. Tomcat filled up
the system partition to 100% and threw the following errors for some reason:

exception: java.net.SocketException: Too many open files
java.net.SocketException: Too many open files
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:353)
at java.net.ServerSocket.implAccept(ServerSocket.java:439)
at java.net.ServerSocket.accept(ServerSocket.java:410)
at
org.apache.tomcat.util.net.DefaultServerSocketFactory.acceptSocket(DefaultSe
rverSocketFactory.java:107)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.acceptSocket(PoolTcpEndpoint.java
:335)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:483)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:533)
at java.lang.Thread.run(Thread.java:536)


Can anyone help me with this problem and refer me to some good docs for
tomcat setup and performance issues for production heavy loaded servers?

Thanks
kapil



-
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 tuning

2003-03-16 Thread Kwok Peng Tuck
Try a pooled database connection. Don't depend on tomcat to timeout db 
connections.
You might want to look at dbcp in the commons project.

Kapil Sharma wrote:

Thanks for reply. This answers one of the problem. Another problem is db
connections. I am monitoring db connections and they are just increasing
even if there is no load on the server. The problem is tomcat is not
clearing idle connections or timing out the db connections.
I still cannot understand how tomcat work directory fill up with 6GB of
space in 24 hours.
kapil

-Original Message-
From: Filip Hanik [mailto:[EMAIL PROTECTED]
Sent: 16 March 2003 19:43
To: Tomcat Users List
Subject: RE: tomcat tuning
the error is that you have a limited number of file descriptor.
so it doesn't look like your db pool is causing the problem, but your OS
configuration.
Increase the number of file descriptors for your system
Filip

-Original Message-
From: Kapil Sharma [mailto:[EMAIL PROTECTED]
Sent: Sunday, March 16, 2003 11:04 AM
To: [EMAIL PROTECTED]
Subject: tomcat tuning
Hi Guys,
I am facing a performance issue with tomcat 4.1.12 on Solaris. Following is
my setup
apache 1.3.27
tomcat 4.1.12
ajp 13
Following is my server.xml context for database and tomcat-apache connector

   ResourceParams name=jdbc/foo
 parameter
   nameurl/name
   valuejdbc:oracle:oci8:@foo/value
 /parameter
 parameter
   namevalidationQuery/name
   valueselect 1 from dual/value
 /parameter
 parameter
   namemaxIdle/name
   value0/value
 /parameter
 parameter
   namemaxActive/name
   value255/value
 /parameter
 parameter
   namedriverClassName/name
   valueoracle.jdbc.driver.OracleDriver/value
 /parameter
 parameter
   namemaxWait/name
  value3/value
 /parameter
 parameter
   nameremoveAbandoned/name
   valuetrue/value
 /parameter
 parameter
   nameusername/name
   valuetest/value
 /parameter
 parameter
   namepassword/name
   valuetest/value
 /parameter
 parameter
   namefactory/name
   valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
 /parameter
 parameter
   nameremoveAbandonedTimeout/name
   value300/value
 /parameter
   /ResourceParams
  Connector className=org.apache.coyote.tomcat4.CoyoteConnector
  acceptCount=20
  bufferSize=2048
  connectionTimeout=2
  debug=4
  enableLookups=false
  maxProcessors=255
  minProcessors=21
  port=8009
protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler
  proxyPort=0
  redirectPort=8443
  scheme=http
  secure=false
  tcpNoDelay=true
  useURIValidationHack=false
 Factory
className=org.apache.catalina.net.DefaultServerSocketFactory/
   /Connector

Following are the problems.

I changed some parameters in the server.xml file to match the number of
apache connections. I was also having heavy load on tomcat so I had to
increase the database connections. Now the problem is tomcat is not closing
the database connections and database pool is filling up. Tomcat filled up
the system partition to 100% and threw the following errors for some reason:
exception: java.net.SocketException: Too many open files
java.net.SocketException: Too many open files
   at java.net.PlainSocketImpl.socketAccept(Native Method)
   at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:353)
   at java.net.ServerSocket.implAccept(ServerSocket.java:439)
   at java.net.ServerSocket.accept(ServerSocket.java:410)
   at
org.apache.tomcat.util.net.DefaultServerSocketFactory.acceptSocket(DefaultSe
rverSocketFactory.java:107)
   at
org.apache.tomcat.util.net.PoolTcpEndpoint.acceptSocket(PoolTcpEndpoint.java
:335)
   at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:483)
   at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:533)
   at java.lang.Thread.run(Thread.java:536)
Can anyone help me with this problem and refer me to some good docs for
tomcat setup and performance issues for production heavy loaded servers?
Thanks
kapil


-
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]