PX Forums demoYou are browsing as a visitor. Try it as: Member · Moderator · AdminOne click, no password. All changes are reset every night at 03:45 CET.
Skip to content

"Database connection lost" appears a few times a day

Log in
Replies
8
Voices
6
Views
445
Last activity
Score 0
Omar Haddad Topic starter Helper367 karma46 posts · Joined Dec 2026

It lasts a minute and then everything works again. My host says nothing is wrong.

Choose a reaction
Reply

8 answers

Score 7
Priya Nair Expert878 karma62 posts · Joined Dec 2026
Solution

Ask your host for the value of wait_timeout and max_connections. A short wait_timeout closes idle connections, and a spike in traffic (or a heavy cron job) can use up all connections. Two things on your side help:

  • Turn on persistent connections off (they can pile up) and keep the page cache on.
  • Move heavy scheduled tasks away from peak hours.

If it only happens at the same minute every hour, look at the scheduled tasks screen.

Choose a reaction
Reply
  • Small addition: after changing this, clear the cache once.

    – Omar Haddad
Score 1
Sofia Ricci Helper759 karma59 posts · Joined Dec 2026

If your host has a PHP error log, look there as well. The Lumen log only shows what Lumen caught.

Choose a reaction
Reply
Score 1
Amara Diallo Helper475 karma52 posts · Joined Dec 2026

Does it happen for every user or only when you are logged in as admin?

Choose a reaction
Reply
Score 0
Sam O'Connor Member114 karma32 posts · Joined Dec 2026

I had the same on 2.3 and it went away after updating the theme. Which theme are you using?

Choose a reaction
Reply
Score 0
Lucas Meyer Expert852 karma57 posts · Joined Dec 2026

+1, I see it too since the last update. @demo-sam, is this known?

Choose a reaction
Reply
Score 0
Priya Nair Expert878 karma62 posts · Joined Dec 2026

Thank you all. It was a plugin conflict. I disabled it and everything is fine again.

Choose a reaction
Reply
Score 0
Sofia Ricci Helper759 karma59 posts · Joined Dec 2026

@demo-sofia ↗:

If your host has a PHP error log, look there as well. The Lumen log only shows what Lumen caught.

Good idea. Also disable all plugins once, to rule them out.

Choose a reaction
Reply
Score 0
Lucas Meyer Expert852 karma57 posts · Joined Dec 2026

This sounds like a memory limit. Raise memory_limit to 256M for a test and see.

Choose a reaction
Reply