Error adding contacts or calendars - please help!


I wanted to change from a direct installation on my PI 4 to using docker on Ubuntu server on the PI. Before I exported all my calendars and contacts. If I try to import them, I get the following error:

2023-03-06 19:25:46 303 [Warning] Aborted connection 303 to db: 'nextcloud' user: 'ncadmin' host: 'localhost' (Got an error reading communication packets)

Also the Android App states: “Server is in maintenance mode” - but it is not.

Reloading the website leads to infinite loading of all calendars.
I could replicate the error also by manually creating events and adding contacts. It even happens when I switch back to a “bare-metall” installation.


Nextcloud version:
Operating system and version: Docker on Ubuntu 22.04.2 LTS (GNU/Linux 5.15.0-1024-raspi aarch64)

My data directory is on an external drive permanently mounted via fstab.
If you need more information, please tell my which and where I can find it. I am relatively new to nextcloud and a bit overwhelmed.

Hope someone can help me, I am dealing with the issue for weeks now and am starting to feel a little desperate…

the issue is with the database.
if you find your ststem in maintenance and the webpage tells you. You are sure apache or nginx is still working else the page would timeout.

hence you log states error-reading-communication-packets
right where it says lost connection to the database

this is a point where you must configure your database server to meet your needs.

google came with:

increase the max_allowed_packet and try again.

Thanks for the fast reply! I followed the instructions of the link you provided but unfortunately it didn’t help. The problem persists.

I tried with a fresh docker install today.
Adding a new event to the default calendar: no problem
Adding a new contact manually: no problem
Importing my saved contacts: At first no problem, after reboot infinite loading of birthday calendar and no contacts on Nextcloud
Importing my saved calendars: At first no problem, after reboot infinite loading of all calendars and no events visible

Could it be that my docker installation command is wrong or is there a problem with importing calendars and contacts? I used the following to create the docker container:

sudo docker run --detach --init --publish 4443:4443 --publish 443:443 --publish 80:80 --volume /media/dataDrive/nextcloudpi:/data --volume /media/backupDrive/nextcloudpi:/backup --restart unless-stopped -e NOBACKUP=true --name nextcloudpi ownyourbits/nextcloudpi $

I tried to import a manually created calendar via its .ics file as well. Did not work either, even with a fresh installation of nextcloudpi. Am I missing something? Does really no one face the same issue?

Now I set up Nextcloudpi again and have still the same problem. This is very frustrating. Is there no way to restore my calendar and contacts?

Could maybe someone try to replicate my problem or help me otherwise? I am quite new to nextcloud and have no idea how to solve the issue. This would be very kind! Thanks!