Server refuse connection with many TIME_WAIT
I have an Axis service that runs under Tomcat 5.5.4. I use gSoap client to connect to the server. After about 3960 requests from the clients, the Tomcat stops accepting connection. I have to wait for serveral minutes for it to accept connections again. This is under MS Windows XP system. Using the command line: netstat -aenter I have about 5000 TIMEWAIT: TCPvd:5000localhost:http TIME_WAIT Looking through TcpMonitor, both the client and server send in close message: CLIENT MESSAGE: POST /axis/services/TestService HTTP/1.1 Host: 127.0.0.1:82 User-Agent: gSOAP/2.7 Content-Type: text/xml; charset=utf-8 Content-Length: 552 Connection: close SOAPAction: SERVER MESSAGE: HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Content-Type: text/xml;charset=utf-8 Date: Wed, 15 Dec 2004 04:04:52 GMT Connection: close What's going on? Is there any flag I can set in Tomcat to close these TIMEWAIT connections? Looking at the clients's memory foot print, the memory does not go up at all after all these connections. The strange thing is this: using Java's client to repeatedly request the server for many thousand times, and I don't have any problem with the server. Using the command line netstat -a, and I still see many TIMEWAIT. Could this have something to do with gSoap, not Tomcat? Thanks, V D - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Server refuse connection with many TIME_WAIT
Thank you for the reply. I try to set |connectionTimeout to 1 seconds (down from default of 60 seconds), however, the result is almost identical. After about 3900-4000 request, the server refuses all requests.| FRANCOIS Dufour wrote: try to lower your conection time out under catalina policy hope it help - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5.5.4 Stability
I just test this at home. I change all settings to use Tomcat 5.5.4, Axis 1.2. The result is a big surprise. Right now, I hit the server with 2 clients, each has 150 connections. There is no error so far. This machine is faster than the one at work, and also has double the amount of RAM. If things going this way, it'll be great. I also notice that there is no networking load (it all go within the machine). I wonder how well it does if it go across the network After running with 200 connections, I got out of memory error on the server. I give it max of 512M. I also increase the maxThread to 400. Without these, it could handle up to 200 concurrent connections. This is really good. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5.5.4 Stability
Today, I ran an axis application under both Tomcat 5.028 and 5.5.4. Hitting this axis application with 100 simultaneous clients for many hits. 5.0.28 seems to hold up very well. It drops connections once a while. However, 5.5.4 drops many connections. I wonder if the Tomcat team aware of this problem. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Good tutorial on embedded Tomcat
I try to find good information on programming with embedded Tomcat, but did not find much. I managed to get it running. However, if there's more indepth information, it would be much easier. I didn't see much information on Tomcat website. Did I miss something? There's the API, which is good, but it would be nice to have tutorial on it. Also, do you have a suggestion on a good book on this (if it's on latest version 5.5 would be nice)? Thanks, vh. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Set resource parameters in 5.5 not the same as 5.0
Using Embedded Tomcat, in 5.0, one would add a resource as: StandardContext context = (StandardContext)embeddedTomcat.createContext(context, path); ContextResource res = new ContextResource(); res.setName( jdbc/ name); res.setType( javax.sql.DataSource ); res.setAuth( Container ); context.addResource(res); ResourceParams params = new ResourceParams(); params.setName( jdbc/ name); params.addParameter( factory , org.apache.commons.dbcp.BasicDataSourceFactory ); ... context.addResourceParams(params); With Tomcat 5.5, someone said using res.setProperty() instead of using params. So does it look like this: res.setProperty( factory , org.apache.commons.dbcp.BasicDataSourceFactory ); etc. If this is the case, then how do I set the resource name (params.setName( jdbc/ name);*)*? Also, if I have more than one resource, how do I take care of this? Thank you in advance, vh. * * - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Set resource parameters in 5.5 not the same as 5.0
Probably answer myself here, but is it true that to have more than one resource parameter, just create more than one ContextResource? V D wrote: Using Embedded Tomcat, in 5.0, one would add a resource as: StandardContext context = (StandardContext)embeddedTomcat.createContext(context, path); ContextResource res = new ContextResource(); res.setName( jdbc/ name); res.setType( javax.sql.DataSource ); res.setAuth( Container ); context.addResource(res); ResourceParams params = new ResourceParams(); params.setName( jdbc/ name); params.addParameter( factory , org.apache.commons.dbcp.BasicDataSourceFactory ); ... context.addResourceParams(params); With Tomcat 5.5, someone said using res.setProperty() instead of using params. So does it look like this: res.setProperty( factory , org.apache.commons.dbcp.BasicDataSourceFactory ); etc. If this is the case, then how do I set the resource name (params.setName( jdbc/ name);*)*? Also, if I have more than one resource, how do I take care of this? Thank you in advance, vh. * * - 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: connection pooling
How about try to move your application (wms) out of the webapps directory, let's say: c:\wms Then in the server.xml, try to change docBase in the context: docBase=c:\wms Now, see if your application works or give a different error. Remember to drop the jdbc library into the common/lib folder. Eric Wulff wrote: Hi all, I'm returning to a problem I couldn't solve the first time, about two months ago, and still can't seem to figure out. I can't get a db connection using connection pools. I get the exception listed below, same as so many have previously, but nothing I've found seems to works. Below are my specs. Anyone with concrete advise/direction on how to get this working? Also, I noticed in many solutions the suggestion was made to edit the myapp.xml file located at CATALINA_HOME/conf/Catalina/localhost/. However, there is no myapp.xml in that directory on my server. Just 2 .xml's related to other applications and a manager.xml which I'm not sure what it's related to. OS: FC2 Tomcat 5.0.28 exception: org.apache.commons.dbcp.SWLNestedException: Cannot create JDBC driver class '' for connect URL 'null' WEB-INF web xml: code inserted AFTER all servlet mappings... resource-ref res-ref-namejdbc/wms/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref server xml(tried this with and without a Resource name)... Context path=/wms docBase=wms debug=0 reloadable=true ResourceParams name=jdbc/wms parameter nameusername/name valuewhatever/value /parameter parameter namepassword/name valuewhatever/value /parameter parameter namedriverClassName/name valuecom.informix.jdbc.IfxDriver/value /parameter parameter nameurl/name valuejdbc:informix-sqli://foo.bar.com:somePort/dbName:INFORMIXSERVER=serverName/value /parameter /ResourceParams /Context I have the following jars in my CATALINA_HONE/common/lib and I also tried putting the db driver and commons-collections, dbcp, and pool in my WEB-INF/lib with no success. They are all mode 644. ant.jar ant-launcher.jar commons-collections-3.1.jar commons-dbcp-1.2.1.jar commons-el.jar commons-pool-1.2.jar ifxjdbc.jar (the necessary informix driver) jar.txt jasper-compiler.jar jasper-runtime.jar jsp-api.jar mysql-connector-java-3.0.15-ga-bin.jar naming-common.jar naming-factory.jar naming-java.jar naming-resources.jar servlet-api.jar On Fri, 8 Oct 2004 11:45:59 +0530, Atishay Kumar [EMAIL PROTECTED] wrote: hi, i am not sure but you may try downloading latest jar files for following froom tomcat site and try them out. copy the old jar files somewhere else and try using the latest jar files. 1) Commons Collections 2)Commons DBCP 3)Commons Pool On Thu, 7 Oct 2004 15:29:40 -0700, Eric Wulff [EMAIL PROTECTED] wrote: Except that the driver works for connecting if I'm not utilizing a connection pool, i.e., I am able to connect to the db and manipulate data via DriverManager.getConnection(url, db, pwd). The driver is located in CATALINA_HOME/commons/lib Eric On Thu, 7 Oct 2004 18:22:45 -0400, Phillip Qin [EMAIL PROTECTED] wrote: No, you don't need that many params. I think your problem might be the driver. Where did you drop off your informix jdbc jar? -Original Message- From: Eric Wulff [mailto:[EMAIL PROTECTED] Sent: October 7, 2004 5:56 PM To: Tomcat Users List Subject: Re: connection pooling Yes, I have added Resource name=... . Now different errors are reported via stack trace as I posted in response to Atishay's suggestion that I add this. I'll try adding your suggestions and see what happens. Also, you suggest adding many parameters. Are they necessary for simply making a connection? If so, the tutorial I'm following, 'Tomcat Kick Start' left all your suggestions out. Including the Resource tag, but that seems critical for connection. Eric On Thu, 7 Oct 2004 17:14:27 -0400, Phillip Qin [EMAIL PROTECTED] wrote: 1. web.xml: OK 2. context.xml on context of server.xml: Resource name=jdbc/test_connect auth=Container type=javax.sql.DataSource/ = have you added this? ResourceParams name=jdbc/test_connect parameter namedriverClassName/name valueyour.jdbc.driver/value /parameter parameter nameurl/name valueyour.jdbc.url/value /parameter parameter nameusername/name valueyouruser/value /parameter parameter namepassword/name valueyourpass/value /parameter parameter namemaxActive/name value20/value /parameter parameter namemaxIdle/name value10/value /parameter parameter nameminIdle/name value10/value
What's up with all these Hi virus
Should the server has email filter that throws out these. Or maybe it comes from different server? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] Re: Have you implemented a Java server faces site?
Thank you for the reply. I happened to read that article too. I also have the book the guy wrote. I'll look into the rendering part using XML. It would be better if it's supported out of the box though. Hopefully the next version will address this. I did write a simple struts app before, and JSP seems to be better architecturally, and simpler to use though. The problem I have with it is that you can not programmatically display the view easily. What I mean is that in the JSP page, there is not much way to put your code there. For example, one of my requirement is that depending on a situation, 1 or more tables must be shown. You can see from the article that mixing tag lib and JSF is prohibited in a loop. Also, in a purist sense, data preparation for the display should also stay in the JSP file, not the back bean. This means it has to support programming in there. I can just create another class/bean to do this, but it becomes so many files just do something, and isn't JSP supposed to be the view part? I think it's perfectly ok to put any type of java programming in the view as long as that code only is used for the view, not application logic. Anyway, I will investigate if I can some how satisfy all my requirements with this technology. I was very commited to JSF, until I read the first link you sent me. The fact that it's very recent (august 10) causes me unease with this technology. Since it seems that you did implemented a full app successfully, if you don't mind, could you share your experience and how did your project go? Thanks. Hiroshi Iwatani wrote: Oh yes. But ... V D wrote: Thank you very much for the link. I also did some work on JSF too, and see its strength and weakness. Unfortunately, the guy doing the evaluation in the link below did not dig deep enough or use any GUI IDE See links linked from the theserverside page, that is, from the readers responses. Especially, Geary's blog page. The orgiginator guy is rather light and superficial one. such as the Java Creator or IBM's tool. Some of his points are valid though. I see other problems myself. One of them is the ability to create customized view, component, or renderer. They all involves java objects (which is not easily changable), and very elaborate. To have a render, you have to have a tag file, a tag class, a configuration, and the renderer class. Unbelievable! Tags are only for JSP presentation. You could use a better presentation technology if you want. See this article: http://www.onjava.com/pub/a/onjava/2004/06/09/jsf.html Personally, I feel JSF has saved my life in the Web development sea. It's simple, easy to use, and more effective than Struts et al. Hiroshi Iwatani wrote: Yes. See http://www.theserverside.com/news/thread.tss?thread_id=27962 V D wrote: If so, what is your experience? Is it mature enough for a serious web programming? Thanks. - 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]
Have you implemented a Java server faces site?
If so, what is your experience? Is it mature enough for a serious web programming? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Have you implemented a Java server faces site?
Thank you very much for the link. I also did some work on JSF too, and see its strength and weakness. Unfortunately, the guy doing the evaluation in the link below did not dig deep enough or use any GUI IDE such as the Java Creator or IBM's tool. Some of his points are valid though. I see other problems myself. One of them is the ability to create customized view, component, or renderer. They all involves java objects (which is not easily changable), and very elaborate. To have a render, you have to have a tag file, a tag class, a configuration, and the renderer class. Unbelievable! Hiroshi Iwatani wrote: Yes. See http://www.theserverside.com/news/thread.tss?thread_id=27962 V D wrote: If so, what is your experience? Is it mature enough for a serious web programming? Thanks. - 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: SunONE versus Tomcat performance
I used it for webservice before, and it is faster than Tomcat, but I wouldn't say that was 2 to 5 times for that particular case. You can get it for free because it's bundled with the Application Server platform which is free. Julian wrote: Just downloaded it to give it a try. There's a trial version but nevertheless it costs only $75. David Rees wrote: David Wall wrote: It is worth noting that Sun Java Web Server has better performance than Apache Tomcat; you can learn more about this from Sun Java Web Server vs. Apache/Tomcat Benchmarks. The link to the KeyLabs report is at http://www.keylabs.com/results/sun/SunONEFinalReport_Solaris.pdf Why would SunONE be anywhere from 2 to 5 times faster than Tomcat? They also suggest that Tomcat would start to show errors when loading 200 users at a time, whereas SunONE could handle up to 500 users without any errors. It's hard to say why the Apache/Tomcat combination would not perform as well as SunONE (which I am not familar with), but without more details of the Apache/Tomcat configuration it's too difficult to say. Has anyone independantly tested SunONE compared to Apache/Tomcat? -Dave - 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: Connection pool detecting bad connection
Thank you very much for the information. I wonder what is the implication of this in term of performance. This effectively double the number of query if my query is small and one for each request to have a connection handle (but under very heavy load). Also, what's a generic way for doing this across other database, for example, MySql, MS Sql, etc. Also, what if the table does not exist? I saw some other method, such as getMetaData, what is the implication of performance on this? Thank you very much for your consideration, Vy Ho Holly, Michael wrote: Configure your connection pool to use the 'Test On Borrow' feature. This will send a small query out to make user the connection is available before it uses the connection for the larger query. Your query could be like SELECT 'test' from dual if you are on Oracle. Hope this helps Michael -Original Message- From: Vy Ho [mailto:[EMAIL PROTECTED] Sent: Friday, July 16, 2004 2:15 PM To: 'Tomcat Users List' Subject: Connection pool detecting bad connection I am sure people with DBCP background would know about this. My question is what is the generic/common/standward JDBC way of check a connection to see if it's a good connection or not. Check thing like: con.isClosed() works in some case, and does not in another case. Would retriveing the metadata do it? What is the implication in term of performance for this? Thanks. - 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]