Error doing job

Homeassistant is very slow , unable on network 2-3 times a week. I have to delete home-assistant_v2.db and home-assistant.log files and restart NUC for take homeassistant back on network. last home-assistant.log file size was 8GB and home-assistant_v2.db file wase 54GB.

Core Log file:


2021-03-15 10:49:00 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback SerialTransport._read_ready()
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/asyncio/events.py", line 81, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/local/lib/python3.8/site-packages/serial_asyncio/__init__.py", line 114, in _read_ready
    data = self._serial.read(self._max_read_size)
  File "/usr/local/lib/python3.8/site-packages/serial/serialposix.py", line 565, in read
    ready, _, _ = select.select([self.fd, self.pipe_abort_read_r], [], [], timeout.time_left())
ValueError: filedescriptor out of range in select()
2021-03-15 10:49:00 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback SerialTransport._read_ready()
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/asyncio/events.py", line 81, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/local/lib/python3.8/site-packages/serial_asyncio/__init__.py", line 114, in _read_ready
    data = self._serial.read(self._max_read_size)
  File "/usr/local/lib/python3.8/site-packages/serial/serialposix.py", line 565, in read
    ready, _, _ = select.select([self.fd, self.pipe_abort_read_r], [], [], timeout.time_left())
ValueError: filedescriptor out of range in select()
2021-03-15 10:49:00 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback SerialTransport._read_ready()
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/asyncio/events.py", line 81, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/local/lib/python3.8/site-packages/serial_asyncio/__init__.py", line 114, in _read_ready
    data = self._serial.read(self._max_read_size)
  File "/usr/local/lib/python3.8/site-packages/serial/serialposix.py", line 565, in read
    ready, _, _ = select.select([self.fd, self.pipe_abort_read_r], [], [], timeout.time_left())
ValueError: filedescriptor out of range in select()
2021-03-15 10:49:00 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback SerialTransport._read_ready()
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/asyncio/events.py", line 81, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/local/lib/python3.8/site-packages/serial_asyncio/__init__.py", line 114, in _read_ready
    data = self._serial.read(self._max_read_size)
  File "/usr/local/lib/python3.8/site-packages/serial/serialposix.py", line 565, in read
    ready, _, _ = select.select([self.fd, self.pipe_abort_read_r], [], [], timeout.time_left())
ValueError: filedescriptor out of range in select()
2021-03-15 10:49:00 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback SerialTransport._read_ready()
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/asyncio/events.py", line 81, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/local/lib/python3.8/site-packages/serial_asyncio/__init__.py", line 114, in _read_ready
    data = self._serial.read(self._max_read_size)
  File "/usr/local/lib/python3.8/site-packages/serial/serialposix.py", line 565, in read
    ready, _, _ = select.select([self.fd, self.pipe_abort_read_r], [], [], timeout.time_left())
ValueError: filedescriptor out of range in select()
2021-03-15 10:49:00 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback SerialTransport._read_ready()
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/asyncio/events.py", line 81, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/local/lib/python3.8/site-packages/serial_asyncio/__init__.py", line 114, in _read_ready
    data = self._serial.read(self._max_read_size)
  File "/usr/local/lib/python3.8/site-packages/serial/serialposix.py", line 565, in read
    ready, _, _ = select.select([self.fd, self.pipe_abort_read_r], [], [], timeout.time_left())
ValueError: filedescriptor out of range in select()
2021-03-15 10:49:00 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback SerialTransport._read_ready()
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/asyncio/events.py", line 81, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/local/lib/python3.8/site-packages/serial_asyncio/__init__.py", line 114, in _read_ready
    data = self._serial.read(self._max_read_size)
  File "/usr/local/lib/python3.8/site-packages/serial/serialposix.py", line 565, in read
    ready, _, _ = select.select([self.fd, self.pipe_abort_read_r], [], [], timeout.time_left())
ValueError: filedescriptor out of range in select()
2021-03-15 10:49:00 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback SerialTransport._read_ready()
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/asyncio/events.py", line 81, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/local/lib/python3.8/site-packages/serial_asyncio/__init__.py", line 114, in _read_ready
    data = self._serial.read(self._max_read_size)
  File "/usr/local/lib/python3.8/site-packages/serial/serialposix.py", line 565, in read
    ready, _, _ = select.select([self.fd, self.pipe_abort_read_r], [], [], timeout.time_left())
ValueError: filedescriptor out of range in select()
2021-03-15 10:49:00 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback SerialTransport._read_ready()
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/asyncio/events.py", line 81, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/local/lib/python3.8/site-packages/serial_asyncio/__init__.py", line 114, in _read_ready
    data = self._serial.read(self._max_read_size)
  File "/usr/local/lib/python3.8/site-packages/serial/serialposix.py", line 565, in read
    ready, _, _ = select.select([self.fd, self.pipe_abort_read_r], [], [], timeout.time_left())
ValueError: filedescriptor out of range in select()
2021-03-15 10:49:00 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback SerialTransport._read_ready()
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/asyncio/events.py", line 81, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/local/lib/python3.8/site-packages/serial_asyncio/__init__.py", line 114, in _read_ready
    data = self._serial.read(self._max_read_size)
  File "/usr/local/lib/python3.8/site-packages/serial/serialposix.py", line 565, in read
    ready, _, _ = select.select([self.fd, self.pipe_abort_read_r], [], [], timeout.time_left())
ValueError: filedescriptor out of range in select()
2021-03-15 10:49:00 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback SerialTransport._read_ready()
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/asyncio/events.py", line 81, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/local/lib/python3.8/site-packages/serial_asyncio/__init__.py", line 114, in _read_ready
    data = self._serial.read(self._max_read_size)
  File "/usr/local/lib/python3.8/site-packages/serial/serialposix.py", line 565, in read
    ready, _, _ = select.select([self.fd, self.pipe_abort_read_r], [], [], timeout.time_left())
ValueError: filedescriptor out of range in select()
2021-03-15 10:49:00 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback SerialTransport._read_ready()

You should start excluding entities to be recorded, that’s a huge database and the inbuilt database is known to have issues.

Here is my configuration

recorder:
  purge_keep_days: 5
  purge_interval: 1
  include:
    domains:
      - sensor
      - switch
      - shell_command
      - binary_sensor
      - input_text
      - light
      - script
      - device_tracker
  exclude:
    entities:
      - sensor.time
    event_types:
      - service_removed
      - service_executed
      - platform_discovered
      - homeassistant_start
      - feedreader
      - service_registered
      - call_service
      - component_loaded
      - logbook_entry
      - system_log_event
   

Thank you so much for Guide :blush:.

Reduced database size guide reduce home-assistant_v2.db size (history and logbook). Not solve the problem with
home-assistant.log file size is still 17.66Gb and system is still very slow.
Please help

You need to reduce your logging as well: https://www.home-assistant.io/integrations/logger/

If your log file is that large, that means that there is an integration (or integrations) that are logging huge amounts of data. What are you running besides HA?

Even on my dev instance of HA outputting tons of debug messages, my log file stays right about 1-2GB.