← Back to team overview

dhis2-devs team mailing list archive

Re: Multiple DHIS2 instances on Windows

 

On 18 August 2011 11:18, Knut Staring <knutst@xxxxxxxxx> wrote:

> Hello all,
>
> It has been a while since I last ran multiple DHIS2 instances (each with
> its own database) on the same Windows server. Not sure if we have reached a
> consensus as to best practice on this (I actually think the best practice
> would be to run a Ubuntu server, but in many cases people find a change of
> OS an additional burden when there is so much knowledge to absorb about
> DHIS2 itself)
>
> I see the following options:
>
> 1) Multiple war files in the same Tomcat or multiple Tomcats on different
> ports. If so, just download the Tomcat zip file, not installer, and
> configure for different ports.
> 2) Each dhis.war needs a separate hibernate.properties. Is this best done
> inside the (exploded) war file, or is it best to create multiple environment
> variables?
>
> How to set the JAVA_OPTS? The server has only 3GB RAM...
>
>
3 GB RAM sounds very little for serving three tomcat instances + a postgres
server.
I would recommend at least 8 GB here, as I assume this is a startup process
with not that many users. As you get more online users and also more data to
process, you will have to increase this.

Especially it seems jasper reports (standard reports) get out of memory
errors (PermGen space) with less (not sure exactly how much less) than
around 1 GB:  -XX:MaxPermSize=1024m"

You could e.g. use something like this for each of the three tomcats/java
processes:

JAVA_OPTS="-Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=1024m"

For an active DHIS 2 instance with many users I would allocate more, e.g.
the Kenya online system uses:
-Xmx6000m -XX:MaxPermSize=1000m

This chapter in the implementation guide discusses server setup including
memory settings for postgres and tomcat:
http://dhis2.org/doc/snapshot/en/implementer/html/ch08.html#d5e415


Ola
----



> If this has already been documented, I would be grateful for just a
> pointer.
>
> Thanks,
> Knut
>
>
>
>
> _______________________________________________
> 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
>
>

Follow ups

References