Git Product home page Git Product logo

heroku-javaagent's Issues

Metrics accuracy

Hi

The test has been performed on the following machine:
Ubuntu 12.04.2 LTS, Precise Pangolin
Linux ubuntu 3.2.0-43-generic-pae #68-Ubuntu SMP Wed May 15 03:55:10 UTC 2013 i686 i686 i386 GNU/Linux

I use Runtime.getRuntime().freeMemory() and Runtime.getRuntime().totalMemory() and i am also using the heroku memory logging event.

I don't understand why the numbers returned by Runtime and the numbers returned by javaagent are different. I would be grateful for any help.

2013-05-23 12:54:15,955 INFO scheduler_Worker-1
-- Runtime Statistics
|
-- available processors:2
-- total memory:61669376
-- free memory:51671048

heroku-javaagent: JVM Memory Usage (Heap): used: 21M committed: 39M max:466M
heroku-javaagent: JVM Memory Usage (Non-Heap): used: 31M committed: 32M max:180M
heroku-javaagent: JVM Threads : total: 26 daemon: 7 non-daemon: 12 internal: 7
2013-05-23 12:55:50,671 INFO scheduler_Worker-1 - executor with 20 threads

Support for JDK 9 and 10

The Heroku Java Agent should support JDK 9 and 10. With the latest release (2.0) the following error may be generated:

*** java.lang.instrument ASSERTION FAILED ***: "!errorOutstanding" with message transform method call failed at JPLISAgent.c line: 884
Exception in thread "Heroku MemoryAgent Timer" java.lang.IllegalAccessError: class com.heroku.agent.MemoryAgent$Reporter$LazyJMX (in unnamed module @0x2bc9f23c) cannot access class sun.management.HotspotInternal (in module java.management) because module java.management does not export sun.management to unnamed module @0x2bc9f23c

Exception on startup

Users have reported that this exception occurs on startup occasionally:

Jun 07 14:25:31 tbs-dev-live app/other.1: Jun 7, 2013 19:25:31 +0000 NewRelic 1 INFO: Loading configuration file "/app/newrelic/./newrelic.yml"
Jun 07 at 2:25 PM
Jun 07 14:25:37 tbs-dev-live app/other.1: javax.management.RuntimeErrorException: Error thrown in preRegister method
Jun 07 14:25:37 tbs-dev-live app/other.1: at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.preRegisterInvoke(DefaultMBeanServerInterceptor.java:1038)
Jun 07 14:25:37 tbs-dev-live app/other.1: at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:961)
Jun 07 14:25:37 tbs-dev-live app/other.1: at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:938)
Jun 07 14:25:37 tbs-dev-live app/other.1: at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:330)
Jun 07 14:25:37 tbs-dev-live app/other.1: at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:517)
Jun 07 14:25:37 tbs-dev-live app/other.1: at com.heroku.agent.Agent$Reporter$LazyJMX.(Agent.java:85)
Jun 07 14:25:37 tbs-dev-live app/other.1: at com.heroku.agent.Agent$Reporter.getMemoryUtilization(Agent.java:161)
Jun 07 14:25:37 tbs-dev-live app/other.1: at com.heroku.agent.Agent$Reporter.run(Agent.java:121)
Jun 07 14:25:37 tbs-dev-live app/other.1: at java.util.TimerThread.mainLoop(Timer.java:534)
Jun 07 14:25:37 tbs-dev-live app/other.1: at java.util.TimerThread.run(Timer.java:484)
Jun 07 14:25:37 tbs-dev-live app/other.1: Caused by: java.lang.InternalError: Counter threads does not exist
Jun 07 14:25:37 tbs-dev-live app/other.1: at sun.management.HotspotCompilation.lookup(HotspotCompilation.java:134)
Jun 07 14:25:37 tbs-dev-live app/other.1: at sun.management.HotspotCompilation.initCompilerCounters(HotspotCompilation.java:146)
Jun 07 14:25:37 tbs-dev-live app/other.1: at sun.management.HotspotCompilation.(HotspotCompilation.java:54)
Jun 07 14:25:37 tbs-dev-live app/other.1: at sun.management.ManagementFactory.getHotspotCompilationMBean(ManagementFactory.java:217)
Jun 07 14:25:37 tbs-dev-live app/other.1: at sun.management.ManagementFactory.registerInternalMBeans(ManagementFactory.java:401)
Jun 07 14:25:37 tbs-dev-live app/other.1: at sun.management.HotspotInternal.preRegister(HotspotInternal.java:55)
Jun 07 14:25:37 tbs-dev-live app/other.1: at com.sun.jmx.mbeanserver.MBeanSupport.preRegister(MBeanSupport.java:167)
Jun 07 14:25:37 tbs-dev-live app/other.1: at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.preRegisterInvoke(DefaultMBeanServerInterceptor.java:1033)
Jun 07 14:25:37 tbs-dev-live app/other.1: ... 9 more
Jun 07 14:25:37 tbs-dev-live app/other.1: Exception in thread "Heroku Agent Timer" java.lang.ExceptionInInitializerError
Jun 07 14:25:37 tbs-dev-live app/other.1: at com.heroku.agent.Agent$Reporter.getMemoryUtilization(Agent.java:161)
Jun 07 14:25:37 tbs-dev-live app/other.1: at com.heroku.agent.Agent$Reporter.run(Agent.java:121)
Jun 07 14:25:37 tbs-dev-live app/other.1: at java.util.TimerThread.mainLoop(Timer.java:534)
Jun 07 14:25:37 tbs-dev-live app/other.1: at java.util.TimerThread.run(Timer.java:484)
Jun 07 14:25:37 tbs-dev-live app/other.1: Caused by: java.lang.RuntimeException: Cant register HostpotInternal MBeans
Jun 07 14:25:37 tbs-dev-live app/other.1: at com.heroku.agent.Agent$Reporter$LazyJMX.(Agent.java:88)
Jun 07 14:25:37 tbs-dev-live app/other.1: ... 4 more

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.