Skip to content

🔨 Add pool_recycle for MySQL#668

Merged
Donkie merged 2 commits into
Donkie:masterfrom
sinclairpaul:mysql-recycle
Apr 14, 2025
Merged

🔨 Add pool_recycle for MySQL#668
Donkie merged 2 commits into
Donkie:masterfrom
sinclairpaul:mysql-recycle

Conversation

@sinclairpaul
Copy link
Copy Markdown
Contributor

I have experienced database timeout issues when running an external MariaDB database, also mentioned in #538

I believe the issue is that the database will close idle connections as defined by the wait_timeout parameter within the database config. Although I set this to the MariaDB default (28800) I still saw the timeouts after 8 hours of idle time (the connections being closed are logged at the DB server logs).

As per https://docs.sqlalchemy.org/en/20/core/pooling.html#setting-pool-recycle setting pool recycle seems to resolve, I've set it to 3600 as I think an hour is reasonable.

It does appear that some distributions of MariaDB set the wait_timeout to 600 seconds, although this can be changed by the user.

Been running for a few days with no issues, integration tests all pass.

@Donkie
Copy link
Copy Markdown
Owner

Donkie commented Apr 12, 2025

ah nice find, please rebase with a CI fix from main

@sinclairpaul
Copy link
Copy Markdown
Contributor Author

Should be good to go

@Donkie Donkie merged commit 73a087f into Donkie:master Apr 14, 2025
12 checks passed
@sinclairpaul sinclairpaul deleted the mysql-recycle branch April 14, 2025 12:11
renovate Bot added a commit to sdwilsh/ansible-playbooks that referenced this pull request Jan 23, 2026
##### [\`0.23.0\`](https://github.com/Donkie/Spoolman/releases/tag/v0.23.0)

New year new update!

Spoolman development has slowed down considerably last year, due to multiple personal reasons from my side. Here is an update with all the things that have accumulated over the last months. Most of the updates are from contributions from the community, many thanks!

There's been many significant dependency version updates in this update. Please report any new issues you find. If anything is breaking your ability to use it, it's safe to go back to the previous version (22.1) until it has been addressed.

##### What's Changed

- Improved standalone install script. It now automatically downloads and installs the best Python version for you. This means Spoolman should now support a lot more distributions, and you don't need to fix any Python versions or other packages beforehand!
- Spoolman docker images are now officially published on [dockerhub](https://hub.docker.com/r/donkieyo/spoolman)!
- Spoolman now uses uv instead of pdm for backend package management.
- Updated all backend and client packages to their latest versions.
- Spoolman now requires at least Python 3.10, and defaults to Python 3.14 in both Docker and Standalone installation methods.
- Added adjust spool button by [@htsachakis](https://github.com/htsachakis) in [#626](Donkie/Spoolman#626)
- 🔨 Add pool\_recycle for MySQL by [@sinclairpaul](https://github.com/sinclairpaul) in [#668](Donkie/Spoolman#668)
- Add Measured Weight option to the filament adjustment modal  by [@spyder007](https://github.com/spyder007) in [#660](Donkie/Spoolman#660)
- Remade translation into Brazilian Portuguese by [@opastorello](https://github.com/opastorello) in [#694](Donkie/Spoolman#694)
- Add SPOOLMAN\_CORS\_ORIGIN variable by [@ecarjat](https://github.com/ecarjat) in [#605](Donkie/Spoolman#605)
- Add Spoolcount in Locations Page by [@JakobGue](https://github.com/JakobGue) in [#715](Donkie/Spoolman#715)
- Fix Spool Edit page Empty Weight and Initial Weight bug by [@ajford](https://github.com/ajford) in [#717](Donkie/Spoolman#717)
- Reduce Docker container size by [@Shadowsith](https://github.com/Shadowsith) in [#747](Donkie/Spoolman#747)
- Supports PWA. by [@sixiaolong1117](https://github.com/sixiaolong1117) in [#762](Donkie/Spoolman#762)
- Add support for Fedora to install.sh by [@mnebelung](https://github.com/mnebelung) in [#786](Donkie/Spoolman#786)
- All caps short QR codes for alphanumerical encoding by [@beikeland](https://github.com/beikeland) in [#777](Donkie/Spoolman#777)
- Bugfix for issue [#803](Donkie/Spoolman#803) and [#805](Donkie/Spoolman#805) by [@kaufi95](https://github.com/kaufi95) in [#811](Donkie/Spoolman#811)

##### Translations

- Updated Norwegian Bokmål translation by Vegard Fladby
- Updated Lithuanian translation by vjurka
- Updated French translation by Bazzofski
- Updated Hindi (Latin script) translation by Archit Jain
- Updated Italian translation by Giadej
- Updated Czech translation by Miloslav Kos and Marek Dvorný
- Updated Russian translation by dimquea and Dr\_Perry\_Coke
- Updated Romanian translation by Cristian
- Updated Turkish translation by Yücelen Gül
- Updated Spanish translation by Jose
- Updated Portuguese (Brazil) translation by KnightArch
- Updated Portuguese translation by rupefelo
- Updated German translation by Tobias Maschek, derSchreiber, Justus Kagerer and Ivo Grossen
- Updated Tamil translation by தமிழ்நேரம்
- Updated Polish translation by Julia 🌸🏳️‍⚧️
- Updated Chinese (Simplified Han script) translation by Samuel Wang
- Updated Estonian translation by Arvi Saluste

##### New Contributors

- [@htsachakis](https://github.com/htsachakis) made their first contribution in [#626](Donkie/Spoolman#626)
- [@sinclairpaul](https://github.com/sinclairpaul) made their first contribution in [#668](Donkie/Spoolman#668)
- [@opastorello](https://github.com/opastorello) made their first contribution in [#694](Donkie/Spoolman#694)
- [@ecarjat](https://github.com/ecarjat) made their first contribution in [#605](Donkie/Spoolman#605)
- [@JakobGue](https://github.com/JakobGue) made their first contribution in [#715](Donkie/Spoolman#715)
- [@ajford](https://github.com/ajford) made their first contribution in [#717](Donkie/Spoolman#717)
- [@Shadowsith](https://github.com/Shadowsith) made their first contribution in [#747](Donkie/Spoolman#747)
- [@sixiaolong1117](https://github.com/sixiaolong1117) made their first contribution in [#762](Donkie/Spoolman#762)
- [@mnebelung](https://github.com/mnebelung) made their first contribution in [#786](Donkie/Spoolman#786)
- [@beikeland](https://github.com/beikeland) made their first contribution in [#777](Donkie/Spoolman#777)
- [@kaufi95](https://github.com/kaufi95) made their first contribution in [#811](Donkie/Spoolman#811)

**Full Changelog**: <Donkie/Spoolman@v0.22.1...v0.23.0>
sdwilsh pushed a commit to sdwilsh/ansible-playbooks that referenced this pull request Jan 29, 2026
##### [\`0.23.0\`](https://github.com/Donkie/Spoolman/releases/tag/v0.23.0)

New year new update!

Spoolman development has slowed down considerably last year, due to multiple personal reasons from my side. Here is an update with all the things that have accumulated over the last months. Most of the updates are from contributions from the community, many thanks!

There's been many significant dependency version updates in this update. Please report any new issues you find. If anything is breaking your ability to use it, it's safe to go back to the previous version (22.1) until it has been addressed.

##### What's Changed

- Improved standalone install script. It now automatically downloads and installs the best Python version for you. This means Spoolman should now support a lot more distributions, and you don't need to fix any Python versions or other packages beforehand!
- Spoolman docker images are now officially published on [dockerhub](https://hub.docker.com/r/donkieyo/spoolman)!
- Spoolman now uses uv instead of pdm for backend package management.
- Updated all backend and client packages to their latest versions.
- Spoolman now requires at least Python 3.10, and defaults to Python 3.14 in both Docker and Standalone installation methods.
- Added adjust spool button by [@htsachakis](https://github.com/htsachakis) in [#626](Donkie/Spoolman#626)
- 🔨 Add pool\_recycle for MySQL by [@sinclairpaul](https://github.com/sinclairpaul) in [#668](Donkie/Spoolman#668)
- Add Measured Weight option to the filament adjustment modal  by [@spyder007](https://github.com/spyder007) in [#660](Donkie/Spoolman#660)
- Remade translation into Brazilian Portuguese by [@opastorello](https://github.com/opastorello) in [#694](Donkie/Spoolman#694)
- Add SPOOLMAN\_CORS\_ORIGIN variable by [@ecarjat](https://github.com/ecarjat) in [#605](Donkie/Spoolman#605)
- Add Spoolcount in Locations Page by [@JakobGue](https://github.com/JakobGue) in [#715](Donkie/Spoolman#715)
- Fix Spool Edit page Empty Weight and Initial Weight bug by [@ajford](https://github.com/ajford) in [#717](Donkie/Spoolman#717)
- Reduce Docker container size by [@Shadowsith](https://github.com/Shadowsith) in [#747](Donkie/Spoolman#747)
- Supports PWA. by [@sixiaolong1117](https://github.com/sixiaolong1117) in [#762](Donkie/Spoolman#762)
- Add support for Fedora to install.sh by [@mnebelung](https://github.com/mnebelung) in [#786](Donkie/Spoolman#786)
- All caps short QR codes for alphanumerical encoding by [@beikeland](https://github.com/beikeland) in [#777](Donkie/Spoolman#777)
- Bugfix for issue [#803](Donkie/Spoolman#803) and [#805](Donkie/Spoolman#805) by [@kaufi95](https://github.com/kaufi95) in [#811](Donkie/Spoolman#811)

##### Translations

- Updated Norwegian Bokmål translation by Vegard Fladby
- Updated Lithuanian translation by vjurka
- Updated French translation by Bazzofski
- Updated Hindi (Latin script) translation by Archit Jain
- Updated Italian translation by Giadej
- Updated Czech translation by Miloslav Kos and Marek Dvorný
- Updated Russian translation by dimquea and Dr\_Perry\_Coke
- Updated Romanian translation by Cristian
- Updated Turkish translation by Yücelen Gül
- Updated Spanish translation by Jose
- Updated Portuguese (Brazil) translation by KnightArch
- Updated Portuguese translation by rupefelo
- Updated German translation by Tobias Maschek, derSchreiber, Justus Kagerer and Ivo Grossen
- Updated Tamil translation by தமிழ்நேரம்
- Updated Polish translation by Julia 🌸🏳️‍⚧️
- Updated Chinese (Simplified Han script) translation by Samuel Wang
- Updated Estonian translation by Arvi Saluste

##### New Contributors

- [@htsachakis](https://github.com/htsachakis) made their first contribution in [#626](Donkie/Spoolman#626)
- [@sinclairpaul](https://github.com/sinclairpaul) made their first contribution in [#668](Donkie/Spoolman#668)
- [@opastorello](https://github.com/opastorello) made their first contribution in [#694](Donkie/Spoolman#694)
- [@ecarjat](https://github.com/ecarjat) made their first contribution in [#605](Donkie/Spoolman#605)
- [@JakobGue](https://github.com/JakobGue) made their first contribution in [#715](Donkie/Spoolman#715)
- [@ajford](https://github.com/ajford) made their first contribution in [#717](Donkie/Spoolman#717)
- [@Shadowsith](https://github.com/Shadowsith) made their first contribution in [#747](Donkie/Spoolman#747)
- [@sixiaolong1117](https://github.com/sixiaolong1117) made their first contribution in [#762](Donkie/Spoolman#762)
- [@mnebelung](https://github.com/mnebelung) made their first contribution in [#786](Donkie/Spoolman#786)
- [@beikeland](https://github.com/beikeland) made their first contribution in [#777](Donkie/Spoolman#777)
- [@kaufi95](https://github.com/kaufi95) made their first contribution in [#811](Donkie/Spoolman#811)

**Full Changelog**: <Donkie/Spoolman@v0.22.1...v0.23.0>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants