Back

Email verification Progmatically

  • 0
  • Users
  • Flutter
  • Accounts
Faisal7
6 Jun, 2023, 21:27

Ooh ok good to know thank you. What do you think about doing it through graphql endpoint would it be the same problem?

TL;DR
The user is experiencing slow function execution on their NAS. It is suggested that running functions simultaneously from the same client may be causing the issue, and enabling async or running them from different clients could help. The user also asks about running the appwrite instance in Kubernetes, to which it is mentioned that it is possible but may not necessarily solve the performance issue. It is advised to not put the API key client-side. Calling functions to perform the tasks is considered the safest way, although the user is unsure and wants to check the resources used by the containers. It is suggested that setting higher inactivity threshold or ensuring the runtime container already exists can
Drake
6 Jun, 2023, 21:39

yes, same problem

Drake
6 Jun, 2023, 21:40

if your function isn't being run very often, it could be killed due to inactivity and so the next time it gets executed again, it has to do a cold start which takes a little longer. warm starts (runtime container already exists) should be quick, though

Faisal7
9 Jun, 2023, 22:02

Sorry for my late reply’s Steven, but what do you mean by „runtime container already exists“

Drake
9 Jun, 2023, 22:03

If the runtime container doesn't need to be started up again, it will execute faster

Faisal7
9 Jun, 2023, 22:10

Ok and how to ensure that

Faisal7
9 Jun, 2023, 22:12

Can it be done by setting the restart policy of functions container or maybe also setting a container orchestration platform

Drake
9 Jun, 2023, 22:14

One thing you could do is set the inactivity threshold env variable to something higher

Faisal7
9 Jun, 2023, 22:17

Would it be enough to set it higher?

Faisal7
9 Jun, 2023, 22:18

Right now all the containers are running in my nas so could it also be somehow connected to the performance of my nas i mean if i put my Appwrite instance in a more performant server would it then make some differences?

Drake
9 Jun, 2023, 23:03

Maybe...hard for me to say. I would check the resources used by the containers to try and gauge that

Faisal7
11 Jun, 2023, 21:01

Ok so calling the function to do these tasks is the only and safest way?

Drake
11 Jun, 2023, 21:10

Not necessarily... Just don't put the API key client side

Faisal7
11 Jun, 2023, 21:13

Ok so what if when i put it in .env file

Drake
11 Jun, 2023, 21:14

As long as it doesn't end up client side

Faisal7
11 Jun, 2023, 21:23

Ok i inderstand

Faisal7
11 Jun, 2023, 21:31

Is it possible to run the appwrite instance in kubernetes? I know their is a possibility to run it in Docker Swarm bit can it be also run in kubernetes maybe running it in docker swarm or kubernetes will be fast enough

D5
11 Jun, 2023, 21:31

Not possible, also doesn't seems to be needed using kubernetes

D5
11 Jun, 2023, 21:35

Seems it's slow due to your hosting specs (usually home NAS don't come with powerful CPU and too many ram) but not sure

D5
11 Jun, 2023, 21:37

If you're running simultaneously functions from the same client, it will be needed ending/completing a function trigger before triggering another. If you want to run 2 simultaneously sent from the same client you should enable async. Note that if triggered from 2 different clients, they will run simultaneously by default

D5
11 Jun, 2023, 21:40

@Faisal7 approximately what are the specs of the NAS you're using? (Cores, threads, GHz, RAM)

Faisal7
11 Jun, 2023, 21:47

Yes i also taught so that due to my slow nas. The functions could also run a bit slower. It would be good if i bye some server for test and see the difference.

Faisal7
11 Jun, 2023, 21:51

I dont know but in my case it is like that. So with every user registration i call a function and for resetting a password another function. I dont know it could be simultinius and also not, depending on the user registration if many users somehow make a simultinius registration then yes, otherwise not. And the functions will be called from the same client everytime.

Faisal7
11 Jun, 2023, 22:07

I have this NAS https://www.synology.com/de-de/products/DS220+ and puted another 8 GB Ram by my self

Faisal7
11 Jun, 2023, 22:09

and the usage looks like this on my NAS

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