Have been using nystudio107 scripts to manage database workflow. Just launched first Craft 3 site and noticed that when i went to sync the database locally from server the /tmp partition on the server maxed out in seconds and brought the whole server down when trying to copy the database.
The culprit turned out to be 5G of cache content in craft_templatecachequeries which maxed out the partition tmp size (4GB)
I had added cache tags around main for loops, but i spotted that i had lazily tried to cache the whole news index page with the news index template being cached from top to bottom. I have removed these.THe cache table size has improved to a more stable 1GB but that seems incredibly high still.
Is this normal for Craft3? (I guess there is a possible separate issue with scripts for db sync/pulling)
templatecachequeries
when doing the db dumps: github.com/nystudio107/craft-scripts/releases/tag/1.2.9 -- but your real problem is that these tables are getting that large to begin with. If you useclear_caches.sh
on deploy, it will empty these tables for you.