Virtual directories/Host via mod_JK2
We have a bunch of customers using JSP on JDK 1.3.1 / Tomcat 3.1?2? / mod_jk / Apache 1.3. The default directory setup for these customers is DIRECTORY http://- path- - ./site_url/htmlhttp://siteurl ./site_url/jsp http://siteurl/jsp ./site_url/cgi-bin http://siteurl/cgi-bin ./site_url/logs-- we use mod_jk.conf-auto to when we add a new site all we have to do is add the virtual host in apache and server.xml, reboot tomcat & apache and we are set. We'd like to move the same setup to JDK 1.4.2_01 / Tomcat 4.1.27 / mod_jk2 / Apache 2 All the HOW-TO's I've found do far and are hence far more more complex than we need. My understanding of how this should work is as follows: in Apache conf file in server.xml VirtualHost1.exported_dir - -> VirtualHost1.contextpath->jsp_dir VirtualHost2.exported_dir - -> VirtualHost2.contextpath->jsp_dir VirtualHost3.exported_dir - -> VirtualHost3.contextpath->jsp_dir VirtualHost4.exported_dir -via mod_jk2.so-> VirtualHost4.contextpath->jsp_dir VirtualHost5.exported_dir -[one entry in -> VirtualHost5.contextpath->jsp_dir VirtualHost6.exported_dir -via mod_jk2.so-> VirtualHost6.contextpath->jsp_dir VirtualHostN.exported_dir - -> VirtualHostN.contextpath->jsp_dir can someone point me to a resource which might provide some info on piping requests to certain virtual directories thru mod_jk2. thanks. Sai. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
PROBLEMS:> memory / cpu usage - Tomcat 3.2.1
We have a box[P3/700/512MBram] serving JSPs, with about 20 virtual hosts - and the server comes to a grinding halt after about 12-18 hours. The server gets about 30K hits per week, so it not exactly overloaded... versions: RedHat 7.2 Apache 1.3.20 Tomcat 3.2.1 mod_jk.so mod_jk.so-ap1.3.27-eapi-rh72 processes seem to persist longer than they should. here is a line out of top: 12568 root 18 0 25300 24M 7924 S 3.8 4.9 56:19 java anyone have similar experiences? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: PROBLEMS:> memory / cpu usage - Tomcat 3.2.1 - SOLVED!
ok. i have found my elusive problem. our client has a site with fairly moderate usage. and over the years we have changes the site a fair bit. it seems that the problem stems from requesting a jsp file that is no longer on the server - once the 404 is logged, the apache <-> tomcat connection does not terminate. it stays running, and starts to consume cpu time. a sufficient number of these will over time, bring the machine to a crawl - to a point where it is almost impossible to even login via ssh or even locally. Time to read the conf file to see what we can do about 404 error documents. Sai. On Sat, 30 Aug 2003 16:52:21 -0400, Sai Sivanesan wrote > We have a box[P3/700/512MBram] serving JSPs, with about 20 virtual > hosts - and the server comes to a grinding halt after about 12-18 > hours. The server gets about 30K hits per week, so it not exactly overloaded... > > versions: > RedHat 7.2 > Apache 1.3.20 > Tomcat 3.2.1 > mod_jk.so mod_jk.so-ap1.3.27-eapi-rh72 > > processes seem to persist longer than they should. here is a line > out of top: 12568 root 18 0 25300 24M 7924 S 3.8 4.9 > 56:19 java > > anyone have similar experiences? > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- Open WebMail Project (http://openwebmail.org) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Memory leaks?
may be a little off topic, but - check to see if you are logging any 404 messages on the tomcat side - i have found that memory and cpu idle time seem to dissappear with every 404 request passed over to tomcat from apache Sai. On Fri, 5 Sep 2003 12:09:52 -0500, Mike Curwen wrote > After about 15 emails, I'm gonna go back to the first: > > > I seemed to have read that java/tomcat isn't > > supposed to have memory leaks, > > AND > > > So where do I start looking for the problem? > > If I forget to close Statements would that cause the > > problem? > > So first of all, Java has built-in memory management and garbage > collection, so comparing against a language like C++, it's MUCH > harder to cause a memory leak in a Java program, *but not > impossible*. And up to now we're focusing on JDBC. Connection pools > and whether or not your driver strictly adheres to the JDBC standard > are certainly one source of memory leaks. But they're not the only > ones possible. What sorts of other activities are going on in your > application? Do you have other 3rd party libraries? Libraries > you've written yourself? Have these been profiled and exercised to > ensure they are not the ones leaking? > > > > -Original Message- > > From: Jim Lynch [mailto:[EMAIL PROTECTED] > > Sent: Friday, September 05, 2003 9:37 AM > > To: Tomcat Users List > > Subject: Re: Memory leaks? > > > > > > I'm most certain the connections are closed but there may be > > a few dangling statements. I'm using mysql jdbc. Not using > > pools since I never could get it working. Making direct requests. > > > > Still getting a out of memory hit every couple of days so I > > have to shutdown the server and start it up again. > > > > THnak,s > > Jim. > > > > "Shapira, Yoav" wrote: > > > > > > Howdy, > > > You don't have to close a result set if you're closing the > > statement > > > right away and the result set is the only one associated with the > > > statement... And in no case can closing the result set > > explicitly hurt > > > performance. > > > > > > Yoav Shapira > > > Millennium ChemInformatics > > > > > > >-Original Message- > > > >From: Greg Ward [mailto:[EMAIL PROTECTED] > > > >Sent: Thursday, September 04, 2003 10:05 AM > > > >To: Tomcat Users List; [EMAIL PROTECTED] > > > >Subject: Re: Memory leaks? > > > > > > > >On 03 September 2003, Jim Lynch said: > > > >> OK, that's probably what's going on. I know I should close > > > Statements > > > >> and Connections and do normally but I'm fairly certain I've some > > > >> out there dangling. I didn't know you had to close ResultSets, > > > >> however. Glad to know that. > > > > > > > >You don't have to close ResultSets -- check the JDBC docs: > > > > > > > > > > > > > http://java.sun.com/j2se/1.4.2/docs/api/java/s> > ql/Statement.html#close( > > > ) > > > > > > > >(Closing a Statement also closes any open ResultSets > > associated with > > > >that Statement.) > > > > > > > >Greg > > > > > > > > > >- > > > >To unsubscribe, e-mail: [EMAIL PROTECTED] > > > >For additional commands, e-mail: > > [EMAIL PROTECTED] > > > > > > 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] > > > > - > > 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] -- Open WebMail Project (http://openwebmail.org) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multiple Tomcat instances for virtual hosts
I really like the idea of setting up multiple instances of Tomcat per virtual site - i have 2 questions: 1) How does it affect memory usage, i.e. if we are on a server with X ammount of ram and there are 20 sites, does each site end up needing a minimum of ~21 MB RAM for tomcat so we have a basic need of 420MB ram being used just to keep tomcat up / site? 2) If one site gets busier then will it slow down the other sites more so than using mod_jk / mod_webapp? sai On Sat, 06 Sep 2003 21:05:38 -0400, Bob Langford wrote > Your plan should work pretty well. I do something similar myself. > The major difference is that I use one installation of Tomcat for > all the sites. I have a script to start tomcat for each site, that > points CATALINA_HOME to the shared Tomcat binaries, and > CATALINA_BASE to the conf/, logs/, temp/, work/, and webapps/ > directories for the site: > > file /home/site1/tomcat/catalina: >#!/bin/sh >CATALINA_BASE = "/home/site1/tomcat" >CATALINA_HOME = "/usr/share/tomcat4" (or whatever) >CATALINA_OPTS = "-server" (maybe others) >export CATALINA_BASE CATALINA_HOME CATALINA_OPTS >$CATALINA_BASE/bin/catalina.sh $* > > I can do ./catalina start, ./catalina stop,etc to control each > site. It works pretty well, especially if you're developing one > site while others are in production. > > Two things to watch for: > 1) You are correct that you have to use different ports for each > server.xml file. > I declared that site one could have ports between 8100-8199, site 2 > between 8200-8299, etc. Each project can use whatever they want in > their range. > > 2) Since these Tomcat instances listen on ports above 1024, they > don't need to be started by the "root" user. If they did, I'd be > very wary of putting the server.xml file (and other config files and > scripts) where the user could modify them. Also, your system boot > procedures need to take some steps to start them using the correct username. > > 3) I use Apache as a front end for all these Tomcat instances, > using a proxy instead of JK or JK2. In each virtual host, there's > something like this: ProxyPass /examples/ http://localhost:8181/examples/ > ProxyPassReverse /examples/ http://localhost:8181/examples/ > There are two nice things about this: Apache logs everything, > making it easier to do usage reports. And, all the connections to > Tomcat come from Apache and localhost, so I can block outside > connections to all ports except the ones Apache listens to. However, > it's still possible for user A to change his server.xml file to > listen to a port that's being sent traffic for user B. For my > purposes, that's not an issue; for others, it may be. > > Good luck! > ...Bob Langford... > > At 02:12 PM 9/6/2003, you wrote: > >Hi, > > > >I have Apache 1.3 and Tomcat 4.1.8 on a Red Hat 9 machine. > > > >Apache serves several virutal hosts. We have one Tomcat instance running > >with several web contexts, one context for each virtual host. > > > >Now I would like to change this to have one Tomcat instance for each > >virtual host (this is necessary because Tomcat sometimes crashes, and I > >don't want all virtual hosts to be down then). > > > >I read a book about Tomcat and searched the Web, but could not find out > >how to do this. What I assume is: > > > > > >In Apache's httpd.conf I have something (after the import of mod_jk): > > > >NameVirtualHost 200.200.200.200 (or whatever) > > > > > >ServerName www.xxx.com > >DocumentRoot /tomcat1/webapps/xxx > >JkMount /servlet/* worker1 > >JkMount /*.jsp worker1 > >JkMount /*.do worker1 > > > > > > > >ServerName www.yyy.com > >DocumentRoot /tomcat2/webapps/yyy > >JkMount /servlet/* worker2 > >JkMount /*.jsp worker2 > >JkMount /*.do worker2 > > > > > > > >Then I will install Tomcat two times, in /tomcat1 and /tomcat2. > > > >The server.xml of each Tomcat contains different ports (for shutdown and > >for the connector for ajp13). > > > > > >The workers.properties should look like: > > > >worker.list=worker1,worker2 > >... > >worker.worker1.port=8009 > >worker.worker1.host=localhost > >worker.worker1.type=ajp13 > >... > >worker.worker1.port=8010 > >worker.worker1.host=localhost > >worker.worker1.type=ajp13 > > > > > >Is this all correct? Should that work? > > > >Thomas > > > > > > > >- > >To unsubscribe, e-mail: [EMAIL PROTECTED] > >For additional commands, e-mail: [EMAIL PROTECTED] > > -- > Bob Langford > Silicon Masters Consulting, Inc.8207 Stone River Court, Richmond, > VA 23235 phone: 804-674-1253 fax: 804-745-6650 > http://www.silicon-masters.com/ > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- Open WebMail Project (http://openwebmail.org) -
Re: 404 leaks (was: PROBLEMS:> memory / cpu usage - Tomcat 3.2.1)
I don't think this is a known issue - i havn't found any refernce to it any hwere this was on tomcat version 3.2.1 mod_jk version is unknow as i stupidly pulled it the other day. Sai. On Sun, 7 Sep 2003 12:50:18 +0400, Anton Tagunov wrote > Hello, All! > > SS> once the 404 is logged, the apache <-> tomcat connection does not > SS> terminate. it stays running, and starts to consume cpu time > > Is this a known issue? > What connector + Tomcat versions are vulnerable? > > Anton > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- Open WebMail Project (http://openwebmail.org) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: PROBLEMS:> memory / cpu usage - Tomcat 3.2.1 - SOLVED!
I have setup a test box on our internal network with jmeter to generate some load - will monitor it over the next few days and post my results. Stay Tuned. Sai. On Mon, 8 Sep 2003 09:23:30 +0100 , Walker Chris wrote > Now that's interesting. I've been following this thread because > I've just installed a new application on a Sun Cobalt > (Apache/mod_webapp/Tomcat) server. It's the only application on the > server, and nobody's using it yet, but the server monitor keeps > mailing me about high memory usage. > > But part of the Cobalt environment seems to be a repeating job that checks > the web server status by trying to get a page every half-hour or so. > The page isn't there, so it gets a 404, which is fine as far as the > monitor is concerned, but I wonder what that's doing to my server resources? > > The answer, I imagine, is to make sure the dummy JSP is always present. > > Chris Walker versions: - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: 404 leaks (was: PROBLEMS:> memory / cpu usage - Tomcat 3.2.1)
Anton I found the versions in another thread i had posted> > > RedHat 7.2 > > Apache 1.3.20 > > Tomcat 3.2.1 > > mod_jk.so mod_jk.so-ap1.3.27-eapi-rh72 Sai. On Mon, 8 Sep 2003 16:24:46 -0400, Sai Sivanesan wrote > I don't think this is a known issue - i havn't found any refernce to > it any hwere this was on tomcat version 3.2.1 mod_jk version is > unknow as i stupidly pulled it the other day. > > Sai. > > On Sun, 7 Sep 2003 12:50:18 +0400, Anton Tagunov wrote > > Hello, All! > > > > SS> once the 404 is logged, the apache <-> tomcat connection does not > > SS> terminate. it stays running, and starts to consume cpu time > > > > Is this a known issue? > > What connector + Tomcat versions are vulnerable? > > > > Anton > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > -- > Open WebMail Project (http://openwebmail.org) > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- Open WebMail Project (http://openwebmail.org) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: help with domain and ip
let me see if i understand your question? you wan to type http://123.45.67.89 in a webbrowser and see your apache server dishing out content? well, if that was the quesion you should set the port on yout apache config file to serve using port 80 not 8080. basically when you type http:// it tells your browers to go to 123.45.67.89:80 as that is the default port for "web" services. there is no such thing as serving on 123.45.67.89. any tcp/ip comm happens on a port on an ip address. or i am confused as well? sai. On Mon, 08 Sep 2003 21:32:06 -0700, Michael Ni wrote > Hi I have a domain where i can set the ip as 123.45.67.89 however my > apache is set to 123.45.67.89:8080. How do I configure my port 8080 > to direct to 123.45.67.89 > > mike > > _ > Use custom emotions -- try MSN Messenger 6.0! > http://www.msnmessenger-download.com/tracking/reach_emoticon > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- Open WebMail Project (http://openwebmail.org) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Mobile phone on serial port - Howto send sms?
we have an affilliate company that has a product comming on the market that uses a Nokia 30 or Nokia 31 GSM modem(phone without a headset and with a rs232 port) and does exactly that. we have a client server version comming out - i will ask how its done - can't be too difficult as the app is mostly a vb piece. as long as i am not going to give away anything to proprietary i'll share it - why do you want to use a serial conection - do you need to receive sms msgs as well as send? cause if all you need to do is send, why don't you just dispatch it as an email? Sai. On Wed, 10 Sep 2003 23:34:51 -0100 (GMT+1), john-paul delaney wrote > Hello List... this is a tricky one I believe, > > Serial port-connected mobile phone - I'd like to find out how to > send sms messages using tomcat on linux. Anyone got any leads? > > I'd appreciate any help. > > thanks, > /j-p. > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- Open WebMail Project (http://openwebmail.org) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]