tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chad kellerman <ckeller...@alabanza.com>
Subject out of memory errors
Date Wed, 23 Oct 2002 14:15:19 GMT
Hi everyone,

    I'll try and be a specific as possible:
I am running red hat 6.2/apache 1.3.26, tomcat 4.0.3 with java 1.4.0 on
a 1 ghz 1 gig ram server. (all old I am going to upgrade as soon as I
get it all working)  I am using mod_webapp for ip based virtual hosts

    httpd.conf file has:
<httpd.conf>
ServerName localhost

LoadModule webapp_module libexec/mod_webapp.so 
AddModule mod_webapp.c 
WebAppConnection warpConnection warp localhost:8008

<VirtualHost testdomain.com>
User test
Group testgrpgrp
ServerName testdomain.com
ServerAdmin webmaster@testdomain.com
DocumentRoot /home/test/testdomain-www
TransferLog /home/test/testdomain-logs/access-log
ScriptAlias /cgi-bin/ /home/test/testdomain-www/cgi-bin/
WebAppConnection testdomainCONN warp localhost:8008
#to be able to call jsp pages from webapps directory
WebAppDeploy . testdomainCONN webapps
#for a test application
WebAppDeploy shopping testdomainCONN /webapps/shopping/
</VirtualHost>

</httpd.conf>

My server.xml has:

##########################################################################################################################

<Server port="8005" shutdown="SHUTDOWN" debug="0">
  <Service name="Tomcat-Standalone">
    <Engine defaultHost="localhost" name="Standalone" debug="0">
      <Logger className="org.apache.catalina.logger.FileLogger"
              suffix=".txt" prefix="catalina_log." timestamp="true" />
      <Host appBase="webapps" unpackWARs="false" name="localhost"
            debug="0">
        <Logger className="org.apache.catalina.logger.FileLogger"
                suffix=".txt" prefix="localhost_log." directory="logs"
                timestamp="true" />
        <Valve className="org.apache.catalina.valves.AccessLogValve"
               pattern="common" suffix=".txt"
               prefix="localhost_access_log." directory="logs" />
        <Context path="/manager" docBase="manager" privileged="true"
                 debug="0" />
        <Context path="/examples" docBase="examples" reloadable="true"
                crossContext="true" debug="0" />
      </Host>
      <Realm className="org.apache.catalina.realm.MemoryRealm" />
    </Engine>
    <Connector acceptCount="10" port="8080" maxProcessors="5"
            connectionTimeout="60000" minProcessors="3"
            className="org.apache.catalina.connector.http.HttpConnector"
            enableLookups="false" redirectPort="8443" debug="0" />
  </Service>
<!-- for non-secure sites -->
  <Service name="Apache">
    <Engine className="org.apache.catalina.connector.warp.WarpEngine"
            name="Apache" debug="0">
      <Host className="org.apache.catalina.connector.warp.WarpHost" 
            appBase="/home/test/testdomain-www/webapps"
            unpackWARs="false" debug="0" name="testdomain.com">
        <Valve className="org.apache.catalina.valves.AccessLogValve"
               pattern="common" prefix="access-log"
               directory="/home/test/testdomain-logs" />
        <Context path="/manager" docBase="manager" privileged="true"
                 debug="0" />
        <Context path="/home/test/testdomain-www/webapps/shopping"
                docBase="shopping" privileged="true" debug="0" />
      </Host>
      
      <Logger className="org.apache.catalina.logger.FileLogger"
              prefix="file-log" directory="/var/log/tomcat"
              timestamp="true" />
      <Realm className="org.apache.catalina.realm.MemoryRealm" />
    </Engine>

    <Connector acceptCount="10" scheme="http" appBase="webapps"
            port="8008" secure="false" maxProcessors="5"
            minProcessors="3" 
            className="org.apache.catalina.connector.warp.WarpConnector"
            enableLookups="false" debug="0" />
    <DefaultContext reloadable="true" />
  </Service>

<!-- for secure sites -->
  <Service name="Apache-SSL">
    <Engine className="org.apache.catalina.connector.warp.WarpEngine"
            name="Apache-SSL" debug="0">
      <Host className="org.apache.catalina.connector.warp.WarpHost" 
            appBase="/home/test/testdomain-www/webapps"
            unpackWARs="false" debug="0"
            name="testdomain.com">
        <Valve className="org.apache.catalina.valves.AccessLogValve"
               pattern="common" prefix="access-log"
               directory="/home/test/testdomain-logs" />
        <Context path="/manager" docBase="manager" privileged="true"
                 debug="0" />
        <Context path="/home/test/testdomain-www/webapps/shopping"
                 docBase="shopping" privileged="true" debug="0" />
      </Host>
      
      <Logger className="org.apache.catalina.logger.FileLogger"
              prefix="secure-file-log" directory="/var/log/tomcat"
              timestamp="true" />
      <Realm className="org.apache.catalina.realm.MemoryRealm" />
    </Engine>
    <Connector acceptCount="10" scheme="https" appBase="webapps"
            port="8012" secure="true" maxProcessors="5"
            minProcessors="2" 
            className="org.apache.catalina.connector.warp.WarpConnector"
            enableLookups="false" debug="0" />
  </Service>
</Server>

######################################################################################################################

The web.xml file, tomcat-users.xml, and catalina.policy have been
untouch.

The only other alteration to the tomcat install was that I added:

CATALINA_OPTS="$CATALINA_OPTS $JPDA_OPTSi -Xmx256m -Xms128m"

to {TOMCAT_HOME}/bin/catalina.sh so that the jvm only had access to 256
megs of memory .


     Everything works ok (for the most part) but when I add a couple of
virtual host, (exactly as I have above) the Java processes go through
the roof and uses up all the memory assigned for the jvm.  This causes
apache to stop answering port 80 requests.  Even though the extra hosts
I add don't have any application assigned to them yet.

  Am I missing something in my configurations?  Can anyone help with
this problem?  

Thnaks for the help,

chad

Mime
View raw message