Back

[SOLVED] Cloud functions fail under little to moderate load

  • 0
  • Functions
nightwielder
25 Jun, 2023, 22:34

Yes I had it enabled!

TL;DR
The user updated to the latest version of Appwrite (1.4.4) and encountered an error stating that the domain is not connected to any Appwrite resource. They tried adding the domain in the Appwrite console but encountered certificate validation issues. The issue was solved by setting `_APP_DOMAIN_FUNCTIONS` as `appwrite-functions`. The user also had the `_APP_OPTIONS_FORCE_HTTPS` set to 'enabled' and disabling it resolved the issue.
nightwielder
25 Jun, 2023, 22:35

On it

Binyamin
25 Jun, 2023, 22:36
TypeScript
 if (App::getEnv('_APP_OPTIONS_FORCE_HTTPS', 'disabled') === 'enabled') { // Force HTTPS

The default is disabled so you can remove it altogether - in the new appwrite-functions container

nightwielder
25 Jun, 2023, 22:39

Removed and worked like charm.

Binyamin
25 Jun, 2023, 22:39

πŸ‘

nightwielder
25 Jun, 2023, 22:39

I can't thank you enough. You'll be remembered.

nightwielder
25 Jun, 2023, 22:40

So cool

Binyamin
25 Jun, 2023, 22:40

Glad it worked <a:ablobattention:492776678742032395>

nightwielder
25 Jun, 2023, 22:42

In the Appwrite console, from the duration column, I can see that it takes around the same amount of time as before during the execution. Is it normal or should it have taken less time?

Binyamin
25 Jun, 2023, 22:45

How complex is the function? If you don't cross the max workers in a given time then it should take the same, as this is just Appwrite.

The benchmarks that you can see in the issue are showing faster times when Appwrite is out of workers.

So if you have 10 concurrent connection, then you won't notice any different. But, if you more connection then your available workers - 12 in your case - then you'll see a significant changes - some time even crucial ones as you can see in the Benchmark table.

Binyamin
25 Jun, 2023, 22:46

What this semi-solution guarantee is that you'll never ran out of workers, and all of your request will be respected - maybe no in the same second but eventually - all of them will get execute.

nightwielder
25 Jun, 2023, 22:47

The function brings 20 posts. Then for each post, it also brings the user's information from another collection.

nightwielder
25 Jun, 2023, 22:48

That is all I need. I just don't want it to fail, that's all.

Binyamin
25 Jun, 2023, 22:48

Exactly

nightwielder
25 Jun, 2023, 22:49

Again, many many thanks to you. It's 5 AM in the morning and I feel so relieved.

Binyamin
25 Jun, 2023, 22:51

Thanks to this

Drake
26 Jun, 2023, 00:05

I would just do this client side πŸ˜…

Binyamin
26 Jun, 2023, 00:26

But what you do in case you need it to be done through a server sdk?

Drake
26 Jun, 2023, 11:56

Function then, ya

nightwielder
26 Jun, 2023, 13:10

[SOLVED] Cloud functions fail under little to moderate load

nightwielder
8 Oct, 2023, 21:31

Hello! Sorry to disturb you, @Binyamin I was using your tunneling method with great success. But I just updated Appwrite to the latest version, 1.4.4. Now I get an error that saysThis domain is not connected to any Appwrite resource yet. Please configure custom domain or function domain to allow this request., which is obviously implying http://appwrite-functions that I have in my functions. How do I fix it? I tried adding this domain in the Appwrite console but it can't seem to pass the certificate validations for obvious reasons.

nightwielder
8 Oct, 2023, 21:32

If anyone could help it'd be very awesome.

D5
8 Oct, 2023, 21:33

I think that's because the new changes in the new Appwrite functions

D5
8 Oct, 2023, 21:33

Binyaming will guide you better than me πŸ˜…

Binyamin
9 Oct, 2023, 13:35

Check this https://discord.com/channels/564160730845151244/1149007631223107665/1149330021777932398 You'll need to set the _APP_DOMAIN_FUNCTIONS as appwrite-functions

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