← Back to team overview

dhis2-devs team mailing list archive

Re: [Dhis-dev] Out of memorry

 

I have found 2 ways in which the Java Out-of-Memory Exception can be solved:

1.) On linux machines, we can start tomcat as a unix daemon as pointed out
in this tutorial <http://tomcat.apache.org/tomcat-6.0-doc/setup.html>.
Tomcat gets more priority, memory and can run more efficiently. Infact, it
also helps performance by benchmarking and as pointed here:
http://oreilly.com/catalog/9780596101060/chapter/ch04.pdf

2.) On Windows machines, the JRE runs with the Client JVM which is optimized
for quick start, but not for better memory/thread management as the server
HotSpot VM. We should by default start tomcat with server VM. In my JavaEE
experience, this does reduce a lot of OOM exceptions. If you just have the
JRE installed then the server vm is not installed. You need the JDK and have
to pass the -server parameter when starting tomcat. If you have the JRE
only, then you can copy the server folder from a JDK installation, just like
I am doing in the new installer for Windows.


---
Regards,
Saptarshi PURKAYASTHA
Director R & D, HISP India
Health Information Systems Programme

My Tech Blog:  http://sunnytalkstech.blogspot.com
You Live by CHOICE, Not by CHANCE


2009/3/20 Orvalho Joaquim Augusto <orvaquim@xxxxxxxxx>

> We need more info.
>
> Logs form postgres and tomcat.
> Configuration files for tomcat.
> Physical resources of you machine (RAM and CPU)
> Operating System and FileSystem
>
> From my experience this is issued much probably by JVM/Tomcat.
>
> I am not sure... but it seems that someone have discussed this here before.
>
> Caveman
>
>
> Thuy Nguyen wrote:
>
>> Dear all,
>>
>> We HISP Vietnam team meet a problem and need solution to solve. Currently
>> DHIS2 of HISP Vietnam using report module to generate reports which created
>> by BIRT report designer. On the March 19th, 2009 there was a training class
>> for users to practice entering data and generating reports. The class
>> includes 40 users work at same time in the program.
>> Entering data values was fine. But when there are many users generate
>> reports at the same time. The system suddenly become very slow and every
>> user get the OutOfMemorry java exception when click in any button of the
>> program. That time Tri has to restart the tomcat of server, the sistuation
>> become better for 2 minutes, and the problem appear again when few users
>> generate reports. This even affect to another users who doesn't generate
>> report but entering data in the class that time.
>> Tri has checked in database, there were many many transactions opened but
>> weren't closed.
>> After meeting to find the reason, we don't know about other reason except
>> reports were designed by BIRT. May be we were wrong. We are looking forward
>> your suggestions and consult to find out the right reason and solutions to
>> solve. May be change another tool instead of BIRT, or correct the program or
>> someway else. Dr. Trung requested us have to find the right solution before
>> April.
>> Please help us...
>>
>>
>>
>> --
>> --
>> Thuy
>> HISP Vietnam
>> +84902079126
>> xuan_thuy_vn@xxxxxxxxx <mailto:xuan_thuy_vn@xxxxxxxxx>
>> thuy.hispvietnam@xxxxxxxxx <mailto:thuy.hispvietnam@xxxxxxxxx>
>>
>
>
>
> _______________________________________________
> 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