Opened 12 years ago
Closed 12 years ago
#1032 closed defect (fixed)
GeoNetwork freezes under Virtual Box when memory is 1GB or less
Reported by: | kalxas | Owned by: | kalxas |
---|---|---|---|
Priority: | major | Milestone: | OSGeoLive7.0 |
Component: | OSGeoLive | Keywords: | 7.0 |
Cc: | live-demo@… |
Description
I have tested GN in a VM with 1G RAM and while the home page is starting up, internal geoserver never makes it, so the map remains empty and the system hangs. When I add more RAM (1,5GB) the problem is solved.
Change History (16)
comment:1 by , 12 years ago
Priority: | major → normal |
---|
comment:2 by , 12 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
Summary: | GeoNetwork freezes when memory is 1GB or less → GeoNetwork freezes under Virtual Box when memory is 1GB or less |
comment:3 by , 12 years ago
A quick test of an installed VM shows.. after boot, the two largest RESIDENT memory users are tomcat6 and mysqld. As noted, sudo service tomcat6 stop
frees a significant amount of RAM.
Does tomcat6 really need to be running all the time? What is a good way to politely turn tomcat6 off, with a Live session and/or an installed VM ?
comment:4 by , 12 years ago
booting an image (r9520) without installing, shows the top three resident RAM users
34M - X.org 34M - mysqld 117M - tomcat6 (!!)
comment:5 by , 12 years ago
A possible solution would be to move 52North, petascope and deegree to their own Jetty instances and disable Tomcat. Another solution is to detect if tomcat is running when launching a project that is using it and start the service then. This would let us disable the service by default.
#!/bin/bash STAT=`netstat -na | grep 8080 | awk '{print $7}'` if [ "$STAT" = "LISTEN" ]; then echo "Tomcat is up" elif [ "$STAT" = "" ]; then echo "8080 is not used so Tomcat is down" sh /usr/share/tomcat6/startup.sh fi
comment:6 by , 12 years ago
Keywords: | alpha 4 removed |
---|
comment:7 by , 12 years ago
Keywords: | 7.0 added; 6.5 removed |
---|---|
Milestone: | OSGeoLive6.5 → OSGeoLive7.0 |
Temporary fixed [9593]
follow-up: 9 comment:8 by , 12 years ago
Cc: | added |
---|
please move the ML email addr from the owner field if you take ownership of a ticket so it doesn't get lost
follow-up: 11 comment:9 by , 12 years ago
Replying to hamish:
please move the ML email addr from the owner field if you take ownership of a ticket so it doesn't get lost
Hamish, only an admin can do this.
comment:10 by , 12 years ago
I just disabled tomcat autostart [10133] We now need to update tomcat based projects
follow-up: 12 comment:11 by , 12 years ago
Replying to kalxas:
Replying to hamish:
please move the ML email addr from the owner field if you take ownership of a ticket so it doesn't get lost
Hamish, only an admin can do this.
at the time I first wrote the above it was true, but since then I changed the trac permission settings and AFAIK for the last few months logged in users can now modify the cc field too.
regards, Hamish
comment:12 by , 12 years ago
Replying to hamish:
Replying to kalxas:
Replying to hamish:
please move the ML email addr from the owner field if you take ownership of a ticket so it doesn't get lost
Hamish, only an admin can do this.
at the time I first wrote the above it was true, but since then I changed the trac permission settings and AFAIK for the last few months logged in users can now modify the cc field too.
regards, Hamish
Cool, thanks Hamish.
comment:13 by , 12 years ago
Priority: | normal → major |
---|
Disabling tomcat in VM works, but not for live session.
comment:14 by , 12 years ago
After recent IRC chat, we committed the proposed fix in http://www.kromhouts.net/blog/server-admin/prevent-tomcat-starting-at-boot/
comment:15 by , 12 years ago
We need to come up with a plan for Java applications deployment:
- Default tomcat should be disabled on boot. This will save valuable RAM on boot and make the disk boot faster. Applications deployed on tomcat should take actions to enable tomcat on their startup scripts.
- GeoServer is a key Java application in the disk. Many other projects (Geonetwork, zoo, 52N, Cartaro, GeoNode etc) depend on it being activated. My proposal is to move GeoServer to the default tomcat so it gets enabled easily. This way we remove one Jetty deployement and save on disk space too.
Thoughts?
comment:16 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Default tomcat has been removed from autostart in [10180] With this fix the bug is now fixed and tested on build 10181.
After more testing and some feedback from the GeoNetwork team, these are the new findings:
So my conclusion is that default tomcat + GN jetty on 1GB RAM bring down the system due to lack of swap space. On the other hand, other Jetty instances require less memory and work fine along with default tomcat.
Thoughts? Perhaps we should document this somewhere in the docs? I would suggest NOT to change minimum RAM requirements, it would reflect bad on OSGeoLive requesting more than 1GB RAM in my opinion, especially when our base OS requires 256MB.