Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Out of Memory Error due to Monitoring on Some application which requires low memory #162

Open
owolabileg opened this issue Oct 29, 2014 · 0 comments

Comments

@owolabileg
Copy link
Contributor

I found some application which explicitly limits the memory to 25M while running tests. With JavaMOP, we apparently exceed this limit and get an out-of-memory exception:

Here is the error I get on the command line:

Exception in thread "Thread-4" java.lang.OutOfMemoryError: GC overhead limit exceeded
        at java.lang.ThreadLocal$ThreadLocalMap.set(ThreadLocal.java:443)Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Thread-4"

When I increase the memory limit to 2048M, the exception does not happen.

I don't think this is a bug per se, just something interesting about the limitations of JavaMOP, that JavaMOP will not work below certain memory threshold and we may want to document this somewhere.

Steps to reproduce:

  1. Build testAgent.jar with all our properties: javamop -agent -n testAgent -usedb
  2. git clone https://github.com/apache/commons-io.git
  3. git checkout 7007a1789dba19160ab94536ab3bb8a2e6e637bd
  4. cp testAgent.jar from step 1 to commons-io directory
  5. Run mvn test after making the <argLine> element of the surefire plugin element inside the <build><plugins> element of commons-io/pom.xml to look like this:
 <argLine>-Xmx25M -javaagent:testAgent.jar</argLine>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant