dhis2-users team mailing list archive
-
dhis2-users team
-
Mailing list archive
-
Message #08016
Re: [Dhis2-devs] Amazon EC2 memory configuration
Are you sure that Tomcat actually shut down ?
Be sure Tomcat is dead by invoking ps -ef | grep tomcat and killing any
processes(es) which may be running, and then start it again. If you get
that memory leak error again, then something else is not right.
Having said that, I agree with Knut. 1GB will really be pushing it, but you
might be able to get it to work.
Regards,
Jason
On Wed, Sep 2, 2015 at 12:56 PM, Knut Staring <knutst@xxxxxxxxx> wrote:
> Hi David,
>
> 1 GB is probably pushing it a bit, AFAIK. Possible, but not too easy....2
> GB should be fine.
>
> Knut
>
> On Wed, Sep 2, 2015 at 12:11 PM, David Huser <david.huser@xxxxxxxxxxxx>
> wrote:
>
>> Hi
>>
>> I registered for a free tier EC2 instance (t2.micro) on Amazon with
>> Ubuntu 14.04 AMD64 http://aws.amazon.com/ec2/instance-types/
>> I have set it up according to the DHIS2 implementation manual.
>> I'm aware that this low hardware specifications are not ready for
>> national use, I'd like to use it as prototyping resource. However, the
>> server responds to pings but is not accessible through the browser. I
>> suspect the memory configuration. Please find the relevant configurations /
>> error messages in red below.
>>
>> *Hardware:*
>> RAM: 1GB memory
>> CPU: 1 CPU, spike balancing (t2.micro tier from amazon)
>> Disk: 20GB
>>
>> Basically, I just divided the RAM specs from the implementation manual
>> (2x 8GB) for each attribute by 16 (I have 1GB).
>>
>>
>> *$ cat /etc/postgresql/9.3/main/postgresql.conf*
>> shared_buffers = 128MB
>> work_mem = 1MB
>> maintenance_work_mem = 32MB
>> effective_cache_size = 128MB
>> *$ java -version*
>> java version "1.7.0_79"
>> OpenJDK Runtime Environment (IcedTea 2.5.6) (7u79-2.5.6-0ubuntu1.14.04.1)
>> OpenJDK 64-Bit Server VM (build 24.79-b02, mixed mode)
>>
>>
>> *$ cat /tomcat-dhis/bin/setenv.sh*
>> #!/bin/sh
>> #
>>
>> CATALINA_HOME=/usr/share/tomcat7
>>
>> # The first existing directory is used for JAVA_HOME (if JAVA_HOME is not
>> # defined in $DEFAULT)
>> JDK_DIRS="/usr/lib/jvm/java-6-openjdk /usr/lib/jvm/java-6-sun
>> /usr/lib/jvm/java-1.5.0-sun /usr/lib/j2sdk1.5-sun /usr/lib/j2sdk1.5-ibm"
>>
>> # Look for the right JVM to use
>> for jdir in $JDK_DIRS; do
>> if [ -r "$jdir/bin/java" -a -z "${JAVA_HOME}" ]; then
>> JAVA_HOME_TMP="$jdir"
>> # checks for a real JDK like environment, needed to check if
>> # really the java-gcj-compat-dev package is installed
>> if [ -r "$jdir/bin/jdb" ]; then
>> JAVA_HOME="$JAVA_HOME_TMP"
>> fi
>> fi
>> done
>>
>> # Default Java options
>> if [ -z "$JAVA_OPTS" ]; then
>> JAVA_OPTS="-Djava.awt.headless=true -Xmx128M"
>> fi
>>
>> export JAVA_HOME='/usr/lib/jvm/java-7-openjdk-amd64'
>> export JAVA_OPTS='-Xmx768m -Xms256m -XX:MaxPermSize=128m
>> -XX:PermSize=32m'
>> export DHIS2_HOME='/home/dhis/config'
>>
>>
>>
>>
>> after restarting tomcat:
>> *$ cat catalina.out *
>>
>> Sep 02, 2015 11:59:08 AM org.apache.catalina.startup.ClassLoaderFactory
>> validateFile
>> WARNING: Problem with directory [/usr/share/tomcat7/common/classes],
>> exists: [false], isDirectory: [false], canRead: [false]
>> Sep 02, 2015 11:59:08 AM org.apache.catalina.startup.ClassLoaderFactory
>> validateFile
>> WARNING: Problem with directory [/usr/share/tomcat7/common], exists:
>> [false], isDirectory: [false], canRead: [false]
>> Sep 02, 2015 11:59:08 AM org.apache.catalina.startup.ClassLoaderFactory
>> validateFile
>> WARNING: Problem with directory [/usr/share/tomcat7/server/classes],
>> exists: [false], isDirectory: [false], canRead: [false]
>> Sep 02, 2015 11:59:08 AM org.apache.catalina.startup.ClassLoaderFactory
>> validateFile
>> WARNING: Problem with directory [/usr/share/tomcat7/server], exists:
>> [false], isDirectory: [false], canRead: [false]
>> Sep 02, 2015 11:59:08 AM org.apache.catalina.startup.ClassLoaderFactory
>> validateFile
>> WARNING: Problem with directory [/usr/share/tomcat7/shared/classes],
>> exists: [false], isDirectory: [false], canRead: [false]
>> Sep 02, 2015 11:59:08 AM org.apache.catalina.startup.ClassLoaderFactory
>> validateFile
>> WARNING: Problem with directory [/usr/share/tomcat7/shared], exists:
>> [false], isDirectory: [false], canRead: [false]
>> Sep 02, 2015 11:59:09 AM org.apache.coyote.AbstractProtocol init
>> INFO: Initializing ProtocolHandler ["http-bio-8080"]
>> Sep 02, 2015 11:59:09 AM org.apache.catalina.startup.Catalina load
>> INFO: Initialization processed in 1007 ms
>> Sep 02, 2015 11:59:09 AM org.apache.catalina.core.StandardService
>> startInternal
>> INFO: Starting service Catalina
>> Sep 02, 2015 11:59:09 AM org.apache.catalina.core.StandardEngine
>> startInternal
>> INFO: Starting Servlet Engine: Apache Tomcat/7.0.52 (Ubuntu)
>> Sep 02, 2015 11:59:09 AM org.apache.catalina.startup.HostConfig deployWAR
>> INFO: Deploying web application archive
>> /home/dhis/tomcat-dhis/webapps/ROOT.war
>> * INFO 2015-09-02 11:59:35,400 System property dhis2.home not set
>> (DefaultLocationManager.java [localhost-startStop-1])
>> * INFO 2015-09-02 11:59:35,402 Environment variable DHIS2_HOME points to
>> /home/dhis/config (DefaultLocationManager.java [localhost-startStop-1])
>> * INFO 2015-09-02 11:59:37,945 Hibernate configuration loaded, using
>> dialect: org.hibernate.dialect.PostgreSQLDialect
>> (DefaultHibernateConfigurationProvider.java [localhost-startStop-1])
>> * INFO 2015-09-02 11:59:57,732 Found the following message senders:
>> [org.hisp.dhis.message.EmailMessageSender@68b059dc,
>> org.hisp.dhis.sms.SmsMessageSender@5e5f2c88] (DefaultMessageService.java
>> [localhost-startStop-1])
>> * INFO 2015-09-02 12:00:09,471 Detected apps: [] (DefaultAppManager.java
>> [localhost-startStop-1])
>> * INFO 2015-09-02 12:00:13,236 Added logger: org.hisp.dhis.resourcetable
>> using file: /home/dhis/config/logs/dhis-analytics-table.log
>> (Log4JLogConfigInitializer.java [localhost-startStop-1])
>> * INFO 2015-09-02 12:00:13,236 Added logger:
>> org.hisp.dhis.analytics.table using file:
>> /home/dhis/config/logs/dhis-analytics-table.log
>> (Log4JLogConfigInitializer.java [localhost-startStop-1])
>> * INFO 2015-09-02 12:00:13,237 Added logger: org.hisp.dhis.dxf2 using
>> file: /home/dhis/config/logs/dhis-data-exchange.log
>> (Log4JLogConfigInitializer.java [localhost-startStop-1])
>> * INFO 2015-09-02 12:00:13,237 Added logger: org.hisp.dhis.dxf2.synch
>> using file: /home/dhis/config/logs/dhis-data-sync.log
>> (Log4JLogConfigInitializer.java [localhost-startStop-1])
>> * INFO 2015-09-02 12:00:13,237 Added root logger using file:
>> /home/dhis/config/logs/dhis.log (Log4JLogConfigInitializer.java
>> [localhost-startStop-1])
>> * WARN 2015-09-02 12:00:14,817 RP discovery / realm validation
>> disabled; (RealmVerifier.java [localhost-startStop-1])
>> * INFO 2015-09-02 12:00:15,654 Executing startup routine [1 of 15,
>> runlevel 1]: InitTableAlteror (DefaultStartupRoutineExecutor.java
>> [localhost-startStop-1])
>> * INFO 2015-09-02 12:00:15,774 Executing startup routine [2 of 15,
>> runlevel 2]: PeriodTypePopulator (DefaultStartupRoutineExecutor.java
>> [localhost-startStop-1])
>> * INFO 2015-09-02 12:00:15,811 Executing startup routine [3 of 15,
>> runlevel 2]: DataElementDefaultDimensionPopulator
>> (DefaultStartupRoutineExecutor.java [localhost-startStop-1])
>> * INFO 2015-09-02 12:00:15,860 Linked default category with default
>> concept (DataElementDefaultDimensionPopulator.java [localhost-startStop-1])
>> * INFO 2015-09-02 12:00:16,005 Executing startup routine [4 of 15,
>> runlevel 3]: ReportingIdentityPopulator (DefaultStartupRoutineExecutor.java
>> [localhost-startStop-1])
>> * INFO 2015-09-02 12:00:16,180 Executing startup routine [5 of 15,
>> runlevel 3]: TableAlteror (DefaultStartupRoutineExecutor.java
>> [localhost-startStop-1])
>> * INFO 2015-09-02 12:00:20,284 Tables updated (TableAlteror.java
>> [localhost-startStop-1])
>> * INFO 2015-09-02 12:00:20,285 Executing startup routine [6 of 15,
>> runlevel 3]: TrackerIdentityPopulator (DefaultStartupRoutineExecutor.java
>> [localhost-startStop-1])
>> * INFO 2015-09-02 12:00:20,294 1 last updated set on trackedentity
>> (IdentityPopulator.java [localhost-startStop-1])
>> * INFO 2015-09-02 12:00:20,296 1 created timestamps set on trackedentity
>> (IdentityPopulator.java [localhost-startStop-1])
>> * INFO 2015-09-02 12:00:20,424 Executing startup routine [7 of 15,
>> runlevel 4]: TrackedEntityTableAlteror (DefaultStartupRoutineExecutor.java
>> [localhost-startStop-1])
>> * INFO 2015-09-02 12:00:21,370 Executing startup routine [8 of 15,
>> runlevel 4]: IdentityPopulator (DefaultStartupRoutineExecutor.java
>> [localhost-startStop-1])
>> * INFO 2015-09-02 12:00:21,488 Executing startup routine [9 of 15,
>> runlevel 5]: TableCreator (DefaultStartupRoutineExecutor.java
>> [localhost-startStop-1])
>> * INFO 2015-09-02 12:00:21,582 Executing startup routine [10 of 15,
>> runlevel 7]: MapViewUpgrader (DefaultStartupRoutineExecutor.java
>> [localhost-startStop-1])
>> * INFO 2015-09-02 12:00:21,690 Executing startup routine [11 of 15,
>> runlevel 7]: FavoriteDataItemUpgrader (DefaultStartupRoutineExecutor.java
>> [localhost-startStop-1])
>> * INFO 2015-09-02 12:00:21,698 Executing startup routine [12 of 15,
>> runlevel 7]: FavoriteDataItemUpgrader (DefaultStartupRoutineExecutor.java
>> [localhost-startStop-1])
>> * INFO 2015-09-02 12:00:21,707 Upgraded custom case entry form
>> identifiers (DataEntryFormUpgrader.java [localhost-startStop-1])
>> * INFO 2015-09-02 12:00:21,708 Executing startup routine [13 of 15,
>> runlevel 8]: ExpressionUpgrader (DefaultStartupRoutineExecutor.java
>> [localhost-startStop-1])
>> * INFO 2015-09-02 12:00:21,725 Executing startup routine [14 of 15,
>> runlevel 9]: ConfigurationPopulator (DefaultStartupRoutineExecutor.java
>> [localhost-startStop-1])
>> * INFO 2015-09-02 12:00:21,729 Executing startup routine [15 of 15,
>> runlevel 9]: I18nLocalePopulator (DefaultStartupRoutineExecutor.java
>> [localhost-startStop-1])
>> * INFO 2015-09-02 12:00:21,743 All startup routines done
>> (DefaultStartupRoutineExecutor.java [localhost-startStop-1])
>> Sep 02, 2015 12:00:31 PM org.apache.coyote.AbstractProtocol start
>> INFO: Starting ProtocolHandler ["http-bio-8080"]
>> Sep 02, 2015 12:00:31 PM org.apache.catalina.startup.Catalina start
>> INFO: Server startup in 82000 ms
>> Sep 02, 2015 12:01:37 PM org.apache.coyote.AbstractProtocol pause
>> INFO: Pausing ProtocolHandler ["http-bio-8080"]
>> Sep 02, 2015 12:01:37 PM org.apache.catalina.core.StandardService
>> stopInternal
>> INFO: Stopping service Catalina
>> * INFO 2015-09-02 12:01:37,676 De-registering jdbc driver:
>> org.postgresql.Driver@7e306ed7 (StartupListener.java
>> [localhost-startStop-2])
>> Sep 02, 2015 12:01:37 PM org.apache.catalina.loader.WebappClassLoader
>> clearReferencesThreads
>> SEVERE: The web application [] appears to have started a thread named [GT
>> authority factory disposer] but has failed to stop it. This is very likely
>> to create a memory leak.
>> Sep 02, 2015 12:01:37 PM org.apache.catalina.loader.WebappClassLoader
>> clearReferencesThreads
>> SEVERE: The web application [] appears to have started a thread named
>> [WeakCollectionCleaner] but has failed to stop it. This is very likely to
>> create a memory leak.
>> Sep 02, 2015 12:01:37 PM org.apache.coyote.AbstractProtocol stop
>> INFO: Stopping ProtocolHandler ["http-bio-8080"]
>> Sep 02, 2015 12:01:37 PM org.apache.coyote.AbstractProtocol destroy
>> INFO: Destroying ProtocolHandler ["http-bio-8080"]
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~dhis2-users
>> Post to : dhis2-users@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~dhis2-users
>> More help : https://help.launchpad.net/ListHelp
>>
>>
>
>
> --
> Knut Staring
> Dept. of Informatics, University of Oslo
> Norway: +4791880522
> Skype: knutstar
> http://dhis2.org
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help : https://help.launchpad.net/ListHelp
>
>
--
Jason P. Pickering
email: jason.p.pickering@xxxxxxxxx
tel:+46764147049
Follow ups
References