Back

An internal curl error has occurred within the executor!

  • 0
  • Functions
  • Cloud
Matej
27 Sep, 2023, 21:01

An internal curl error has occurred within the executor! Error Msg: Http invalid protocol\nError Code: 500

This is the error I just got while executing my function. There's no other error or log, and no idea where this happened or why.

Anyone got any ideas?

TL;DR
User is experiencing an internal curl error while running a function. The function is supposed to create documents in 4 collections but only partially succeeds and throws the error. User has some questions about the duration of the function, the version of Appwrite they are using, and the value of a specific environment variable. The user confirms that the function was working fine yesterday and wonders if there is something wrong with the code. Another user suggests checking if the code works outside the function. There is a suggestion that the function may have timed out due to a cap on the execution time. The user mentions that they have set the timeout to 120 seconds.
Matej
27 Sep, 2023, 21:06

It is supposed to create about 1800 documents or something like that, through 4 collections.

It only partially creates them, like some collections get documents, some are empty, and that error occurs.

Curious why would it happen because exec time is set to 120 seconds and it was working just finr yesterday..

Drake
27 Sep, 2023, 21:09

Some questions:

  1. how long does it run for?
  2. What version of Appwrite are you on?
  3. What is your _APP_FUNCTIONS_MAINTENANCE_INTERVAL env var set to?
Matej
27 Sep, 2023, 21:09

It is in cloud so it's 1.4.3 it runs for about 30-33 seconds _APP_FUNCTIONS_MAINTENANCE_INTERVAL what is this?

Matej
27 Sep, 2023, 21:13

@Steven

Matej
27 Sep, 2023, 21:14

If you are able to see some other logs in the cloud Here's project ID 651097a3dacb8d5a5c5e And function ID 6510ac4b1043e0009acb

Drake
27 Sep, 2023, 21:28

oh cloud. nvm

Drake
27 Sep, 2023, 21:29

how much time between executions? What exactly is the execution history?

Matej
27 Sep, 2023, 21:30

Message I sent is the only execution log

Drake
27 Sep, 2023, 21:30

does it fail consistently?

Matej
27 Sep, 2023, 21:30
Drake
27 Sep, 2023, 21:31

maybe something is wrong with the function code?

Matej
27 Sep, 2023, 21:31

I wouldn't know at this point because all utilities that generate collections have same code . And they were working yesterday

Matej
27 Sep, 2023, 21:31

But I will double check I guess 🀷

Matej
27 Sep, 2023, 21:32

I'll have to pick this up tomorrow

Matej
28 Sep, 2023, 08:36

@Steven

Quick update.

I just ran my function without doing any changes to it.

It now added users, added collections, but added 0 documents and failed with the same error.

Yesterday it added 800+ documents in 2 collections, out of 4.

So It is safe to assume that my code isn't wrong after all?

VincentGe
28 Sep, 2023, 14:29

It works outside a function yah?

VincentGe
28 Sep, 2023, 14:29

I think it's literally just timed out

VincentGe
28 Sep, 2023, 14:29

πŸ˜…

VincentGe
28 Sep, 2023, 14:29

I think we cap functions to no longer than x number of seonds

VincentGe
28 Sep, 2023, 14:29

@Meldiron

VincentGe
28 Sep, 2023, 14:29

What's our cap?

Matej
28 Sep, 2023, 14:29

But I added 120s to the timeout

VincentGe
28 Sep, 2023, 14:30

Where did you set the timeout

VincentGe
28 Sep, 2023, 14:30

If it's self-hosted, there's 2 locations

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