🐛 Bug Report: Curl error after 30 seconds even if limit is set to 300 · Issue #6328 · appwrite/appwrite · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I created a JAVA-18.0 function that should work for a couple of minutes. It depends on the third party API and waiting for it to complete. The timeout of function is set to 300.
But after ~35 seconds the functions fails with a php internal error.
An internal curl error has occurred within the executor! Error Msg: Connection reset by peer\nError Code: 500
To reproduce the issue just need to create new java function with a sleep for 90 seconds.
packageio.openruntimes.java.src;
importio.openruntimes.java.RuntimeContext;
importio.openruntimes.java.RuntimeOutput;
importjava.util.HashMap;
importio.appwrite.Client;
publicclassMain {
// This is your Appwrite function// It's executed each time we get a requestpublicRuntimeOutputmain(RuntimeContextcontext) throwsException {
Thread.sleep(90000);
HashMap<String, Object> json = newHashMap<>();
json.put("motto", "Build Fast. Scale Big. All in One Place.");
json.put("learn", "https://appwrite.io/docs");
json.put("connect", "https://appwrite.io/discord");
json.put("getInspired", "https://builtwith.appwrite.io");
// `context.getRes().json()` is a handy helper for sending JSONreturncontext.getRes().json(json);
}
}
👍 Expected behavior
Function should run as long as configured in the timeout parameter.
👎 Actual Behavior
Function fails after ~35 seconds
🎲 Appwrite version
Version 1.4.x
💻 Operating system
Linux
🧱 Your Environment
No response
👀 Have you spent some time to check if this issue has been raised before?
it is fresh install of 1.4.3 (not an update from previous versions)
I gues it can be the java related issue, I have no time to invetigate it for now and compare with nodejs. But I thinking the webserver implementation can stuck in case when block statment like sleep or another io call was used. In this case curl will down by connect timeout.
hi @stnguyen90, for now I using the event trigger for documents and cron schedule. Also I switched to the native client what I created by swagger-codegen tool.
But the issue still present I can't run function longer than 30 seconds, after that the php fails by the Curl error (Connection reset by peer).
Actually it looks like a timeout in the middle, maybe the http server or something else.
Could you explain how the connection done betwen the appwrite and fucntion http? Is it works via internal connection or use public api endpoint? I use the Appwrite behind Cloudflare, maybe it is can be the issue.
Uh oh!
There was an error while loading. Please reload this page.
👟 Reproduction steps
Hi!
I created a
JAVA-18.0
function that should work for a couple of minutes. It depends on the third party API and waiting for it to complete. The timeout of function is set to 300.But after ~35 seconds the functions fails with a php internal error.
To reproduce the issue just need to create new java function with a sleep for 90 seconds.
👍 Expected behavior
Function should run as long as configured in the timeout parameter.
👎 Actual Behavior
Function fails after ~35 seconds
🎲 Appwrite version
Version 1.4.x
💻 Operating system
Linux
🧱 Your Environment
No response
👀 Have you spent some time to check if this issue has been raised before?
🏢 Have you read the Code of Conduct?
The text was updated successfully, but these errors were encountered: