← Back to team overview

dhis2-devs team mailing list archive

Re: Multiple DHIS2 instances on Windows

 

On Fri, Aug 19, 2011 at 11:01 AM, Ola Hodne Titlestad <olati@xxxxxxxxxx>wrote:

>
> 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
>
>
Thanks Ola, this is helpful. In fact, there seems to be another server
available, and one of the three instances is relatively temporary (it holds
6M rows from the old HMIS systems, parts of which we will import into the
new dashboard system. So I guess what I have set up now is a relatively
short term solution (though we all know those tend to linger for months and
years...).

I do agree with the need to change to a 64 bit operating system and slap
more memory on the server.

A few further questions:

1) As I mentioned, I am not using Tomcat at all, but running three DHIS Live
instance, in other words Jetty. I assume things are a bit different then?

2) Are you recommending three JREs? I am currently running everything on the
installed JRE, and not using one for each DHIS Live

Knut

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
>>
>>
>


-- 
Cheers,
Knut Staring

References