Back

Migration from 1.5.5 to 1.5.7 fails with Fatal error during migrating Collection cache

  • 0
  • Self Hosted
Al
4 Aug, 2024, 21:17

Hello. I am using self-hosted 1.5.5 for a long time and wanted to upgrade to 1.5.7 and during Migrating Collection cache step I got this issue:

`Migrating Collection cache: 100 / 758

Fatal error: Uncaught Utopia\Database\Exception\Query: Invalid query: Invalid cursor: UID must contain at most 36 chars. Valid chars are a-z, A-Z, 0-9, and underscore. Can't start with a leading underscore in :0 Stack trace: #0 /usr/src/code/src/Appwrite/Migration/Migration.php(224): Utopia\Database\Database->find(Object(Utopia\Database\Document), Array) #1 /usr/src/code/src/Appwrite/Migration/Migration.php(174): Appwrite\Migration\Migration->documentsIterator('cache') #2 [internal function]: Appwrite\Migration\Migration->Appwrite\Migrationclosure}(Array, Array) #3 {main} thrown in Unknown on line 0`

My app poiting to appwrite backend seems to be working still, but I want to make sure the setup is still consistent in terms of data integrity, etc.

Thanks for any help with this.

TL;DR
Issue: Fatal error during migrating Collection cache from 1.5.5 to 1.5.7. Solution: Workaround by deleting all records from 1_cache and 1_cache_perms tables. More information and pointers provided in the comments.
Steven
4 Aug, 2024, 21:19

You can delete the records in your cache table as a workaround

Al
4 Aug, 2024, 21:30

Thanks, Steven. After looking at some related issues here and at github - could you give me any quick pointers on how to identify the right table/s and how to execute DELETE statements for them? I am familiar with databases but didn't touch this part of appwrite before.

Al
4 Aug, 2024, 21:34

Ok no worries, I found this - https://github.com/appwrite/appwrite/discussions/4957, so the only question which remains is how to identify right cache tables. Thx for any pointers.

Al
4 Aug, 2024, 21:41

OK, workaround completed, removed all records from 1_cache and 1_cache_perms, migration script succeeded. Thanks.

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