I recently launched a site (EE 2.3.1) that has started to show “Unable to Load Site Preferences; No Preferences Found” at random. According to the host, it’s because the database is refusing the connection due to either too many MySQL connections or too large of packets. Here’s an error that the host sent back to us from the MySQL log:
120111 14:56:00 [Warning] Aborted connection 1116467 to db:
‘xxxx_expressionEngine’ user: ‘xxxx_13’ host: ‘xx.xx.x.xxx’ (Got an error
reading communication packets)Which is related to this query:
1116467 Connect .(JavaScript must be enabled to view this email address) on
1116467 Init DB ynab_expressionEngine
1116467 Query SET NAMES utf8
1116467 Query SELECT *
1116467 Query SELECT DISTINCT ee.* FROM exp_extensions
ee WHERE enabled = ‘y’ ORDER BY hook, priority ASC, class
1116467 Query SELECT settings FROM exp_extensions WHERE
enabled = ‘y’ AND class = ‘System_messages_ext’ LIMIT 1
1116467 Query SELECT *
1116467 Query SELECT *
I’m using CE Cache heavily on the site and most pages are coming in at under 20 queries when cached and I’ve used the disable parameter liberally. The site is on a shared hosting account which limits the max number of concurrent database connections to 20. I don’t know enough about databases to know if that’s too low for a site that’s getting thousands of visitors per day.
What I would like to know is if we’re hitting the max_allowed_packet limit, another potential reason the host suggested. The limit is 100MB, which I assume is ample, but any information you can give me about what a typical query size for EE is would be helpful.
Any and all information as to causes or a potential solution would be most appreciated.