Aborted connection to db. Got an error reading communication packets

Hi! I have the following problem. Photoprism container exited with no errors in log. But in mariadb container I see the following log:
3 [Warning] Aborted connection 3 to db: 'photoprism' user: 'photoprism' host: '' (Got an error reading communication packets).
I increased the max_allowed_packet parameter to the maximum value of 1024M, but this helped temporarily. The error reappeared after some time.
In the indexed directory, I have large video files of 10GB or more.
How to solve the problem of connecting photoprism to mariadb?
Why is photoprism sending such large packets to the database?
Why are there no errors in the photoprism logs?

We apologize for the wait while we were out of the office.

Such MariaDB/MySQL errors may indicate that PhotoPrism has dropped the existing connection in order to start a new one (the intervals for this can be configured). In your case, you might see this error because the photoprism service was terminated, e.g. after hitting a memory limit, especially if this happened while indexing large image or video files.

Configuring a few GB of swap space usually helps in this case. You can also limit the maximum file size and the number of indexing workers, or exclude certain file types if that doesn’t help.

We also recommend that you take a look at our checklists for help with troubleshooting fatal server errors:

1 Like