Skip to content
Back

Invalid document structure: Unknown attribute: "pingCount" after running appwrite migrate

  • 0
  • 1
  • Self Hosted
prisM
11 Nov, 2025, 21:59

I have a production server running Appwrite 1.7.4. I'm testing Appwrite 1.8.0 on a separate test server.

To transfer data from my 1.7.4 installation to 1.8, I followed this guide: https://appwrite.io/blog/post/how-to-back-up-your-appwrite-data

Specifically, I copied over the functions/uploads/builds volumes, and restored the database using the commands in the article. I am using the same .env files as well.

Everything works fine on the 1.8 installation until I run "docker compose exec appwrite migrate". After running the migrate command, I get this error when calling the ping endpoint:

TypeScript
[Error] Method: GET
[Error] URL: /v1/ping
[Error] Type: Utopia\Database\Exception\Structure
[Error] Message: Invalid document structure: Unknown attribute: "pingCount"
[Error] File: /usr/src/code/vendor/utopia-php/database/src/Database/Database.php
[Error] Line: 4896

And this error when updating the "services" within project settings:

TypeScript
[Error] Method: PATCH
[Error] URL: /v1/projects/:projectId/service
[Error] Type: Utopia\Database\Exception\Structure
[Error] Message: Invalid document structure: Unknown attribute: "pingCount"
[Error] File: /usr/src/code/vendor/utopia-php/database/src/Database/Database.php
[Error] Line: 4896

Before running appwrite migrate, both work fine.

TL;DR
Issue occurs after running appwrite migrate command, resulting in an "Invalid document structure: Unknown attribute: 'pingCount'" error when accessing the ping endpoint. Redis cache flushing is identified as the cause. Numerous discussions on Github without a clear resolution provided.
11 Nov, 2025, 22:01

See the below console output of the migration command. Before running, the ping endpoint works as expected. After migration, the ping endpoint returns 500:

12 Nov, 2025, 21:32

More info:

  1. Installing 1.7.4, restoring database, and then upgrading to 1.8.0 first doesn't resolve the issue
  2. The issue is not the migration command exactly. It's flushing redis cache.

The error can be replicated by restoring the database and then running

TypeScript
docker exec -it appwrite-redis redis-cli FLUSHALL

I opened an issue on Github. There are a number of discussions on this error without a satisfying resolution: https://github.com/appwrite/appwrite/issues/10810

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more