Deployed Function Not Executing Child Process for Video Conversion
- 0
- Self Hosted
- Functions
- Databases
- Storage
I'm encountering an issue with my video conversion function. Locally (using the appwrite-cli) the function works as expected, including spawning a child process to convert video files. However, after deployment on my server (Appwrite 1.6.0), the function only creates the document and does not execute the child process to start the conversion.
Details:
- **Local Behavior: ** When run locally via appwrite-cli, the function successfully spawns a child process (using Node's
child_process) to convert videos into different sizes. The function logs and conversion progress work fine. - Deployed Behavior: After deploying the function, the document is created as expected, but it appears that the child process is not being executed on the server. All permissions are set correctly (even trying ANY CRUD), so I suspect an environment limitation or configuration issue.
- ** Execution Time Limit:** The function's execution time is limited to 900 seconds. I am using the background process to offload the conversion, ensuring the user does not have to wait. Unfortunately, due to the use of
child_process, I cannot retrieve logs from the spawned process for debugging.
Questions:
- Is there a known limitation or special configuration required for using child_process in deployed Appwrite functions?
- Is it possible to inspect or retrieve logs from within the Docker container running the function — additionally mounting the temporary folder — to better diagnose the issue?
- Are there any recommended workarounds or best practices for running long-running background tasks (child processes) in a deployed Appwrite environment?
For your reference, I have documented the function and provided all relevant files in my GitHub repository: https://github.com/Vanillabacke/appwrite-cargoose-function
Thank you for your help!
Recommended threads
- Is permission changes tied to the column...
Hi, I'm evaluating appwrite for a project and through reading the documentation (I haven't coded/tested anything yet, just trying to have a grasp of the basic f...
- Functions in cloud console not works
please advise as all of my runing functions on Appwrite console was working before , but now it give this error [Invalid `headers` param: Value must be a valid...
- Cannot migrate from Supabase
Hi, I was trying to migrate from Supabase to the Appwrite database. My database had around 190K columns. I tried it twice. Both times, after 2 days, the proce...