Long startup time when using multiple modbus sensors, help analyzing logs

Hi all,

Since upgrading to 2022.3.8 on Home Assistant OS I’m experiencing issues with long startup times after a reset.
By process of elimination, I was able to trace back the issue to the Modbus TCP sensors I have set up.
When I disable all sensors, the startup time is around 15s. When I enable sensor by sensor, the startup time rises exponentially. With one or two sensors enabled it is still only 25s but this rises very fast to more than 300s.
I can see in the logfiles that I even start getting timeout errors on the bootstrap process, but I can not seem to pinpoint what is causing the delays. What I find strange is that this timout is preceded by a whole lot of “Integration remaining: {}” messages, suggesting that all integrations have loaded but that the bootstrap process is still doing something?

I would really appreciate some help from more experienced users and get some tips on what I can investigate further, what keywords to look for, … .

Modbus configuration:

- name: thermheat
  type: tcp
  host: 192.168.5.70
  port: 502

  binary_sensors:

    - name: thermheat_heatseason
      scan_interval: 5
      slave: 1
      input_type: discrete_input
      address: 220

  sensors:

    - name: thermheat_activemode_raw
      scan_interval: 5
      input_type: input
      slave: 1
      address: 1
      count: 1

    - name: thermheat_tempmeascondensorin
      scan_interval: 5
      input_type: input
      slave: 1
      address: 8
      count: 1
      scale: 0.01
      unit_of_measurement: °C
      device_class: temperature

    - name: thermheat_tempmeascondensorout
      scan_interval: 5
      input_type: input
      slave: 1
      address: 9
      count: 1
      scale: 0.01
      unit_of_measurement: °C
      device_class: temperature

    - name: thermheat_tempmeasbrinein
      scan_interval: 5
      input_type: input
      slave: 1
      address: 10
      count: 1
      scale: 0.01
      unit_of_measurement: °C
      device_class: temperature

    - name: thermheat_tempmeasbrineout
      scan_interval: 5
      input_type: input
      slave: 1
      address: 11
      count: 1
      scale: 0.01
      unit_of_measurement: °C
      device_class: temperature

    - name: thermheat_tempmeasoutside
      scan_interval: 5
      input_type: input
      slave: 1
      address: 13
      count: 1
      scale: 0.01
      unit_of_measurement: °C
      device_class: temperature

    - name: thermheat_tempmeassanitarywater
      scan_interval: 5
      input_type: input
      slave: 1
      address: 15
      count: 1
      scale: 0.01
      unit_of_measurement: °C
      device_class: temperature

    - name: thermheat_calculatedsetpoint
      scan_interval: 5
      input_type: input
      slave: 1
      address: 18
      count: 1
      scale: 0.01
      unit_of_measurement: °C
      device_class: temperature

    - name: thermheat_speedpumpcondensorcirc
      scan_interval: 5
      input_type: input
      slave: 1
      address: 39
      count: 1
      scale: 0.01
      unit_of_measurement: '%'
      device_class: frequency

    - name: thermheat_speedpumpbrinecirc
      scan_interval: 5
      input_type: input
      slave: 1
      address: 44
      count: 1
      scale: 0.01
      unit_of_measurement: '%'
      device_class: frequency

    - name: thermheat_speedcompressor
      scan_interval: 5
      input_type: input
      slave: 1
      address: 54
      count: 1
      scale: 0.01
      unit_of_measurement: '%'
      device_class: frequency

    - name: thermheat_tempsettinginside
      scan_interval: 5
      input_type: holding
      slave: 1
      address: 5
      count: 1
      scale: 0.01
      unit_of_measurement: °C
      device_class: temperature

Extract from logfile:

	41075	2022-04-05 22:10:38 DEBUG (MainThread) [homeassistant.bootstrap] Integration remaining: {}
	41224	2022-04-05 22:10:39 DEBUG (MainThread) [homeassistant.bootstrap] Running timeout Zones: {}
	41225	2022-04-05 22:10:39 DEBUG (MainThread) [homeassistant.bootstrap] Integration remaining: {}
	41339	2022-04-05 22:10:40 DEBUG (MainThread) [homeassistant.bootstrap] Running timeout Zones: {}
	41340	2022-04-05 22:10:40 DEBUG (MainThread) [homeassistant.bootstrap] Integration remaining: {}
	41477	2022-04-05 22:10:41 DEBUG (MainThread) [homeassistant.bootstrap] Running timeout Zones: {}
	41478	2022-04-05 22:10:41 DEBUG (MainThread) [homeassistant.bootstrap] Integration remaining: {}
	41632	2022-04-05 22:10:42 DEBUG (MainThread) [homeassistant.bootstrap] Running timeout Zones: {}
	41633	2022-04-05 22:10:42 DEBUG (MainThread) [homeassistant.bootstrap] Integration remaining: {}
	41748	2022-04-05 22:10:43 DEBUG (MainThread) [homeassistant.bootstrap] Running timeout Zones: {}
	41749	2022-04-05 22:10:43 DEBUG (MainThread) [homeassistant.bootstrap] Integration remaining: {}
	41874	2022-04-05 22:10:44 DEBUG (MainThread) [homeassistant.bootstrap] Running timeout Zones: {}
	41875	2022-04-05 22:10:44 DEBUG (MainThread) [homeassistant.bootstrap] Integration remaining: {}
	42007	2022-04-05 22:10:45 DEBUG (MainThread) [homeassistant.bootstrap] Running timeout Zones: {}
	42008	2022-04-05 22:10:45 DEBUG (MainThread) [homeassistant.bootstrap] Integration remaining: {}
	42139	2022-04-05 22:10:46 DEBUG (MainThread) [homeassistant.bootstrap] Running timeout Zones: {}
	42140	2022-04-05 22:10:46 DEBUG (MainThread) [homeassistant.bootstrap] Integration remaining: {}
	42280	2022-04-05 22:10:47 DEBUG (MainThread) [homeassistant.bootstrap] Running timeout Zones: {}
	42281	2022-04-05 22:10:47 DEBUG (MainThread) [homeassistant.bootstrap] Integration remaining: {}
	42328	2022-04-05 22:10:47 WARNING (MainThread) [homeassistant.bootstrap] Setup timed out for bootstrap - moving forward
	42329	2022-04-05 22:10:47 DEBUG (MainThread) [homeassistant.bootstrap] Integration setup times: {'persistent_notification': 0.001281, 'ssdp': 0.004673, 'onboarding': 0.005026, 'device_automation': 0.005171, 'system_log': 0.005429, 'search': 0.00558, 'dhcp': 0.005797, <Platform.BUTTON: 'button'>: 0.006886, <Platform.BINARY_SENSOR: 'binary_sensor'>: 0.012463, 'logger': 0.020456, 'stream': 0.02063, 'network': 0.027133, 'frontend': 0.03919, 'analytics': 0.053568, 'auth': 0.067378, 'image': 0.086499, 'zeroconf': 0.094688, 'weather': 0.117219, 'websocket_api': 0.122054, 'api': 0.131208, 'webhook': 0.137969, 'recorder': 0.161561, <Platform.FAN: 'fan'>: 0.167414, 'lovelace': 0.170955, 'diagnostics': 0.184669, 'config': 0.212839, 'cover': 0.221355, 'map': 0.312436, 'cloud': 0.337148, 'http': 0.341769, 'climate': 0.373864, 'blueprint': 0.386128, <Platform.SENSOR: 'sensor'>: 0.389697, 'trace': 0.460589, 'default_config': 0.477656, 'my': 0.531299, 'sun': 0.569555, 'history': 0.577848, 'usb': 0.587554, <Platform.DEVICE_TRACKER: 'device_tracker'>: 0.655696, 'homeassistant': 0.738784, 'light': 1.048402, 'person': 1.070238, 'scene': 1.072248, 'system_health': 1.082586, 'media_source': 1.098107, 'logbook': 1.194023, 'time_date': 1.264726, 'camera': 1.277569, 'switch': 1.339908, 'tag': 1.403766, 'script': 1.819071, 'local_file': 1.903792, 'energy': 1.987644, 'smtp': 2.178025, 'counter': 2.306321, 'input_select': 2.388856, 'generic': 2.443313, 'input_datetime': 2.455797, 'tts': 2.584506, 'input_text': 2.67162, 'input_button': 2.683458, 'automation': 2.799819, 'zone': 2.858457, 'rpi_power': 3.257889, 'group': 3.267835, 'notify': 3.58325, 'generic_thermostat': 4.583324, 'radio_browser': 4.89366, 'input_boolean': 4.984441, 'input_number': 4.990656, 'timer': 5.070356, 'modbus': 5.890216, 'hassio': 5.935324, 'mobile_app': 5.939925, 'comfoconnect': 6.271253, 'met': 6.430582, 'wake_on_lan': 7.243648, 'sma': 8.246437, 'template': 8.375171, 'shelly': 8.7668, 'mqtt': 9.217017, 'rest': 10.524569, 'ads': 70.177092}
	42330	2022-04-05 22:10:47 INFO (MainThread) [homeassistant.bootstrap] Home Assistant initialized in 313.27s

Hello, to push this up, I recently integrated PV and my new Heat Pump via Modbus and since then i recognized as well that it takes ages to reboot. No one else got this issue?

I’m surprised that this thread is not popular. I’m experiencing exactly same issues - modbus integration prevents HA from restart for several minutes