Back

[SOLVED] operation timeout on function execution

  • 0
  • Functions
Chris
21 Sep, 2023, 17:00

Let me try logging the keys

TL;DR
Someone had a problem with an operation timeout on function execution. They discovered it was a firewall issue and needed to add rules for appwrite to allow all traffic on their appwrite ports. They disabled the ufw firewall and the functions executed successfully.
VincentGe
21 Sep, 2023, 17:01

I'm guessing it times out either because there's a path for your function to end without returning, or somehow your function takes a long time to run (I doubt it)

Chris
21 Sep, 2023, 17:26

I confirmed the api key and project are correct, i also tried hard coding them and not getting them from env but still it doesn't work

Chris
21 Sep, 2023, 17:27

The error seems like an SDK connection to the database or something.

VincentGe
21 Sep, 2023, 17:32

@Christy Jacob Might wanna take a look here

VincentGe
21 Sep, 2023, 17:33

Does the request work outside an Appwrite function?

VincentGe
21 Sep, 2023, 17:33

Like if you ran this PHP function locally

VincentGe
21 Sep, 2023, 17:33

Trying to isolate where the issue is.

Drake
21 Sep, 2023, 17:49

you can try running curl http://45.76.46.20/v1/health/version from your server and then from inside your runtime container. you might have a firewall problem

Chris
21 Sep, 2023, 17:53

Hi Steven let me try this

Chris
21 Sep, 2023, 17:57

I ge the response as {"version":"1.4.3"}

Drake
21 Sep, 2023, 18:07

you executed this from the server? What about inside the runtime container?

Chris
21 Sep, 2023, 18:29

@Steven I think you are right, if i curl inside the runtime container the request takes too long then finally timeout.

Drake
21 Sep, 2023, 18:30

It's probably a firewall problem. Try to disable your firewall just to test

Chris
21 Sep, 2023, 18:30

So what can the workaround be to this problem.

Chris
21 Sep, 2023, 18:30

Firewall inside the linux server right ?

Chris
21 Sep, 2023, 18:31

Alright, thanks let me try.

Chris
21 Sep, 2023, 18:43

Thanks @Steven after disabling the ufw firewall now my functions executes :appwritefire:

Drake
21 Sep, 2023, 19:18

ok now that you've confirmed that's the problem. the solution would be to turn on firewalls again, but add rules for appwrite to allow all traffic on your appwrite ports (by default that would be 80 and 443)

Chris
21 Sep, 2023, 19:27

Oky got it

VincentGe
21 Sep, 2023, 19:37

🀣 This is a new one

Drake
21 Sep, 2023, 20:12

[SOLVED] operation timeout on function execution

Chris
22 Sep, 2023, 03:21

πŸ˜…πŸ˜…

Chris
22 Sep, 2023, 04:01

I struggled for two days luckly @Steven saved meπŸ˜€

Christy Jacob
22 Sep, 2023, 12:40

You got us worried since we'd just completed the migrations and thought we broke something!

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