home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
69.85k stars 28.95k forks source link

SQL Sensor Errors with MariaDB #112837

Open ivercellino opened 4 months ago

ivercellino commented 4 months ago

The problem

I have more than 60 sql sensors configured with the standard sql integrations connected to a MariaDB running locally. After upgrade to 2024.3.0 most of them have become unvailable right from the startup in a random way. Sometimes reloading helps, sometimes not. Reverted back to 2024.2.5 and everything is fine again.

So obviuosly something is not running smoth with db connections in this release.

What version of Home Assistant Core has the issue?

2024.3.0

What was the last working version of Home Assistant Core?

2024.2.5

What type of installation are you running?

Home Assistant OS

Integration causing the issue

SQL

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Error executing query xxx: (MySQLdb.OperationalError) (1040, 'Too many connections') (Background on this error at: https://sqlalche.me/e/20/e3q8)

Additional information

No response

home-assistant[bot] commented 4 months ago

Hey there @gjohansson-st, @dougiteixeira, mind taking a look at this issue as it has been labeled with an integration (sql) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `sql` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign sql` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


sql documentation sql source (message by IssueLinks)

PeteRager commented 3 months ago

Is the MariaDB the add on or something you are running yourself?

ivercellino commented 3 months ago

Is the official MariaDB addon

sven-debug commented 2 months ago

I have a similar issue. I set up a sensor that should report the DB size. This is not updated at all.

Grenman8211 commented 1 month ago

Couldn't connect using mysql://:@core-mariadb/homeassistant?charset=utf8 DB_URL: (MySQLdb.OperationalError) (2002, "Can't connect to server on 'core-mariadb' (115)") (Background on this error at: https://sqlalche.me/e/20/e3q8)