Ad Widget

Collapse

zabbix_Java Restart Needed often

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rreilly
    Member
    • May 2007
    • 61

    #1

    zabbix_Java Restart Needed often

    I believe the problem is the java code is not reclaiming threads, I am monitoring it with jconsole and the threads just keep getting created with no reclamation.

    thoughts ?
    Thanks
    Rob
    Attached Files
    Last edited by rreilly; 03-02-2014, 22:30.
  • jan.garaj
    Senior Member
    Zabbix Certified Specialist
    • Jan 2010
    • 506

    #2
    Can you provide list of threads with details for every thread (stack trace, ...)?
    Devops Monitoring Expert advice: Dockerize/automate/monitor all the things.
    My DevOps stack: Docker / Kubernetes / Mesos / ECS / Terraform / Elasticsearch / Zabbix / Grafana / Puppet / Ansible / Vagrant

    Comment

    • rreilly
      Member
      • May 2007
      • 61

      #3
      Attached is the thread dump, Thanks
      http://pastebin.com/h7KnDCqW
      Rob

      Comment

      • jan.garaj
        Senior Member
        Zabbix Certified Specialist
        • Jan 2010
        • 506

        #4
        Stats from your thread dump:
        Code:
             48 Remoting
              2 RMI TCP Accept-0
            ...
        All "Remoting" threads got stuck at sun.nio.ch.EPollArrayWrapper.epollWait(Native Method), so Zabbix had to create new threads, which probably also got stuck in epollWait function. Check this hypothesis during some time period.

        It looks like issue with JDK. Similar issue with another Java SW https://github.com/netty/netty/issues/327
        Try another version of JDK or UTFG for this Java issue.
        Devops Monitoring Expert advice: Dockerize/automate/monitor all the things.
        My DevOps stack: Docker / Kubernetes / Mesos / ECS / Terraform / Elasticsearch / Zabbix / Grafana / Puppet / Ansible / Vagrant

        Comment

        • rreilly
          Member
          • May 2007
          • 61

          #5
          Thanks, I knew it was spawning threads endlessly just did not know why, I upgraded my java i will monitor and report back.
          Thanks
          Rob

          Comment

          • rreilly
            Member
            • May 2007
            • 61

            #6
            so i tried sun 1.7.0.25 sun 1.7.0.51 openjdk 1.6.0 same problem ...

            Comment

            • rreilly
              Member
              • May 2007
              • 61

              #7
              or is it a bug with the jboss NIO library ?

              Comment

              • jan.garaj
                Senior Member
                Zabbix Certified Specialist
                • Jan 2010
                • 506

                #8
                Sorry, I don't have so huge knowledge about Java thread problems - Google knows :-)

                Interesting discussion http://code.google.com/p/spymemcache.../detail?id=279
                Code:
                Ok, I could solve the problem.
                The cpu load is caused by the vm itself. 
                After further profiling I found out that epollwait caused the high cpu load due to a "bad" to garbage collection setting for the vm.
                 -XX:CMSInitiatingOccupancyFraction was set to 50 which lead to many gc calls which in fact caused a high cpu load on epoolwait. 
                (Why this happens I don't know - this could have many causes).
                Setting the value to 80 made the high cpu load disappear. 
                I was mislead due to the fact that when I disabled memcacheclient cpu load dropped too.
                Devops Monitoring Expert advice: Dockerize/automate/monitor all the things.
                My DevOps stack: Docker / Kubernetes / Mesos / ECS / Terraform / Elasticsearch / Zabbix / Grafana / Puppet / Ansible / Vagrant

                Comment

                • rreilly
                  Member
                  • May 2007
                  • 61

                  #9
                  I found the problem, it's not with the zabbix_java and I never experienced high cpu, just filling the thread queue. The problem is with the version of netty that is shipped with jboss 7.1. There is a workaround on the jboss jdk add
                  -Dorg.jboss.netty.epollBugWorkaround=true to JAVA_OPTS we are testing it now and it looks like it will fix the problem. I will report back after 24 hours of baking.
                  Rob

                  Comment

                  Working...