Back

Create attribute returns 500 internal server error

  • 0
  • Databases
obiwanzenobi
22 Aug, 2023, 18:34

Logs from appwrite docker:

TypeScript
[Error] URL: /v1/databases/:databaseId/collections/:collectionId
[Error] Type: Appwrite\Extend\Exception
[Error] Message: Collection with the requested ID could not be found.
[Error] File: /usr/src/code/app/controllers/api/databases.php
[Error] Line: 848
[Error] Timestamp: 2023-08-22T18:32:28+00:00
[Error] Method: GET
[Error] URL: /v1/databases/:databaseId/collections/:collectionId
[Error] Type: PDOException
[Error] Message: Table definition has changed, please retry transaction
[Error] File: @swoole-src/library/core/Database/PDOStatementProxy.php
[Error] Line: 64
[Error] Timestamp: 2023-08-22T18:32:29+00:00
[Error] Method: GET
[Error] URL: /v1/databases/:databaseId/collections
[Error] Type: PDOException
[Error] Message: Table definition has changed, please retry transaction
[Error] File: @swoole-src/library/core/Database/PDOStatementProxy.php
[Error] Line: 64
[Error] Timestamp: 2023-08-22T18:32:29+00:00
[Error] Method: GET
[Error] URL: /v1/databases/:databaseId/collections
[Error] Type: PDOException
[Error] Message: Table definition has changed, please retry transaction
[Error] File: @swoole-src/library/core/Database/PDOStatementProxy.php
[Error] Line: 64
[Error] Timestamp: 2023-08-22T18:32:29+00:00
[Error] Method: POST
[Error] URL: /v1/databases/:databaseId/collections/:collectionId/attributes/string
[Error] Type: PDOException
[Error] Message: There is already an active transaction
[Error] File: @swoole-src/library/core/Database/PDOProxy.php
[Error] Line: 43
TL;DR
The error is caused by a missing collection in the database. The table definition has changed, causing a transaction error. There is already an active transaction. Solution: Add the missing collection to the database and retry the transaction.
obiwanzenobi
22 Aug, 2023, 18:34

createAttribute error: Failed to initialize: AppwriteException: general_unknown, Server Error (500)

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