An exception occurred in the persistence layer

Hello!
When I complete a task with REST API (POST /task/{id}/complete) sometimes I get an error:

An exception occurred in the persistence layer. Please check the server logs for a detailed message and the entire exception stack trace.

I check Camunda logs and I see this stack trace:
camunda-679c9d54bf-tghfh (1).log (20.9 KB)

Did someone have a similar problem? As a quick workaround, I do several retries to send API requests. It kinda works but it’s a really bad idea to solve a problem this way.

PS: I use Camunda 7.15.0 (docker image camunda-bpm-platform:tomcat-7.15.0) and PostgreSQL 12.3 if It’s important.