Back

Function Timed Out During Cold Start?

  • 0
  • Self Hosted
  • Functions
ZachHandley
7 Aug, 2024, 22:32

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

TL;DR
Developers are encountering a "Connection reset by peer" error due to a function being killed during processing, often caused by incomplete successful runs. Ensure all functions complete successfully to prevent this error.
ZachHandley
8 Aug, 2024, 16:27

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

ZachHandley
8 Aug, 2024, 16:30

I have 50 workers enabled

ZachHandley
8 Aug, 2024, 17:04

upgraded executor to 0.5.7, will report back

ZachHandley
10 Aug, 2024, 16:14

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

ZachHandley
10 Aug, 2024, 16:15

now this instead of cold start

ZachHandley
23 Aug, 2024, 16:31

@Steven

TypeScript
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
ZachHandley
23 Aug, 2024, 16:31

causing my executor to die

ZachHandley
23 Aug, 2024, 16:33

or something

Steven
23 Aug, 2024, 19:34

These are logs for removing inactive runtimes

ZachHandley
23 Aug, 2024, 21:38

hm, I'll find the log then

ZachHandley
23 Aug, 2024, 21:38

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

ZachHandley
23 Aug, 2024, 21:38

also, the upgrade to 1.6 could fix it

ZachHandley
26 Aug, 2024, 21:38
TypeScript
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
ZachHandley
26 Aug, 2024, 21:41

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

ZachHandley
26 Aug, 2024, 21:42
TypeScript
Preparing for start ...

Starting ...
Segmentation fault (core dumped)
ZachHandley
26 Aug, 2024, 21:53

I wonder if it's because I am running WSL2

ZachHandley
26 Aug, 2024, 21:54

so maybe the internal proxies bounce around the request

Steven
27 Aug, 2024, 00:07

ooooh this tracks! sooo the containers crashed/exited due to memory problems (you can search online for that 139 exit code). This is problematic for Appwrite because Appwrite doesn't know the container doesn't exist anymore and still tries to send requests to the container, resulting in the "could not resolve host" error

ZachHandley
27 Aug, 2024, 01:10

Interesting, so it’s a memory overload error? Is it a setting or the host machine running out of memory?

Steven
27 Aug, 2024, 01:27

Could be either

ZachHandley
27 Aug, 2024, 03:48

Any way to up appwrite’s memory limit?

Steven
27 Aug, 2024, 03:49

There are some memory environment variables. Besides that, it would be system memory or docker settings or wsl settings

ZachHandley
27 Aug, 2024, 04:03

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

ZachHandley
30 Aug, 2024, 18:00

@Steven

TypeScript
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

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