I'm running a self-hosted instance of Appwrite integrated with Sentry to track errors. The following error trace is very frequent. Based on the trace, it seems like it is something related to createOrUpdateMetric
#1 /usr/src/code/vendor/utopia-php/database/src/Database/Database.php(2626): Utopia\Database\Adapter\MariaDB->createDocument('stats', Object(Utopia\Database\Document))
#2 /usr/src/code/src/Appwrite/Usage/Calculators/TimeSeries.php(439): Utopia\Database\Database->createDocument(Object(Utopia\Database\Document), Object(Utopia\Database\Document))
#3 /usr/src/code/src/Appwrite/Usage/Calculators/TimeSeries.php(521): Appwrite\Usage\Calculators\TimeSeries->createOrUpdateMetric('64f0d151afbeeea...', '2023-09-02T18:0...', '1h', 'users.$all.coun...', -1, 0)
#4 /usr/src/code/src/Appwrite/Usage/Calculators/TimeSeries.php(546): Appwrite\Usage\Calculators\TimeSeries->syncFromInfluxDB('users.$all.coun...', Array, Array)
#5 /usr/src/code/src/Appwrite/Platform/Tasks/Usage.php(53): Appwrite\Usage\Calculators\TimeSeries->collect()
#6 /usr/src/code/vendor/utopia-php/cli/src/CLI/Console.php(219): Appwrite\Platform\Tasks\Usage->Appwrite\Platform\Tasks\{closure}()
#7 /usr/src/code/src/Appwrite/Platform/Tasks/Usage.php(58): Utopia\CLI\Console::loop(Object(Closure), 30)
#8 /usr/src/code/src/Appwrite/Platform/Tasks/Usage.php(30): Appwrite\Platform\Tasks\Usage->action(Object(Utopia\Database\Database), Object(InfluxDB\Database), Object(Utopia\Registry\Registry), Object(Closure), Object(Closure))
#9 /usr/src/code/vendor/utopia-php/cli/src/CLI/CLI.php(320): Appwrite\Platform\Tasks\Usage->Appwrite\Platform\Tasks\{closure}(Object(Utopia\Database\Database), Object(InfluxDB\Database), Object(Utopia\Registry\Registry), Object(Closure), Object(Closure))
#10 /usr/src/code/app/cli.php(195): Utopia\CLI\CLI->run()
#11 {main}```
yes....we have problems with usage and have planned to release a rewrite.
related issue: https://github.com/appwrite/appwrite/issues/4751
Recommended threads
- [Beginner] CLI --queries Syntax Error & ...
Hi everyone! I am a beginner with Appwrite and trying to use the CLI, but I'm stuck with a syntax error. Any guidance would be greatly appreciated! 🙏 **Enviro...
- [SOLVED] curl error Number: 6 — function...
Hello, I invested a lot of time in this error in a fresh install of appwrite 1.8.1 and lasted until fix, this if for helping anyone that can have the same weird...
- general_bad_request when creating accoun...
I have created a new bug request, could anyone have a look - https://github.com/appwrite/appwrite/issues/11908?