JDBC connection failing
Folks, We have an xml page that runs on tomcat and apache server. After the xml application that uses a jdbc connection to the databse. After it runs for about 12 hours, the page does not reply, that is, we get a page that is trying to load but remains blank without any response for a very long period of time. We have a T1 connection, but till no response. We think that it is caused by the JDBC connection after accessing it for many times, it is failing to release the open connections. However, this is only our speculation. Is there any way that we can check the JDBC connection? There is nothing in error logs of both apache or tomcat that is really helpful. Any help will be highly appreciated. Salutations,
Re: OutOfMemory - Set Java Heap Size?
Where is this command line to set the maximum heap size located? Please help, I am kind of new to this staff! - Original Message - From: Craig R. McClanahan [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED]; Max Hugen [EMAIL PROTECTED] Sent: Friday, August 24, 2001 10:41 PM Subject: Re: OutOfMemory - Set Java Heap Size? The java command line option you want is actually -Xmx256m to set the maximum heap size. To set this, you can establish an environment variable named TOMCAT_OPTS (Tomcat 3.x) or CATALINA_OPTS (Tomcat 4.x) that contains the command line options to be sent to the JVM. For example: export TOMCAT_OPTS=-Xmx256m $TOMCAT_HOME/bin/tomcat.sh start Craig McClanahan On Sat, 25 Aug 2001, Max Hugen wrote: Date: Sat, 25 Aug 2001 13:00:41 +1000 From: Max Hugen [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED], Max Hugen [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: OutOfMemory - Set Java Heap Size? I run Linux/Apache/Tomcat plus Oracle on a server with 512Mb of memory. I have successfully implemented a couple of Internet applications using JSP, Servlets (plus Oracle) etc. For each application (and client) I start a new Tomcat session, using a custom server.xml for each one. All was ok, until I tried increasing Tomcat sessions from 6 to 7, then I received the java.lang.OutOfMemoryError when starting the Tomcat sessions. I've read through many of the posts on this subject, some of which suggest to increase the heap size. Unfortunately, I'm a newbie to Java (and Linux and JSP and Oracle g) so I don't know how to either check this heap size, nor how to permanently set it to a value via a script using a switch like -Xms256m. The script I use to start Tomcat follows, plus the console output. Could anyone advise how to set the heap please? Many thanks, Max Hugen [EMAIL PROTECTED] Hugen Enterprises Pty Ltd, Sydney, Australia www.hugen.com.au Internet Application Developers Script Start echo Tomcat Startup ~ echo Start an instance of Tomcat for hugen /usr/local/tomcat/bin/startup.sh -f /usr/local/tomcat/conf/server_he.xml echo Start an instance of Tomcat for yass3i /usr/local/tomcat/bin/startup.sh -f /usr/local/tomcat/conf/server_yass3i.xml echo Start an instance of Tomcat for isp /usr/local/tomcat/bin/startup.sh -f /usr/local/tomcat/conf/server_isp.xml echo Start an instance of Tomcat for im2000i /usr/local/tomcat/bin/startup.sh -f /usr/local/tomcat/conf/server_im2000i.xml echo Start an instance of Tomcat for secure /usr/local/tomcat/bin/startup.sh -f /usr/local/tomcat/conf/server_secure.xml echo Start an instance of Tomcat for aedo /usr/local/tomcat/bin/startup.sh -f /usr/local/tomcat/conf/server_aedo.xml echo Start an instance of Tomcat for ncap /usr/local/tomcat/bin/startup.sh -f /usr/local/tomcat/conf/server_ncap.xml # Give Tomcat time to start before restarting Apache. echo Waiting 45 secs... sleep 45 # Restart Apache to register Tomcat properly. echo Restart Apache /etc/rc.d/init.d/httpd stop /etc/rc.d/init.d/httpd start sleep 2 echo Ok, we should be in business! Script End Console Output Start Starting tomcat. Check logs/tomcat.log for error messages Starting tomcat. Check logs/tomcat.log for error messages Starting tomcat. Check logs/tomcat.log for error messages Starting tomcat. Check logs/tomcat.log for error messages Starting tomcat. Check logs/tomcat.log for error messages Starting tomcat. Check logs/tomcat.log for error messages Starting tomcat. Check logs/tomcat.log for error messages Restart Apache Exception in thread main java.lang.OutOfMemoryError: unable to create new native thread at java.lang.Thread.start(Native Method) at org.apache.tomcat.util.ThreadPool$ControlRunnable.init(ThreadPool.java:465 ) at org.apache.tomcat.util.ThreadPool.openThreads(ThreadPool.java:360) at org.apache.tomcat.util.ThreadPool.start(ThreadPool.java:148) at org.apache.tomcat.service.PoolTcpEndpoint.startEndpoint(PoolTcpEndpoint.java :245) at org.apache.tomcat.service.PoolTcpConnector.start(PoolTcpConnector.java:188) at org.apache.tomcat.core.ContextManager.start(ContextManager.java:527) at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:202) at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235) Exception in thread main java.lang.OutOfMemoryError: unable to create new native thread at java.lang.Thread.start(Native Method) at org.apache.tomcat.util.ThreadPool$MonitorRunnable.init(ThreadPool.java:382 ) at org.apache.tomcat.util.ThreadPool.start(ThreadPool.java:149) at org.apache.tomcat.service.PoolTcpEndpoint.startEndpoint(PoolTcpEndpoint.java :245) at
Re: server.xml code insert....
Similar to this topic, I read in tomcat/doc/readme of my tomcat 3.2: --- 6.11 Misconfiguration Can Cause CPU-Bound Loop Workaround: kill the offending Tomcat process and correct your server.xml file such that there is a properly configured root context. The only place where root is mentioned in server.xml is: Context path=/examples docBase=webapps/ROOT / when I looked up at my .../webapps directory, I found out that there is no ROOT directory under that directory. I don't know if I have to create it. My problem is after about 10 hours, the xml applications my tomcat stop from responding, that's, if I click on the link, my browser keeps looking for the application for a very long time without even responding any error messages. Can someone help me what could be the cause of this? Any help will be appreciated. - Original Message - From: Larry Isaacs [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, August 24, 2001 12:11 PM Subject: RE: server.xml code insert Are you sure you are using Tomcat 3.2.3 or looking at the wrong documentation. You are citing documentation that exists only in Tomcat 3.3. Cheers, Larry -Original Message- From: Bob Wilson [mailto:[EMAIL PROTECTED]] Sent: Friday, August 24, 2001 12:17 PM To: [EMAIL PROTECTED] Subject: server.xml code insert I am using TOMCAT 3.2.3 and everything seems to be running fine however in the documentation regarding configurations to TOMCAT for auto-generating web server config files, I noticed it says to add the following code after the AutoWebApp ... / module in the server.xml. Here is the code... Apache mod_jk config:ApacheConfig / Def conf file:conf/auto/mod_jk.conf Def workers file:conf/jk/workers.properties In my server.xml file I do not have an entry for AutoWebApp ... / anywhere. The question I have is...Is this something that should have been in the file from the beginning when I unpacked it or was this AutoWebApp ... / something that I had to manually configure?? If I do have to configure this, would anyone have any instructions on how to do so and possibly explain 'why' this has to be done?? Thanks, Bob Wilson. _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
Re: Why and How Tomcat before Apache?
I cannot answer your why question, because, I am not one of the developers of apache or tomcat. But here is the answer to your how question: *To stop and start your tomcat: cd /usr/local/tomcat bin/shutdown.sh bin/startup.sh *Exit from tomcat and go to your apache server: su /usr/local/apache/bin/apachectl restart exit * Another way of stopping and starting apache: bin/apachectl stop bin/apachectl start - Original Message - From: Roberto B. [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, August 17, 2001 4:50 AM Subject: Why and How Tomcat before Apache? I have a Linux/Debian system. I want to use Apache as web-server and Tomcat only for JSP file. Is it true that it is necessary to make start Tomcat before Apache? Why?.. and if it is true.. how?? Thanks! Roberto.
Re: Tomcat dies... help!
Ron Sahar, This is very simple error. It should not cause any other problems. What this massages are telling you are simply your apache server was not up while tomcat was tying to get a signal. You need to read the error log at your apache server. Of course, I am assuming that you have an apache server. - Original Message - From: Sahar Madani [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 15, 2001 8:01 PM Subject: Re: Tomcat dies... help! Did anyone answer this one yet. I get this in one of my servers. Both using jdk1.2.2 tail mod_jk.log [jk_connect.c (143)]: jk_open_socket, connect() failed errno = 111 [jk_ajp12_worker.c (152)]: In jk_endpoint_t::service, Error sd = -1 Any ideas? thanks in advance. Ronald Vyhmeister wrote: Tomcat is having serious problems which only happen at night when the usage goes light... go figure. here's the one consistent thing I know. It gives this error and then dies... [jk_ajp13_worker.c (203)]: connection_tcp_get_message: Error - jk_tcp_socket_rec vfull failed [jk_ajp13_worker.c (621)]: Error reading request [jk_connect.c (143)]: jk_open_socket, connect() failed errno = 146 [jk_ajp13_worker.c (173)]: In jk_endpoint_t::connect_to_tomcat, failed errno = 1 46 ... What is wrong? What can I do to fix it? Thanks! Ron Vyhmeister -- Sahar Madani
Error in error_log
Folks, The error log at the three tiered apache server with tomcat as its middle tear is displaying more and more strange errors. As you may remember it, last time we had similar errors, namely, default.ada favicon.ico missing. As suggested by wise folks here, I created two nice files and named them with default.ada favicon.ico. Now we don't have those errors anymore. However, the latest errors are: [Wed Aug 15 10:41:51 2001] [error] [client 63.104.195.182] request failed: error reading the headers [Wed Aug 15 12:32:00 2001] [error] [client 209.150.103.195] File does not exist: /usr/local/apache/htdocs/_vti_inf.html [Wed Aug 15 12:32:01 2001] [error] [client 209.150.103.195] File does not exist: /usr/local/apache/htdocs/_vti_bin/shtml.exe/_vti_rpc I don't think these last two files that are reposted missing are supposed to be at the apache server to begin with. Please let us know what you think is causing these errors. Thank you! Regards,
Version
Folks, How do I know what version of tomcat I have on my apache server? This dude who installed tomcat for us, I think, he installed only the beta release of tomcat. Now, he is asking $10,000 to fix it. Oh holly cow! was my bosses reaction.:) I used the command: openssl version -a But it only gave me the ssl version. Any help will be appreciated!
Re: Version
Rob, Obviously, you and I need to learn a little more before we can open our own little yahoo shop. I found out that in tomcat, it is named LICENSE. lol! I'm just kidding dude! That help was very useful and more than $10 worth even though the name was LICENSE. Now in the LICENSE of my tomcat, it is displayed: * $Header: /home/cvs/jakarta-tomcat/LICENSE,v 1.1.1.1 1999/10/09 00:19:57 duncan Exp $ * $Revision: 1.1.1.1 $ * $Date: 1999/10/09 00:19:57 $ I suppose it is very old one, namely, Circa 1999. And I think that is why it is giving us all kinds of all kinds of errors. Moreover, what I am really concerned is the following message displayed bellow of the above message: * * * The Apache Software License, Version 1.1 * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * Now, my question is: Is this an Apache's License README file or tomcat's? - Original Message - From: Rob S. [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, August 16, 2001 3:02 PM Subject: Re: Version Oh. My. God. I should start a Yahoo! Shop answering questions for $10k =) You obviously have access to the server... cd to $TOMCAT_HOME and read the README file. - r On Thu, 16 Aug 2001 14:38:21 -0500 [EMAIL PROTECTED] wrote: Folks, How do I know what version of tomcat I have on my apache server? This dude who installed tomcat for us, I think, he installed only the beta release of tomcat. Now, he is asking $10,000 to fix it. Oh holly cow! was my bosses reaction.:) I used the command: openssl version -a But it only gave me the ssl version. Any help will be appreciated!
Error Log
Folks, How are folks at your end doing? The last time I asked you, you gave me great ideas. Folks at my end are pulling their hair tying to solve these errors from apache server error_log. After these errors are displayed, the JSP a page at the tomecat server fails. Tue Aug 14 16:52:26 2001] [error] [client 63.104.195.176] request failed: error reading the headers [Tue Aug 14 19:57:55 2001] [error] [client 63.104.195.182] request failed:error reading the headers [Tue Aug 14 22:02:10 2001] [error] [client 63.104.195.182] request failed:error reading the headers [Tue Aug 14 23:38:19 2001] [error] [client 63.104.195.182] request failed:error reading the headers [Wed Aug 15 00:17:57 2001] [error] [client 63.104.195.182] request failed:error reading the headers [Wed Aug 15 01:17:52 2001] [error] [client 210.220.132.95] Client sent malformed Host header [Wed Aug 15 02:51:43 2001] [error] [client 63.104.195.182] request failed: error reading the headers [Wed Aug 15 05:29:48 2001] [error] [client 63.104.195.182] request failed: error reading the headers What I am specially concerned is this error [Wed Aug 15 01:17:52 2001] [error] [client 210.220.132.95] Client sent malformed Host header Do you think some hacker is sending malformed host header from a browser? Any tip will be hightly apprecated,
Re: Tomcat crashes simultaneous more connection above 990+
Looks, like my webpage at tomcat is crashing because of many people trying to access the page simultaneously. Where in tomcat do you check to see how many concurrent connections are connected? - Original Message - From: Leigh Wanstead [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, August 14, 2001 4:26 PM Subject: Re: Tomcat crashes simultaneous more connection above 990+ Does anyone try to apply that theory on Tomcat or Jetty or JBoss? - Original Message - From: Aravind Naidu [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, August 11, 2001 5:50 PM Subject: RE: Tomcat crashes simultaneous more connection above 990+ More like a limitation of your JVM on your platform. Look at the Volano benchmarks on network scalability. http://www.volano.com/report/index.html -Original Message- From: Santosh Pasi [mailto:[EMAIL PROTECTED]] Sent: Monday, 1 January 1601 08:00 To: [EMAIL PROTECTED] Subject: Tomcat crashes simultaneous more connection above 990+ Hi everyone, Can anyone know how much simultaneous connections Tomcat can support, where do I need to change the settings to reflect same. Is no. of max. connections support ... is somewhat related with no. of connections to Tomcat. Yesterday, I tried all combinations .. still as soon as total connections .. reaches above 990 .. 997(at most) it crashes Tomcat. And no more process of Tomcat is left. Although Apache adn other applications are not affected. Is there a no. limitation on child process ... as here child processes . increases to some what 1048.. and it crashes. Same thing i tried on AIX 4.5 ... and it supported above 2600 process adn finally it crashed there. We are looking for 10,000 - 12000 simulatenous connections .. it means 1-12000 child process java ... is it problem with java .. we ar using 1.2.2. Is there any fine tuning that i can do in Tomcat or Apache or Linux? Regards, Santosh Pasi ---Original Message-- Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm Precedence: bulk Reply-To: [EMAIL PROTECTED] List-Help: mailto:[EMAIL PROTECTED] List-Unsubscribe: mailto:[EMAIL PROTECTED] List-Post: mailto:[EMAIL PROTECTED] To: [EMAIL PROTECTED] From: Santosh Pasi[EMAIL PROTECTED] Cc: Reply-To: Santosh Pasi[EMAIL PROTECTED] Date: Fri, 10 Aug 2001 12:30:04 +0530 In-Reply-To: [EMAIL PROTECTED] Subject: Re: Jakarta crashes simultaneous more connection above 990+ Hi, Even changing pools setting like Increasing the pool size resolved the problem, specifically the following parameters (neatly copied from the tomcat users guide) Parameter name=max_threads value=200/ Parameter name=max_spare_threads value=20/ Parameter name=min_spare_threads value=20 / The values were arbitrary - I stuck mine up to max_threads = 200, max_spare_threads=20, min_spare_threads=20 and lo - the hang problem went away. Even I had used options TOMCAT_OPTS= -Xms64m Didn't solve the problem. Still same problem. Regards, Santosh Pasi ---Original Message-- Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm Precedence: bulk Reply-To: [EMAIL PROTECTED] List-Help: mailto:[EMAIL PROTECTED] List-Unsubscribe: mailto:[EMAIL PROTECTED] List-Post: mailto:[EMAIL PROTECTED] To: [EMAIL PROTECTED] From: Santosh Pasi[EMAIL PROTECTED] Cc: Reply-To: Santosh Pasi[EMAIL PROTECTED] Date: Fri, 10 Aug 2001 10:55:26 +0530 Subject: Jakarta crashes after 900+ simultaneous connection Hi everyone, We are doing some stress testing. My problem is that when number of connections reaches around 940..980, jakarta crashes with following messages-SIGSE GV 11* segmentation violationsi_signo [11]: SIGSEGV 11* segmentation violation si_errno [0]: Success si_code [0]: SI_USER [pid: 0, uid: 0] stackpointer=0x4c558554 Full thread dump Classic VM (1.2.2-L, green threads): ppp202 (TID:0x40fb7190, sys_thread_t:0x8d0dec0, state:R) prio=5 at java.net.SocketInputStream.socketRead(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:86) at java.net.SocketInputStream.read(SocketInputStream.java:67) at java.io.InputStreamReader.fill(InputStreamReader.java:159) at java.io.InputStreamReader.read(InputStreamReader.java:235) at java.io.BufferedReader.fill(BufferedReader.java:133) at java.io.BufferedReader.readLine(BufferedReader.java:270) at java.io.BufferedReader.readLine(BufferedReader.java:325) at IRCClient.run(IRCClient.java:799)
Tomcat Crushes after few hours of working
Folks, At the mod_Jk.log file at tomcat server, the following errors are displayed repeatedly: - [jk_ajp13_worker.c (584)]: Error connecting to the Tomcat process. [jk_connect.c (143)]: jk_open_socket, connect() failed errno = 111 [jk_ajp13_worker.c (173)]: In jk_endpoint_t::connect_to_tomcat, failed errno = 111 -- Do you have any idea what could be causing this errors? The WebPages that are at the tomcat crush after few hours of working. The only way we can solve this problem has been by rebooting the tomcat server and the apache server. Any help will be appreciated, Barnabas.
Re: Error Log
Thank you Randy, This is very true. In fact, I bookmarked the site and it did it again. What do you think is the solution? Is there any where that I can download the favicon.ico and put it to the root directory? We looked the file up in all the directories, but non of the files are loaded in anywhere in the apache server. We even tried to find it at the apache server CDs, but the files are not there. - Original Message - From: Randy Paries [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, August 13, 2001 3:00 PM Subject: RE: Error Log This is an error from a user that bookmarks your site with an IE5 browser. The browser looks by default for favicon.ico in the root directory. /usr/local/apache/htdocs/favicon.ico -Original Message- From: Barnabas Yohannes [mailto:[EMAIL PROTECTED]] Sent: Monday, August 13, 2001 2:56 PM To: [EMAIL PROTECTED] Subject: Error Log Does any one has any idea what the following errors mean? [Mon Aug 13 12:22:53 2001] [error] [client 204.30.247.252] File does not exist: /usr/local/apache/htdocs/favicon.ico [Mon Aug 13 12:30:47 2001] [error] [client 217.128.68.93] File does not exist: /usr/local/apache/htdocs/default.ida [Mon Aug 13 12:52:13 2001] [error] [client 212.68.231.10] File does not exist: /usr/local/apache/htdocs/default.ida They are displayed at error_log of the apache server. We looked those files up the directory displayed, but they do not exist. What is happening is that after an applicatin at the tomcat server works for 10-12 hours, the web crushes. Folks here started male pattern baldness tying to solve this error. Any help will be highly appreciated.
Re: Error Log
Jeff, This code_red virus seems a Microsoft IIS issue. Do you think this virus also could attack an apache server? - Original Message - From: Jeff Rancier [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, August 13, 2001 3:06 PM Subject: RE: Error Log You're server is receiving what appears to be the code_red virus stuff. You must be connected to the outside? If so, I'd turn off, disconnect your connection, get the patch from Microsoft, follow the instructions. Forget what I said, you're not running IIS. But I think that's what they are though. -Original Message- From: Barnabas Yohannes [mailto:[EMAIL PROTECTED]] Sent: Monday, August 13, 2001 3:56 PM To: [EMAIL PROTECTED] Subject: Error Log Does any one has any idea what the following errors mean? [Mon Aug 13 12:22:53 2001] [error] [client 204.30.247.252] File does not exist: /usr/local/apache/htdocs/favicon.ico [Mon Aug 13 12:30:47 2001] [error] [client 217.128.68.93] File does not exist: /usr/local/apache/htdocs/default.ida [Mon Aug 13 12:52:13 2001] [error] [client 212.68.231.10] File does not exist: /usr/local/apache/htdocs/default.ida They are displayed at error_log of the apache server. We looked those files up the directory displayed, but they do not exist. What is happening is that after an applicatin at the tomcat server works for 10-12 hours, the web crushes. Folks here started male pattern baldness tying to solve this error. Any help will be highly appreciated.