Back

[Solved] An internal curl error Http invalid protocol

  • 0
  • Self Hosted
  • Flutter
  • Databases
  • Functions
Runpace
18 Dec, 2023, 18:30

yes I did

TL;DR
The issue was with an internal curl error related to an invalid protocol. One solution suggested was to break down the task into smaller executions instead of importing a large number of documents at once. Another suggestion was to increase the max concurrent requests. It was also mentioned that logging too much could cause the function to fail. The user confirmed that increasing the max concurrent requests fixed the issue. One user raised the same issue but did not mention any fix.
Runpace
18 Dec, 2023, 18:31

before then I was setting them manually

ideclon
18 Dec, 2023, 18:32

Are the Documents actually created?

Runpace
18 Dec, 2023, 18:33

weirdly yes

Runpace
18 Dec, 2023, 18:33

but not all

ideclon
18 Dec, 2023, 18:35

Wait, I should have remembered this, sorry.

ideclon
18 Dec, 2023, 18:36

I think you might be logging too much - there's a limit as to how much the logs can handle, and if you try to exceed that limit, the Function will fail.

Runpace
18 Dec, 2023, 18:37

actually this really might be the case I just found a contex.log in my loop

ideclon
18 Dec, 2023, 18:37

Or it might be too much returned? Not certain

punti_z
18 Dec, 2023, 18:38
Runpace
18 Dec, 2023, 19:01

and it fixed it

Drake
18 Dec, 2023, 19:01

This is too long. break your function down so it finishes faster. the longer a function runs, the more likely it will be to be killed because it hasn't finished successfully recently

Runpace
18 Dec, 2023, 19:01

it was the logs

Drake
18 Dec, 2023, 19:02

I still suggest cutting down your function, though

Runpace
18 Dec, 2023, 19:02

oh yeah I already did

Runpace
18 Dec, 2023, 19:02

maxConcurrentRequests is 100

Runpace
18 Dec, 2023, 19:02

20 min execution time

Drake
18 Dec, 2023, 19:02

this is too long

Runpace
18 Dec, 2023, 19:03

I will try increasing

Drake
18 Dec, 2023, 19:04

you might be able to increase the max concurrent requests a bit, but your whole function design overall can be improved to break down the task such that you execute the function more times and the execution time each time is less

Runpace
18 Dec, 2023, 19:05

I kinda already do this functions suppose to run once after initial installation after that I have a function that calls every minute to get new and updated data

Drake
18 Dec, 2023, 19:05

For example, instead of importing 50k documents in 1 execution, import 5k in 1 execution and execute it 10 times

Runpace
18 Dec, 2023, 19:07

yeah that makes sense

Runpace
18 Dec, 2023, 19:07

Thank you guys so much for the help!

Runpace
18 Dec, 2023, 19:08

[Solved] An internal curl error Http invalid protocol

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