Publisher does not support the Fluid field type. Please do not contact asking when support will be available.

If you purchased an add-on from expressionengine.com, be sure to visit boldminded.com/claim to add the license to your account here on boldminded.com.

Ticket: Too many connections

Status Resolved
Add-on / Version Publisher Lite 2.10.5
Severity
EE Version 4.3.6

Mark Mikloska

Jun 04, 2019

hey there, I switched to publisher lite (from betterworkflow) on a medium traffic site for a quite a high profile client. Translations are not enabled. We also use Structure, Assets, Bloqs, Low search all latest versions.
Now as soon as we enable publisher, our “database connections” go through the roof even though there is not much traffic at the time (just fyi, this is after then initial import ~ 3500 entries). This results in mysql error “Too many connections” within minutes of publisher being enabled. Have you ever heard / run into anything similar? I thought I’d ask before investigating.

Cheers,
Mark

#1

BoldMinded (Brian)

Hi, Mark. I haven’t seen similar errors or had similar reports that I can remember. I know Publisher is used on a few high traffic sites too. My question to you is have you looked at the query profiler on the front end to see how many queries are being run? What caching do you have on the site? Do you have Publisher’s cache enable (it’s in Publisher’s settings pages)?

I have seen slow performance from deeply nested relationship fields via embeds or just poorly optimized templates, but not this specific error.

#2

Mark Mikloska

Thanks Brian, when enabled there are around 350-400 queries per page, when disabled it goes down to around 150-250 … I run varnish, which performs very well,but as soon as there are a number of pages that are not cached “too many connection” shows up. I also use DRY approach to templates, using stash. Publisher cache is not enabled. I’ll try that first and see if that makes any difference. I’ll be in touch with some more details in a next couple of days. Thanks, Mark

#3

BoldMinded (Brian)

I’ve seen pages load with 2000 queries before. It was slow, but it loaded without a db error. I’m betting it’s something configured with your server, not the app itself.

#4

Mark Mikloska

Yeah I believe so. I can’t see this on my local environment, but I’ve been able to replicate the above issue by just enabling publisher on production, the spike in connections would go through the roof (max_connections) within minutes (the traffic would be pretty small too.). I’ve been monitoring the processes on the db (RDS Aurora, 2 x t3.medium instances) setup and it seems like 95% of the connections are null/sleep (I guess not closed, just taking space) … Any idea what could cause massive number of unclosed connections?

#5

Mark Mikloska

Also I updated all modules to latest versions.

#6

BoldMinded (Brian)

I haven’t heard of similar issues in the 6+ years Publisher has existed. It may start happening after Publisher is installed b/c yes, it will perform more queries, but it doesn’t necessarily mean Publisher is at fault. I’ve seen sites with 500+ queries load fine. I still feel like this is a server config issue. In fact, a few weeks ago I accidentally created a loop and a page was executing 2000+ queries and it loaded (slowly, but it loaded) without any connection issues. If I were you I would perform some basic tests. Create a query, put it inside of while() statement and run it 500+ times to see what happens. Maybe make the query fetch a random entry to ensure query caching isn’t being used.

Login to reply