core icon indicating copy to clipboard operation
core copied to clipboard

SQL Sensor Errors with MariaDB

Open ivercellino opened this issue 1 year ago • 6 comments

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

ivercellino avatar Mar 09 '24 18:03 ivercellino

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)

home-assistant[bot] avatar Mar 09 '24 20:03 home-assistant[bot]

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

PeteRager avatar Mar 21 '24 23:03 PeteRager

Is the official MariaDB addon

ivercellino avatar Mar 22 '24 07:03 ivercellino

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

sven-debug avatar Apr 16 '24 09:04 sven-debug

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)

Grenman8211 avatar May 28 '24 14:05 Grenman8211

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.