maps icon indicating copy to clipboard operation
maps copied to clipboard

[WIP] [Bug]: sorry, too many clients already | 5000+ photos

Open Copilot opened this issue 3 months ago • 0 comments

Thanks for assigning this issue to me. I'm starting to work on it and will keep this PR's description up to date as I form a plan and make progress.

Original issue description:

⚠️ This issue respects the following points: ⚠️

Bug description

I am experiencing postgresql errors related to the number of connected clients and my Nextcloud instance become unresponsive (db connection missing for other tasks).

image

I think the error is related to the requests that are made to retrieve photos data from the db. I have 5000+ photos that have to be shown on the map so the connection towards the db is saturated.

Steps to reproduce

  1. Go to /apps/maps/
  2. Wait to load
  3. Error

Expected behavior

Load images without DB error.

Installation method

Official Docker image

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.0

Web server

Apache (supported)

Database engine version

PostgreSQL

Is this bug present after an update or on a fresh install of the server?

None

Is this bug present after an update or on a fresh install of the app?

None

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

  • [X] Default user-backend (database)
  • [ ] LDAP/ Active Directory
  • [ ] SSO - SAML
  • [ ] Other

Configuration report

v24.0.7

List of activated Apps

Different apps, the problem appears only when I try to load the map page

Nextcloud Signing status

No response

Nextcloud Logs

Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[08006] [7] FATAL: sorry, too many clients already

Browser Console

No response

Additional info

No response

Fixes #897.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot avatar Sep 08 '25 09:09 Copilot