WebFaction
Community site: login faq

Hi there, I have succesfully installed Tomcat and then Geoserver in my webserver, but when i try to configure Geoserver i am receving messages from webfaction with the issue of "memory usage over limit" and then the application is killed. My webserver has 1024MB and the messages are related to usage over 1130, 1150MB.

I have tried to limit the memory usage by geoserver with the tips from here with -Xms128m and Xmx128m and -XX:MaxPermSize=512m instances but with no success. Then i have read lots of webfaction q&a but none of then have my answer.

Thanks in advance. Gabriel

asked 10 Oct '16, 13:36

gabrielnn
112
accept rate: 0%


The various JAVA_OPTS that you mentioned are the recommended way to limit the memory usage of your Tomcat instance. Be sure to fully stop and restart your Tomcat app after you set them.

permanent link

answered 10 Oct '16, 18:38

seanf
12.2k41836
accept rate: 37%

So, when i check the numbers for the memory usage it gives me:

$ java -XX:+PrintFlagsFinal -version | grep -iE 'HeapSize|PermSize|ThreadStackSize' intx CompilerThreadStackSize = 0 {pd product} uintx ErgoHeapSizeLimit = 0 {product} uintx HeapSizePerGCThread = 87241520 {product} uintx InitialHeapSize := 524288000 {product} uintx LargePageHeapSizeThreshold = 134217728 {product} uintx MaxHeapSize := 8382316544 {product} intx ThreadStackSize = 1024 {pd product} intx VMThreadStackSize = 1024 {pd product} openjdk version "1.8.0_102" OpenJDK Runtime Environment (build 1.8.0_102-b14) OpenJDK 64-Bit Server VM (build 25.102-b14, mixed mode)

I can be talking nonsenses here, but my only guess of what could be going on is with the MaxHeapSize that goes way under, 8gb is that correct? But i have already used the -Xmx command with 128m and apparently nothing happened. Still, I am testing possibilities and have to restart the tomcat module since it breaks down every couple of minutes after i initiate it. If someone could give me a hit, i would appreciate it. Thanks in advance, Gabriel

(11 Oct '16, 00:52) gabrielnn

I'm not 100% certain, but I believe the output of java -XX:+PrintFlagsFinal -version will show what is built in to Java, and does not reflect the environment set by JAVA_OPTS.

If you want to set the memory options for your app and then verify that they are in use, then go into your app directory and execute the following commands:

 export JAVA_OPTS="-Djava.awt.headless=true -server -Xms128m -Xmx128M -XX:MaxPermSize=512m 
./bin/startup.sh
jinfo -flags $( cat temp/catalina.pid )
(11 Oct '16, 17:02) seanf
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×87
×22
×16
×4

question asked: 10 Oct '16, 13:36

question was seen: 2,221 times

last updated: 11 Oct '16, 17:02

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM