#Function Timed Out During Cold Start?

100 messages · Page 1 of 1 (latest)

spring widget
#

Function timed out during cold start.\nError Code: 400

spring widget
#

randomly super simple function gets Function timed out during cold start.

It just counts documents in the collection using an offset, but if it's gonna error it should error like a man

#

I have 50 workers enabled

spring widget
#

upgraded executor to 0.5.7, will report back

spring widget
#

@radiant sun ```
Internal curl errors has occurred within the executor! Error Number: 6. Error Msg: Could not resolve host: 66b78e23d04a0\nError Code: 500

#

now this instead of cold start

spring widget
#

@radiant sun

Successfully removed exc1-65e61e3a6f3bfee5dac4-669a90b3df369f01ffae
Skipping runtimes stats loop due to error: Docker Error: EOF
EOF
EOF
EOF
EOF
EOF
EOF
EOF
EOF
EOF
Successfully removed exc1-65e61e3a6f3bfee5dac4-669a95c4e6dfc83d91ac
#

causing my executor to die

#

or something

radiant sun
spring widget
#

my functions are still failing when being used a lot, but

#

also, the upgrade to 1.6 could fix it

spring widget
#
Successfully removed exc1-65e61e3a6f3bfee5dac4-669a9427dc6fa7bfcafa
[Error] Type: Exception
[Error] Message: Internal curl errors has occurred within the executor! Error Number: 104. Error Msg: Connection reset by peer
[Error] File: /usr/local/app/http.php
[Error] Line: 1073
[Error] Type: Exception
[Error] Message: Internal curl errors has occurred within the executor! Error Number: 6. Error Msg: Could not resolve host: 66ccf403df0ac
[Error] File: /usr/local/app/http.php
[Error] Line: 1073
[Error] Type: Exception
[Error] Message: Internal curl errors has occurred within the executor! Error Number: 6. Error Msg: Could not resolve host: 66ccf403df0ac
[Error] File: /usr/local/app/http.php
[Error] Line: 1073
[Error] Type: Exception
[Error] Message: Internal curl errors has occurred within the executor! Error Number: 6. Error Msg: Could not resolve host: 66ccf403df0ac
[Error] File: /usr/local/app/http.php
[Error] Line: 1073
Skipping runtimes stats loop due to error: Docker Error: EOF
[Error] Type: Exception
[Error] Message: Internal curl errors has occurred within the executor! Error Number: 104. Error Msg: Connection reset by peer
[Error] File: /usr/local/app/http.php
[Error] Line: 1073
Skipping runtimes stats loop due to error: Docker Error: EOF
[Error] Type: Exception
[Error] Message: Internal curl errors has occurred within the executor! Error Number: 104. Error Msg: Connection reset by peer
[Error] File: /usr/local/app/http.php
[Error] Line: 1073
#

@radiant sun so it looks like some of the extra workers failed or whatever these are

#
Preparing for start ...

Starting ...
Segmentation fault (core dumped)
#

I wonder if it's because I am running WSL2

#

so maybe the internal proxies bounce around the request

radiant sun
spring widget
spring widget
radiant sun
spring widget
#

copy, oh the wsl was an accidental mention, that’s in the duplicate function deployment idea thread but put it in here accidentally

spring widget
#

@radiant sun

Running maintenance task ...
Maintanance task finished.
Running maintenance task ...
Maintanance task finished.
Running maintenance task ...
Maintanance task finished.
Running maintenance task ...
Maintanance task finished.
Running maintenance task ...
Maintanance task finished.
Running maintenance task ...
Maintanance task finished.
Running maintenance task ...
Maintanance task finished.
Running maintenance task ...
Maintanance task finished.
Running maintenance task ...
Maintanance task finished.
Running maintenance task ...
Maintanance task finished.
Running maintenance task ...
Maintanance task finished.
[Error] Type: Exception
[Error] Message: Internal curl errors has occurred within the executor! Error Number: 104. Error Msg: Connection reset by peer
[Error] File: /usr/local/app/http.php
[Error] Line: 1073
[Error] Type: Exception
[Error] Message: Internal curl errors has occurred within the executor! Error Number: 110. Error Msg: Operation timed out
[Error] File: /usr/local/app/http.php
[Error] Line: 1073
[Error] Type: Exception
[Error] Message: Internal curl errors has occurred within the executor! Error Number: 6. Error Msg: Could not resolve host: 66d201e16937b
[Error] File: /usr/local/app/http.php
[Error] Line: 1073
Running maintenance task ...
Maintanance task finished.
[Error] Type: Exception
[Error] Message: Internal curl errors has occurred within the executor! Error Number: 6. Error Msg: Could not resolve host: 66d201e16937b
[Error] File: /usr/local/app/http.php
[Error] Line: 1073
Skipping runtimes stats loop due to error: Docker Error: EOF

got some new ones

radiant sun
spring widget
# radiant sun Can you get this with timestamps. That said, connection reset by peer typicall...

hm, then how do I stop that from happening?

2024-08-30T16:56:57.583946800Z Running maintenance task ...
2024-08-30T16:56:57.585047860Z Maintanance task finished.
2024-08-30T17:55:40.016740023Z [Error] Type: Exception
2024-08-30T17:55:40.016770481Z [Error] Message: Internal curl errors has occurred within the executor! Error Number: 104. Error Msg: Connection reset by peer
2024-08-30T17:55:40.016823370Z [Error] File: /usr/local/app/http.php
2024-08-30T17:55:40.016888092Z [Error] Line: 1073
2024-08-30T17:56:25.004575223Z [Error] Type: Exception
2024-08-30T17:56:25.004612623Z [Error] Message: Internal curl errors has occurred within the executor! Error Number: 110. Error Msg: Operation timed out
2024-08-30T17:56:25.004619996Z [Error] File: /usr/local/app/http.php
2024-08-30T17:56:25.004679679Z [Error] Line: 1073
2024-08-30T17:56:46.981708717Z [Error] Type: Exception
2024-08-30T17:56:46.981751697Z [Error] Message: Internal curl errors has occurred within the executor! Error Number: 6. Error Msg: Could not resolve host: 66d201e16937b
2024-08-30T17:56:46.981781944Z [Error] File: /usr/local/app/http.php
2024-08-30T17:56:46.981901470Z [Error] Line: 1073
2024-08-30T17:56:57.583151560Z Running maintenance task ...
2024-08-30T17:56:57.584279813Z Maintanance task finished.
2024-08-30T17:58:28.763531273Z [Error] Type: Exception
2024-08-30T17:58:28.763568834Z [Error] Message: Internal curl errors has occurred within the executor! Error Number: 6. Error Msg: Could not resolve host: 66d201e16937b
2024-08-30T17:58:28.763580817Z [Error] File: /usr/local/app/http.php
2024-08-30T17:58:28.763687156Z [Error] Line: 1073
2024-08-30T18:00:22.340294083Z Skipping runtimes stats loop due to error: Docker Error: EOF
2024-08-30T18:00:22.340330743Z 
2024-08-30T18:56:57.583738362Z Running maintenance task ...
2024-08-30T18:56:57.589786967Z Maintanance task finished.
spring widget
#

that's 4 times today I've had to restart it

radiant sun
radiant sun
spring widget
#

it's not launched yet

radiant sun
spring widget
#

It only fails on small images

radiant sun
spring widget
#

It normally runs for 0.5-5s, depending on image size

radiant sun
#

What version executor?

spring widget
#

1.5.8 and 0.5.7 I believe

spring widget
#

you had me upgrade my executor to try and fix it, and it did fix the cold start stuff

#

but this one keeps popping up

radiant sun
spring widget
#

I don't need to, I can see it's running in portainer

#

it has the status right next to it

radiant sun
spring widget
#

ohhhhhhh

#

one sec

#

I don't see it anywhere

radiant sun
spring widget
#

it's 100% not memory related

radiant sun
spring widget
#

that doesn't make sense though

#

I have 32 gigs of ram on this thing, and only 3 appwrite functions, and 20 users total, all of whom are in the company and are not actively testing it, && we have 0 memory limit set for functions

#

it's dying on a cold start and just reporting errors, I don't think RAM actually has anything to do with it

#

unless there's an artificial cap

radiant sun
spring widget
radiant sun
spring widget
#

hm, well it's happening on multiple systems, not just this one, but both are on 1.5.8

spring widget
#

so basically @radiant sun what I've figured out

#

is if I have the function open in the console, it happens

spring widget
#

So currently deploying a 10 MB ( I know it's big ) function in typescript, and getting internal curl error 104

radiant sun
spring widget
#

normal

radiant sun
spring widget
# radiant sun timestamp?

lemme restart appwrite and see if I can get it to go down again, I think that was a docker update auto-initiated

spring widget
#

is it possible because I have the _APP_WORKERS_NUM set to 50 that's doing something?

#

maybe 3 are picking it up at the same time lol I'm really not sure

radiant sun
spring widget
#

@radiant sun got another

Preparing for start ...

Starting ...
Segmentation fault (core dumped)

this was in the cold start

#

DM'd you inspect of the dead container

radiant sun
#

I wonder if the seg fault was from docker or bun 🧐

spring widget
#

Has the runtime been updated past 1.0?

#

It's on like 1.22 now

spring widget
#

@radiant sun is it possible at all that it's because the Appwrite service is started by Portainer? Like would it possibly be caused by some sort of permission issue with it not being able to start the container with bun specifically?

I've had other functions like Python and others deployed for months now and they have never once failed, but Bun fails almost every time on cold boot

subtle tundra
spring widget
spring widget
#

@radiant sun so I just deployed a Nodejs function... no duplicate functions, no executor errors

#

@void flax I don't know exactly how to replicate it, but I can give you a function that always ends up failing for me if you want, either way I can confirm the bun runtime is effed

rain canopy
#

Are you logging many things?

#

Hmmm the latest time I've seen a similar error was when trying to run an ubuntu server virtualbox VM with Dart. It was just not running, probably due to docker issues with the machine 🤔

spring widget
rain canopy
#

Are you using some kind of virtualisation, etc?

spring widget
#

32 gb ram, 4 cpu's, etc.

#

portainer, same env as running it on its own, just my own traefik proxy instead

#

I am currently trying to get my function to build in an Appwrite function container, but it's unfortunately 17 MB lmao