gieljnssns / buienalarm-sensor-homeassistant

Buienalarm custom_component for Home-Assistant
MIT License
36 stars 6 forks source link

SQLSTATE[HY000] [1040] Too many connections #8

Closed dutch-erik closed 4 years ago

dutch-erik commented 4 years ago

Hi Giel,

I'm receiving the following errors every day, starting same time. Is it something in my config or is it perhaps something in the Buienalarm code causing it?


Logger: buienalarm.pybuienalarm Source: custom_components/buienalarm/sensor.py:171 First occurred: 12:25:19 AM (53 occurrences) Last logged: 9:19:47 AM

SQLSTATE[HY000] [1040] Too many connections
HTTPSConnectionPool(host='cdn-secure.buienalarm.nl', port=443): Max retries exceeded with url: /api/3.4/forecast.php?lat=51.xxx&lon=4.xxx&region=nl&unit=mm%2Fu (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x6d771b50>: Failed to establish a new connection: [Errno -3] Try again'))
HTTPSConnectionPool(host='cdn-secure.buienalarm.nl', port=443): Max retries exceeded with url: /api/3.4/forecast.php?lat=51.xxx&lon=4.xxx&region=nl&unit=mm%2Fu (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x679604b0>: Failed to establish a new connection: [Errno -3] Try again'))
HTTPSConnectionPool(host='cdn-secure.buienalarm.nl', port=443): Max retries exceeded with url: /api/3.4/forecast.php?lat=51.xxx&lon=4.xxx&region=nl&unit=mm%2Fu (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x6d771c70>: Failed to establish a new connection: [Errno -3] Try again'))

Logger: homeassistant.helpers.entity Source: custom_components/buienalarm/sensor.py:173 First occurred: 12:25:19 AM (53 occurrences) Last logged: 9:19:47 AM

Update for sensor.ba_temperature fails
Update for sensor.ba_precipitation fails
Update for sensor.ba_precipitation_forecast_average fails
Update for sensor.ba_precipitation_forecast_total fails
Update for sensor.ba_next_rain_forecast fails

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 272, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 466, in async_device_update self.update # type: ignore File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, *self.kwargs) File "/config/custom_components/buienalarm/sensor.py", line 126, in update self.ba_data.update() File "/usr/src/homeassistant/homeassistant/util/init.py", line 239, in wrapper result = method(args, **kwargs) File "/config/custom_components/buienalarm/sensor.py", line 173, in update self.temperature = self.buienalarm.get_temperature() File "/usr/local/lib/python3.7/site-packages/buienalarm/pybuienalarm.py", line 56, in get_temperature if self.renew < time.time(): TypeError: '<' not supported between instances of 'NoneType' and 'float'


gieljnssns commented 4 years ago

Sorry for my late response. I also had this error befor 0.113 but I haven't had time to figure out where it came from. But I haven't seen it since the last update. Is this also the case with you?

dutch-erik commented 4 years ago

No problem at all! Indeed the errors are gone now after installing 0.113. I would say, let's close this one. ;)