CPU usage increases over time

Hello

  • Platform information:
    • Hardware: Virtual machine with 6 gb ram, amd64
    • OS: docker-compose within Ubuntu 23.10 lxc on proxmox 8.1.4
    • Java Runtime Environment: 17.0.10
    • openHAB version: 4.1.1
  • Issue of the topic:
    See picture below.
    Since I use mqtt binding, cpu usage increases over time until I stop openhab.
    I also see via the top command, that the java process in the openhab docker is the issue.
    I found other topic in this community about this problem. They analyed a java thread dump, but I have no idea how to do that. Also they talked about a widget, but I don’t have any widgets.

Now I installed openjdk-11-jdk-headless now to my host and did jstack on the pid seen on the java process on my host. I’m not allowed to upload the output file as a new user in this community, so i link it here:

I don’t know what to do with that file.

My docker compose:

version: '2.2'

services:
  openhab:
    image: "openhab/openhab:4.1.1"
    restart: unless-stopped
    ports:
      - "8080:8080"
      - "8443:8443"
    volumes:
      - "/etc/localtime:/etc/localtime:ro"
      - "/etc/timezone:/etc/timezone:ro"
      - "openhab_addons:/openhab/addons"
      - "openhab_conf:/openhab/conf"
      - "openhab_userdata:/openhab/userdata"
    environment:
      CRYPTO_POLICY: "unlimited"
      EXTRA_JAVA_OPTS: "-Duser.timezone=Europe/Berlin"
      OPENHAB_HTTP_PORT: "8080"
      OPENHAB_HTTPS_PORT: "8443"
    labels:
      - com.centurylinklabs.watchtower.enable=true
    security_opt:
      - no-new-privileges:true
    networks:
      - influxdb_net_influx

volumes:
  openhab_addons:
    driver: local
  openhab_conf:
    driver: local
  openhab_userdata:
    driver: local
networks:
  influxdb_net_influx:
    external: true

In the logs I don’t see anything suspious, only the changing values.

2024-04-03 16:45:16.729 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Plug_Heizung_mqtt_Stromverbrauch' changed from 651 W to 646 W

2024-04-03 16:47:01.089 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Plug_Gefrier_mqtt_Stromverbrauch' changed from 47 to 0

2024-04-03 16:49:58.013 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Plug_Heizung_mqtt_Power' received command OFF

2024-04-03 16:49:58.015 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Plug_Heizung_mqtt_Power' predicted to become OFF

2024-04-03 16:49:58.016 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Plug_Heizung_mqtt_Power' changed from ON to OFF

2024-04-03 16:50:16.695 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Plug_Heizung_mqtt_Stromverbrauch' changed from 646 W to 0 W

2024-04-03 16:52:01.057 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Plug_Gefrier_mqtt_Stromverbrauch' changed from 0 to 47

2024-04-03 16:57:01.077 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Plug_Gefrier_mqtt_Stromverbrauch' changed from 47 to 0

2024-04-03 17:00:10.007 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Plug_Heizung_mqtt_Power' received command ON

2024-04-03 17:00:10.008 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Plug_Heizung_mqtt_Power' predicted to become ON

2024-04-03 17:00:10.010 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Plug_Heizung_mqtt_Power' changed from OFF to ON

2024-04-03 17:00:16.713 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Plug_Heizung_mqtt_Stromverbrauch' changed from 0 W to 651 W

2024-04-03 17:02:01.078 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Plug_Gefrier_mqtt_Stromverbrauch' changed from 0 to 46

2024-04-03 17:05:16.742 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Plug_Heizung_mqtt_Stromverbrauch' changed from 651 W to 645 W

2024-04-03 17:07:01.047 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Plug_Gefrier_mqtt_Stromverbrauch' changed from 46 to 0

2024-04-03 17:09:58.012 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Plug_Heizung_mqtt_Power' received command OFF

2024-04-03 17:09:58.014 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Plug_Heizung_mqtt_Power' predicted to become OFF

2024-04-03 17:09:58.016 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Plug_Heizung_mqtt_Power' changed from ON to OFF

2024-04-03 17:10:16.684 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Plug_Heizung_mqtt_Stromverbrauch' changed from 645 W to 0 W

2024-04-03 17:12:01.101 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Plug_Gefrier_mqtt_Stromverbrauch' changed from 0 to 46

2024-04-03 17:17:01.077 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Plug_Gefrier_mqtt_Stromverbrauch' changed from 46 to 0

2024-04-03 17:20:10.008 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Plug_Heizung_mqtt_Power' received command ON

2024-04-03 17:20:10.010 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Plug_Heizung_mqtt_Power' predicted to become ON

2024-04-03 17:20:10.012 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Plug_Heizung_mqtt_Power' changed from OFF to ON

2024-04-03 17:20:16.679 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Plug_Heizung_mqtt_Stromverbrauch' changed from 0 W to 653 W

2024-04-03 17:22:01.104 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Plug_Gefrier_mqtt_Stromverbrauch' changed from 0 to 47

2024-04-03 17:25:16.773 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Plug_Heizung_mqtt_Stromverbrauch' changed from 653 W to 645 W

2024-04-03 17:27:01.043 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Plug_Gefrier_mqtt_Stromverbrauch' changed from 47 to 0

2024-04-03 17:29:58.014 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Plug_Heizung_mqtt_Power' received command OFF

2024-04-03 17:29:58.025 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Plug_Heizung_mqtt_Power' predicted to become OFF

2024-04-03 17:29:58.026 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Plug_Heizung_mqtt_Power' changed from ON to OFF

2024-04-03 17:30:16.694 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Plug_Heizung_mqtt_Stromverbrauch' changed from 645 W to 0 W

2024-04-03 17:32:01.040 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Plug_Gefrier_mqtt_Stromverbrauch' changed from 0 to 46

2024-04-03 17:37:01.077 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Plug_Gefrier_mqtt_Stromverbrauch' changed from 46 to 0

2024-04-03 17:40:10.007 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Plug_Heizung_mqtt_Power' received command ON

2024-04-03 17:40:10.008 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Plug_Heizung_mqtt_Power' predicted to become ON

2024-04-03 17:40:10.010 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Plug_Heizung_mqtt_Power' changed from OFF to ON

2024-04-03 17:40:16.719 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Plug_Heizung_mqtt_Stromverbrauch' changed from 0 W to 648 W

2024-04-03 17:42:01.096 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Plug_Gefrier_mqtt_Stromverbrauch' changed from 0 to 46

2024-04-03 17:45:16.773 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Plug_Heizung_mqtt_Stromverbrauch' changed from 648 W to 639 W

2024-04-03 17:47:01.082 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Plug_Gefrier_mqtt_Stromverbrauch' changed from 46 to 0

I use influxdb persistance and I use JSONPath Transformation 4.1.1

I any more information can be helpful please tell my how I can provide it.