Influxdb keeps spiking up CPU

I cannot make out a pattern, it’s like every 20min influxdb blocks my raspberry pis CPU so hard, that pihole is failing and HA unavailable for a minute or so.

It all started after updating HA+influxdb. I can’t tell you which version i was running before.
I have updated HA and influx in the meantime, but it didn’t help (problem occured for over a month now)

My setup now:
HA: 0.94.4
influxdb: 3.1.0
Tell me what else you need to troubleshoot

Thanks

config:

homeassistant:
  # Name of the location where Home Assistant is running
  name: Home
  # Location required to calculate the time the sun rises and sets
  latitude: 0
  longitude: 0
  # Impacts weather/sunrise data (altitude above sea level in meters)
  elevation: 0
  # metric for Metric, imperial for Imperial
  unit_system: metric
  # Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
  time_zone:  
  # Customization file
  customize: !include customize.yaml

# Enables the frontend
frontend:

# Enables configuration UI
config:

# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
# http:
#   base_url: example.duckdns.org:8123

# Checks for available updates
# Note: This component will send some information about your system to
# the developers to assist with development of Home Assistant.
# For more information, please see:
# https://home-assistant.io/blog/2016/10/25/explaining-the-updater/
updater:
  # Optional, allows Home Assistant developers to focus on popular components.
  # include_used_components: true

# Discover some devices automatically
discovery:

# Allows you to issue voice commands from the frontend in enabled browsers
conversation:

# Enables support for tracking state changes over time
history:

http:
    #base_url:  
    #ssl_certificate: /ssl/certfile.pem
    #ssl_key: /ssl/privkey.pem

# View all events in a logbook
logbook:

# Enables a map showing the location of tracked devices
map:








influxdb:
  host: 10.10.10. 
  port: 8086
  database: home_assistant
  username: 
  password:  
  max_retries: 10
  default_measurement: state
  include:
     entities:
        - sensor.kuchenbox_batt
        - sensor.kuchenbox_humidity
        - sensor.kuchenbox_pressure
        - sensor.kuchenbox_temperature
        - sensor.kuchenbox_uptime
        - sensor.kuchenbox_uvir
        - sensor.kuchenbox_uvvis
        - sensor.kuchenbox_uvindex
        - sensor.kuchenbox_tsllux
        - sensor.io_temperature
        - sensor.io_wifirssi
        - sensor.io_battery
        - sensor.io_uptime
        - sensor.neon_temperature
        - sensor.neon_humidity
        - sensor.neon_pressure
        - sensor.neon_wifirssi
        - sensor.neon_battery
        - sensor.neon_uptime
        
# Track the sun
sun:

# Sensors
sensor:
  - platform: mqtt
    name: "Kuchenbox_Temperature"
    state_topic: "home/kuchenbox"
    unit_of_measurement: '°C'
    value_template: "{{ value_json.temperature }}"
    force_update: true

  - platform: mqtt
    name: "Kuchenbox_Humidity"
    state_topic: "home/kuchenbox"
    unit_of_measurement: '%'
    value_template: "{{ value_json.humidity }}"
    force_update: true
    
  - platform: mqtt
    name: "Kuchenbox_Uptime"
    state_topic: "home/kuchenbox"
    unit_of_measurement: 'ms'
    value_template: "{{ value_json.uptime }}"
    force_update: true
    
  - platform: mqtt
    name: "Kuchenbox_Pressure"
    state_topic: "home/kuchenbox"
    unit_of_measurement: 'hPa'
    value_template: "{{ value_json.pressure }}"
    force_update: true
    
  - platform: mqtt
    name: "Kuchenbox_Batt"
    state_topic: "home/kuchenbox"
    unit_of_measurement: 'Volt'
    value_template: "{{ value_json.volt }}"
    force_update: true
    
  - platform: mqtt
    name: "Kuchenbox_UVIR"
    state_topic: "home/kuchenbox"
    unit_of_measurement: 'UV-IR'
    value_template: "{{ value_json.uvIR }}"
    force_update: true
    
  - platform: mqtt
    name: "Kuchenbox_UVVis"
    state_topic: "home/kuchenbox"
    unit_of_measurement: 'UV-Vis'
    value_template: "{{ value_json.uvVis }}"
    force_update: true
    
  - platform: mqtt
    name: "Kuchenbox_UVIndex"
    state_topic: "home/kuchenbox"
    unit_of_measurement: 'UV-Index'
    value_template: "{{ value_json.uvIndex }}"
    force_update: true
    
  - platform: mqtt
    name: "Kuchenbox_TSLLux"
    state_topic: "home/kuchenbox"
    unit_of_measurement: 'TSL-Lux'
    value_template: "{{ value_json.tslLux }}"
    force_update: true
    
  - platform: mqtt
    name: "Io_Temperature"
    state_topic: "home/Io"
    unit_of_measurement: "°C"
    value_template: "{{ value_json.temperature }}"
    force_update: true
    
  - platform: mqtt
    name: "Io_uptime"
    state_topic: "home/Io"
    value_template: "{{ value_json.uptime }}"
    unit_of_measurement: "ms"
    force_update: true
    
  - platform: mqtt
    name: "Io_wifirssi"
    state_topic: "home/Io"
    unit_of_measurement: "dB"
    value_template: "{{ value_json.wifirssi }}"
    force_update: true
    
  - platform: mqtt
    name: "Io_battery"
    state_topic: "home/Io"
    unit_of_measurement: "Volt"
    value_template: "{{ value_json.volt }}"
    force_update: true
    
  - platform: mqtt
    name: "Neon_Temperature"
    state_topic: "home/Neon"
    unit_of_measurement: "°C"
    value_template: "{{ value_json.temperature }}"
    force_update: true
  
  - platform: mqtt
    name: "Neon_Humidity"
    state_topic: "home/Neon"
    unit_of_measurement: "%"
    value_template: "{{ value_json.humidity }}"
    force_update: true
  
  - platform: mqtt
    name: "Neon_Pressure"
    state_topic: "home/Neon"
    unit_of_measurement: "hPa"
    value_template: "{{ value_json.pressure }}"
    force_update: true
    
  - platform: mqtt
    name: "Neon_uptime"
    state_topic: "home/Neon"
    value_template: "{{ value_json.uptime }}"
    unit_of_measurement: "ms"
    force_update: true
    
  - platform: mqtt
    name: "Neon_wifirssi"
    state_topic: "home/Neon"
    unit_of_measurement: "dB"
    value_template: "{{ value_json.wifirssi }}"
    force_update: true
    
  - platform: mqtt
    name: "Neon_battery"
    state_topic: "home/Neon"
    unit_of_measurement: "Volt"
    value_template: "{{ value_json.volt }}"
    force_update: true

# Text to speech
tts:
  - platform: google_translate
    service_name: google_say

# Cloud
cloud:

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml

system_health:

It could be upgrading the database. You should check the influxdb logs. Also, what hardware are you using it on?

I am using a raspberry pi on raspian.
Unfortunately i am unable to find the influxdb logs. I am using hassIO and installed influx as an addon.

This are the most recent logs from the hassIO interface.

2019/07/09 18:26:59 Using configuration at: /etc/kapacitor/kapacitor.conf
time="2019-07-09T18:27:07+02:00" level=info msg="Serving chronograf at http://127.0.0.1:8889" component=server 
time="2019-07-09T18:27:07+02:00" level=info msg="Reporting usage stats" component=usage freq=24h reporting_addr="https://usage.influxdata.com" stats="os,arch,version,cluster_id,uptime" 
[18:27:07] INFO: Starting NGinx...
[09/Jul/2019:23:50:24 +0200] 401 -(192.168.1.55) GET / HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36)
[10/Jul/2019:13:06:02 +0200] 401 -(192.168.1.55) GET / HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36)
time="2019-07-10T13:06:08+02:00" level=info msg="Serving assets" component=server method=GET remote_addr="127.0.0.1:35390" url=/ 
time="2019-07-10T13:06:08+02:00" level=info msg="Response: OK" component=server method=GET remote_addr="127.0.0.1:35390" response_time=123.202408ms status=200 
[10/Jul/2019:13:06:08 +0200] 200 -(192.168.1.55) GET / HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36)
time="2019-07-10T13:06:08+02:00" level=info msg="Serving assets" component=server method=GET remote_addr="127.0.0.1:35394" url=/src.6549ea42.js 
time="2019-07-10T13:06:08+02:00" level=info msg="Serving assets" component=server method=GET remote_addr="127.0.0.1:35392" url=/src.07fe3051.css 
time="2019-07-10T13:06:09+02:00" level=info msg="Response: OK" component=server method=GET remote_addr="127.0.0.1:35392" response_time=1.321725335s status=200 
[10/Jul/2019:13:06:09 +0200] 200 -(192.168.1.55) GET /src.07fe3051.css HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36)
time="2019-07-10T13:06:21+02:00" level=info msg="Response: OK" component=server method=GET remote_addr="127.0.0.1:35394" response_time=12.500116029s status=200 
[10/Jul/2019:13:06:21 +0200] 200 -(192.168.1.55) GET /src.6549ea42.js HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36)
time="2019-07-10T13:06:21+02:00" level=info msg="Serving assets" component=server method=GET remote_addr="127.0.0.1:35396" url=//worker.45824d11.js 
time="2019-07-10T13:06:21+02:00" level=info msg="Response: OK" component=server method=GET remote_addr="127.0.0.1:35398" response_time=43.517063ms status=200 
[10/Jul/2019:13:06:21 +0200] 200 -(192.168.1.55) GET /chronograf/v1 HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36)
time="2019-07-10T13:06:21+02:00" level=info msg="Response: OK" component=server method=GET remote_addr="127.0.0.1:35400" response_time="587.498µs" status=200 
[10/Jul/2019:13:06:21 +0200] 200 -(192.168.1.55) GET /chronograf/v1/me HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36)
time="2019-07-10T13:06:21+02:00" level=info msg="Response: OK" component=server method=GET remote_addr="127.0.0.1:35402" response_time=64.351743ms status=200 
[10/Jul/2019:13:06:21 +0200] 200 -(192.168.1.55) GET /chronograf/v1/sources HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36)
time="2019-07-10T13:06:22+02:00" level=info msg="Response: OK" component=server method=GET remote_addr="127.0.0.1:35408" response_time=5.210402ms status=200 
[10/Jul/2019:13:06:22 +0200] 200 -(192.168.1.55) GET /chronograf/v1/sources HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36)
time="2019-07-10T13:06:22+02:00" level=info msg="Response: No Content" component=server method=GET remote_addr="127.0.0.1:35412" response_time=1.865828ms status=204 
[10/Jul/2019:13:06:22 +0200] 204 -(192.168.1.55) GET /chronograf/v1/sources/0/health HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36)
time="2019-07-10T13:06:22+02:00" level=info msg="Response: OK" component=server method=GET remote_addr="127.0.0.1:35414" response_time=5.751025ms status=200 
[10/Jul/2019:13:06:22 +0200] 200 -(192.168.1.55) GET /chronograf/v1/sources/0/kapacitors HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36)
time="2019-07-10T13:06:22+02:00" level=info msg="Response: OK" component=server method=GET remote_addr="127.0.0.1:35396" response_time=1.437493599s status=200 
[10/Jul/2019:13:06:22 +0200] 200 -(192.168.1.55) GET /api/hassio_ingress/2_SDjiDF3nacQwgX8VP0OnnQSPCkYqIaSkCKZprtMpo//worker.45824d11.js HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36)
time="2019-07-10T13:06:22+02:00" level=info msg="Serving assets" component=server method=GET remote_addr="127.0.0.1:35416" url=/icomoon.05bfd89e.woff2 
time="2019-07-10T13:06:22+02:00" level=info msg="Serving assets" component=server method=GET remote_addr="127.0.0.1:35420" url=/Roboto-Regular.f82a1950.ttf 
time="2019-07-10T13:06:22+02:00" level=info msg="Serving assets" component=server method=GET remote_addr="127.0.0.1:35418" url=/Roboto-Medium.7030d125.ttf 
time="2019-07-10T13:06:22+02:00" level=info msg="Response: OK" component=server method=GET remote_addr="127.0.0.1:35416" response_time=31.807357ms status=200 
[10/Jul/2019:13:06:22 +0200] 200 -(192.168.1.55) GET /api/hassio_ingress/2_SDjiDF3nacQwgX8VP0OnnQSPCkYqIaSkCKZprtMpo/icomoon.05bfd89e.woff2 HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36)
time="2019-07-10T13:06:22+02:00" level=info msg="Serving assets" component=server method=GET remote_addr="127.0.0.1:35422" url=/Roboto-Black.4c9983d4.ttf 
time="2019-07-10T13:06:22+02:00" level=info msg="Response: OK" component=server method=POST remote_addr="127.0.0.1:35424" response_time=36.013126ms status=200 
[10/Jul/2019:13:06:22 +0200] 200 -(192.168.1.55) POST /chronograf/v1/sources/0/proxy HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36)
time="2019-07-10T13:06:22+02:00" level=info msg="Response: OK" component=server method=POST remote_addr="127.0.0.1:35426" response_time=27.374818ms status=200 
[10/Jul/2019:13:06:22 +0200] 200 -(192.168.1.55) POST /chronograf/v1/sources/0/proxy HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36)
time="2019-07-10T13:06:23+02:00" level=info msg="Response: OK" component=server method=GET remote_addr="127.0.0.1:35420" response_time=600.915105ms status=200 
[10/Jul/2019:13:06:23 +0200] 200 -(192.168.1.55) GET /api/hassio_ingress/2_SDjiDF3nacQwgX8VP0OnnQSPCkYqIaSkCKZprtMpo/Roboto-Regular.f82a1950.ttf HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36)
time="2019-07-10T13:06:23+02:00" level=info msg="Response: OK" component=server method=GET remote_addr="127.0.0.1:35422" response_time=571.296231ms status=200 
[10/Jul/2019:13:06:23 +0200] 200 -(192.168.1.55) GET /api/hassio_ingress/2_SDjiDF3nacQwgX8VP0OnnQSPCkYqIaSkCKZprtMpo/Roboto-Black.4c9983d4.ttf HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36)
time="2019-07-10T13:06:23+02:00" level=info msg="Serving assets" component=server method=GET remote_addr="127.0.0.1:35430" url=/Roboto-Bold.95244466.ttf 
time="2019-07-10T13:06:23+02:00" level=info msg="Serving assets" component=server method=GET remote_addr="127.0.0.1:35432" url=/laser-spinner.0560a4d9.png 
time="2019-07-10T13:06:23+02:00" level=info msg="Response: OK" component=server method=GET remote_addr="127.0.0.1:35418" response_time=643.267379ms status=200 
[10/Jul/2019:13:06:23 +0200] 200 -(192.168.1.55) GET /api/hassio_ingress/2_SDjiDF3nacQwgX8VP0OnnQSPCkYqIaSkCKZprtMpo/Roboto-Medium.7030d125.ttf HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36)
time="2019-07-10T13:06:23+02:00" level=info msg="Response: OK" component=server method=GET remote_addr="127.0.0.1:35432" response_time=105.127564ms status=200 
[10/Jul/2019:13:06:23 +0200] 200 -(192.168.1.55) GET /api/hassio_ingress/2_SDjiDF3nacQwgX8VP0OnnQSPCkYqIaSkCKZprtMpo/laser-spinner.0560a4d9.png HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36)
time="2019-07-10T13:06:23+02:00" level=info msg="Response: OK" component=server method=GET remote_addr="127.0.0.1:35430" response_time=585.678482ms status=200 
[10/Jul/2019:13:06:23 +0200] 200 -(192.168.1.55) GET /api/hassio_ingress/2_SDjiDF3nacQwgX8VP0OnnQSPCkYqIaSkCKZprtMpo/Roboto-Bold.95244466.ttf HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36)
time="2019-07-10T13:06:23+02:00" level=info msg="Serving assets" component=server method=GET remote_addr="127.0.0.1:35434" url=/favicon.fa749080.ico 
time="2019-07-10T13:06:24+02:00" level=info msg="Response: OK" component=server method=GET remote_addr="127.0.0.1:35434" response_time=23.836703ms status=200 
[10/Jul/2019:13:06:24 +0200] 200 -(192.168.1.55) GET /favicon.fa749080.ico HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36)
time="2019-07-10T13:06:32+02:00" level=info msg="Response: OK" component=server method=GET remote_addr="127.0.0.1:35436" response_time="150.729µs" status=200 
[10/Jul/2019:13:06:32 +0200] 200 -(192.168.1.55) GET /chronograf/v1/me HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36)
time="2019-07-10T13:06:42+02:00" level=info msg="Response: OK" component=server method=GET remote_addr="127.0.0.1:35438" response_time="146.822µs" status=200 
[10/Jul/2019:13:06:42 +0200] 200 -(192.168.1.55) GET /chronograf/v1/me HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36)

It maybe because InfluxDB is monitoring itself, it can be turned off (see https://discourse.nodered.org/t/influxdb-on-a-raspberry-pi/742) but I’m not sure how to do that in hass.io

1 Like

me neither. I have no idea where i find the .config file. I have looked everywhere now…

1 Like

anyone else have an idea?

1 Like

push push Still need help

1 Like

@Ing-Med I’m also looking for a solution how to disable the self monitoring mentioned by @robbo312

I don’t get smart from the basic config which is:

{
  "auth": true,
  "reporting": true,
  "ssl": true,
  "certfile": "fullchain.pem",
  "keyfile": "privkey.pem"
}

Maybe the author of the addon @frenck knows more?

Could it be that “reporting” is

[monitor]
store-enabled = true

from the influxdb.conf :question:

where do you find the influxdb.config in the first place? i can’t even find that one :frowning:

As far as I can tell influxdb.conf ist not accessible/present on that hassio influxdb docker image.

Their needs to be another way

Push. This Issue is super annoying. Please help

1 Like

Push. This Issue is super annoying. Please help

1 Like

Push. This Issue is super annoying. Please help

1 Like

Push. This Issue is super annoying. Please help

1 Like

Apparently i have to uninstall this software, as it is impossible to get any support here for weeks.
Thanks for all the others who tried.

1 Like

Have you find a solution or an alternative ?
On my side on a raspberry pi 3 I see every day at 6h10 AM a memory peak usage (10% on the memory during 15 minutes.

no unfortunately not.

Have you try to open an issue on Github ?

I have the same issue now on Raspberry PI 3. influxdb spiked my “% CPU waiting for I/O” to over 90%. I had to reboot a couple of times just to have a chance to stop the influxdb container before it made the entire system unresponsive. I have been running HA for about a month now on hassio. This only happened after the upgrade to the new version 0.100.2. I have read a few places that setting:

store-enabled = false

may help. If only I could find some information on where the conf file is within the container and how to set this option.

See my post on how to do this: InfluxDB on hassio cpu usage.