Back

cloud functions performance

  • 1
  • Self Hosted
  • Functions
erikkamalov
29 Dec, 2023, 13:37

we are trying to enter production, but the incomprehensible behavior of the cloud function is very slowing us down.

TL;DR
The user is experiencing performance issues with their cloud functions in an Appwrite project. They are using 5 modules, but the app freezes and the project becomes unresponsive. They are using webhook methods to call their payment provider. There is no specific code provided for the function. The user is advised to check the docker logs using the command "docker compose logs openruntimes-executor" to gather more information. The user mentions using a bun and Node.js. They are also getting a 500 error, which may be due to a relationship issue. The user is advised to try Cloud hosting for better visibility and to detect problematic areas.
Eldad
29 Dec, 2023, 13:48

Is this happening on Cloud or self hosting?

Mosh Ontong
29 Dec, 2023, 14:06

idunno I am using the cloud

erikkamalov
29 Dec, 2023, 14:06

Self hosting, 16 gm ram, 500 ssd

erikkamalov
29 Dec, 2023, 14:06

6 cores

erikkamalov
29 Dec, 2023, 14:13

Performing a cloud function affects the operation of the entire system.

Eldad
29 Dec, 2023, 14:16

Well this can happen due to many factors. Just to name a few:

  1. Your apps traffic
  2. Your user usage pattern
  3. Specific function code
  4. Your runtime may need more resources

I would try to detect the problematic areas, which container is working harder, how is the server performing, are there any 500 errors from Appwrite?

You can also connect something like Sentry to Appwrite to get greater visibility on errors, or inspect your container logs.

Eldad
29 Dec, 2023, 14:17

If you don't have a specific reason to self host, you can also try Cloud, we can also have better visibility of your issues there.

erikkamalov
29 Dec, 2023, 14:20

This may be because of the use of relationship.

erikkamalov
29 Dec, 2023, 14:20

500 error

erikkamalov
29 Dec, 2023, 14:24

How we can listen to the logs of the rumtime function from the container? It does not show logs on the console.

erikkamalov
29 Dec, 2023, 14:26

You're using a bun?

Eldad
29 Dec, 2023, 14:36

You can do so by checking the docker logs. Each runtime spins a container.

Mosh Ontong
29 Dec, 2023, 15:03

bun and node js

D5
29 Dec, 2023, 17:27

Run docker compose logs openruntimes-executor

erikkamalov
29 Dec, 2023, 17:37

there is no detailed info here.

D5
29 Dec, 2023, 22:45

What's the function code?

D5
30 Dec, 2023, 12:53

And are you triggering it in sync or async?

erikkamalov
31 Dec, 2023, 06:07

Bun typescript

erikkamalov
31 Dec, 2023, 06:07

I don't quite understand what you mean.

erikkamalov
31 Dec, 2023, 06:09

for example my webhook module

ideclon
31 Dec, 2023, 06:43

What’s the code you’re using to trigger this Function?

erikkamalov
31 Dec, 2023, 06:46

webhook methods will call my payment provider

erikkamalov
31 Dec, 2023, 06:50

I have 5 modules, each of them performs its own function. But the problem is that the time lapse fails and the weight of the appwrite project freezes.

erikkamalov
31 Dec, 2023, 06:51

I don't use the trigger from appwrite console.

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