Address book entries added in Thunderbird are not fully snyced with Contacts app

Nextcloud version: 25.0.2
PHP version: 8.1.13
Shared hosting

Thunderbird verison: 102.6.1 (64-Bit)

I have an offline address book in Thunderbird with ~800 entries which I want to copy over to an address book in the cloud.

To achieve this I added a new address book in the Contacts app in Nextcloud and added it in Thunderbird as described in the manual. Then, I tried to copy over the entries from the old offline address book to the newly created address book in the cloud. This works fine in Thunderbird i.e. the old and the new address book have the same number of entries. When opening up the Contacts app in Nextcloud however, it turns out that only about a quarter of the entries (~250) were actually snyced to the cloud. Manually triggering a sync in Thunderbird doesn’t make a difference; neither does just waiting.

When I only copy over ~100 entries the same problem occurs: only about half of those are synced to the cloud (fewer than in the previous attempt).

Does anyone have an idea what’s going wrong or have any suggestions?

I have since taken a look at the error log. Trying to add the contacts in Thunderbird seems to trigger a lot of them but this one (which appears several times) seems the most relevant:

Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [1203] User *** already has more than 'max_user_connections' active connections

A SQL query ("SHOW GLOBAL VARIABLES LIKE “%connections%”) reveals that “max_user_connections” is set to 50 by my provider. I have asked them if they could lift that restriction for a couple of days but even if they do, that would only be a solution for me, not for anyone else coming across this problem.

So here are my questions:

  1. Do you think that this MySQL setting is likely to be the reason why adding more than just a few contacts fails?
  2. Is there something Nextcloud could do to resolve this? For example by adding a “Sync now” button in the interface and then staggering the database requests? Or is CardDAV set up such that the server is only aware of any clients that might be connected when they perform a request?