Back

Function freezes everything

  • 0
  • Self Hosted
  • Functions
Binyamin
7 Jul, 2023, 23:54

Hahah πŸ‘

TL;DR
The user is experiencing issues with their functions freezing randomly. They suspect it may be due to high memory usage, but are uncertain. The error message they received is related to InfluxDB. Suggestions are made to check the docker network availability, turn off usages in the `.env` file, and check for any other errors. The user later confirms that redeploying the same function without modifications solves the issue. They are advised to check docker stats and the main Appwrite logs in the future.
D5
7 Jul, 2023, 23:54

Just deployed a function, seems to have been failed, and everything got freezed

Binyamin
7 Jul, 2023, 23:55

Next time I recommend to check docker stats And main appwrite logs. As freezing usually means that the Appwrite workers crashed.

D5
7 Jul, 2023, 23:56

Yes, deploying again the same function without making modifications, and magically it works now

D5
7 Jul, 2023, 23:57

So I can confirm, thanks for solving it with your magic wand πŸ˜†

Binyamin
7 Jul, 2023, 23:57

πŸ˜‚

D5
7 Jul, 2023, 23:58

[SOLVED] Function freezes everything

D5
12 Jul, 2023, 19:09

Seelms this happened again with other different function

D5
12 Jul, 2023, 19:09

Function freezes everything

D5
12 Jul, 2023, 19:11

The error I get on sentry: Query has failed: Request failed! curl_errno: 28

D5
12 Jul, 2023, 19:11

file

/usr/src/code/vendor/influxdb/influxdb-php/src/InfluxDB/Client.php

line

196

trace

#0 /usr/src/code/vendor/influxdb/influxdb-php/src/InfluxDB/Database.php(78): InfluxDB\Client->query('telegraf', 'SELECT sum(valu...', Array) #1 /usr/src/code/src/Appwrite/Usage/Calculators/TimeSeries.php(476): InfluxDB\Database->query('SELECT sum(valu...') #2 /usr/src/code/src/Appwrite/Usage/Calculators/TimeSeries.php(528): Appwrite\Usage\Calculators\TimeSeries->syncFromInfluxDB('users.$all.requ...', Array, Array) #3 /usr/src/code/app/tasks/usage.php(132): Appwrite\Usage\Calculators\TimeSeries->collect() #4 /usr/src/code/vendor/utopia-php/cli/src/CLI/Console.php(208): {closure}() #5 /usr/src/code/app/tasks/usage.php(137): Utopia\CLI\Console::loop(Object(Closure), 30) #6 /usr/src/code/vendor/utopia-php/cli/src/CLI/CLI.php(233): {closure}() #7 /usr/src/code/app/cli.php(32): Utopia\CLI\CLI->run() #8 {main}

D5
12 Jul, 2023, 19:12

Tags: code-0 environment-production level-error logger-usage-release1.3.7 transaction-sync_metric_users.$all.requests.read_influxdb verboseType-InfluxDB\Exception

D5
12 Jul, 2023, 19:13

not sure why InfluxDB freezes everything

D5
12 Jul, 2023, 19:14

This seems like a bug, the worst part is that It happens randomly, so there are not any specific steps to follow

D5
12 Jul, 2023, 19:48

So now it's freezing again

D5
12 Jul, 2023, 19:48

Seems like it's happening more frequently than usual

D5
12 Jul, 2023, 19:53

Now seems like a faulty dart function freezes everything. I think that should not happen πŸ€”

Binyamin
12 Jul, 2023, 20:56

Is this actually happened in the same time as the freezing?

Can you confirm that it doesn't happened before (or after) and that you don't have any instance of that same error in InfluxDB in other times?

As what I think this error could be is that your docker network is some how not available for the internal services, such as the usage worker as the error is actually Query has failed: Request failed! curl_errno: 28

Also, it might be worth checking if you're getting that error when you're turnings usages off in the .env file - which can be something that you don't want to do.

Last, can you check and share any other errors from all Appwrite containers so we can try to get the big picture πŸ‘

D5
12 Jul, 2023, 21:03

The error showed when everything unfreezes

D5
12 Jul, 2023, 21:03

In other words, after unfreezing

D5
12 Jul, 2023, 21:04

When it's freezed, no error is being shown

Binyamin
12 Jul, 2023, 21:06

In any of the containers?

D5
16 Jul, 2023, 20:33

So apparently, as Binyamin supposed, it's due to high memory usage

D5
14 Sep, 2023, 11:08

Update on this. It stills happen and randomly it freezes and other times not. Some times it fails to compile the function and other times not. I don't think it's related to memory

D5
14 Sep, 2023, 11:16

Even if I try to deploy 3 functions at the same time it never reaches 100% usage. Only at random times

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