ERROR Error while reading incoming messages: Error while receiving data: [Errno 9] Bad file descriptor

The strangest thing is happening with one of my esp8266 12-F boards where it disconnects randomly (it is right beside the wifi router) and also throws some errors even when I disabled all the sensors connected to it:

The config

esphome:
  name: living_room
  platform: ESP8266
  board: nodemcuv2

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_pw
  fast_connect: true
  power_save_mode: none
  reboot_timeout: 0s
  manual_ip:
    static_ip: 192.168.0.179
    gateway: 192.168.0.1
    subnet: 255.255.255.0
    dns1: 192.168.0.1

# Enable logging
logger:
  level: VERY_VERBOSE

# Enable Home Assistant API
api:

ota:

# uart:
#   rx_pin: GPIO3
#   tx_pin: GPIO1
#   baud_rate: 9600

#sensor:
  # - platform: mhz19
  #   id: living_room_mhz19c
  #   co2:
  #     name: "Living Room CO2"
  #   temperature:
  #     name: "Living Room MH-Z19C Temperature"
  #   update_interval: 60s
  #   automatic_baseline_calibration: true
  # - platform: dht
  #   pin: D7
  #   model: dht22
  #   temperature:
  #     name: "Living Room Temperature"
  #     filters:
  #     - offset: -2.3
  #   humidity:
  #     name: "Living Room Humidity"
  #   update_interval: 60s
  # - platform: adc
  #   pin: A0
  #   name: "Living Room LUX"
  #   unit_of_measurement: lx
  #   update_interval: 60s
  #   filters:
  #     - lambda: |-
  #         return (x / 10000.0) * 20000000.0;

# binary_sensor:
#   - platform: gpio
#     pin: D5
#     name: "Living Room PIR Sensor"
#     device_class: motion 

I tried setting the IP to static, no change, power_save_mode: none, the same, fast_connect: true, no change.
Funny thing is I have another of these boards with the same sensors and it is rock solid.
Tried multiple power supplies without any difference.
Anyone got any suggestions? What that error might be about?

Might be randomly rebooting?

[20:48:09][I][ota:046]: Boot seems successful, resetting boot loop counter.
[20:48:14][VV][preferences:051]: SAVE 32: 0=0x00000000 1=0x0DEFE4E3 (Type=233825507, CRC=0x0DEFE4E3)
[20:48:14][V][api.connection:695]: Error: Disconnecting ESPHome v1.16.1 (192.168.0.12)
ERROR Error while reading incoming messages: Error while receiving data: [Errno 9] Bad file descriptor
WARNING Disconnected from API: Error while receiving data: [Errno 9] Bad file descriptor