I have a python runtime function that is making API calls to 3-4 external services, and the slowest of them can take about 15 seconds to respond.
This function can be called through the frontend quite often (I can have hundreds of simultaneous calls)
To simulate, I added a simple time.sleep(15) to a test function, and called this function execution x num of times in parallel.
Looks like the function cannot handle more than 4 (amount of cores in my instance) requests. i.e. at a time only 4 requests can be executed, which means the cores are tied up when this call is made, which is expected.
However, apparently I can't use await asyncio.sleep because python worker definition is not async.
This is quite different from node runtime. I added a sleep function there, and due to the nature of node event loop, it allowed me to execute 100 functions at once.
Looking for suggestions on how to improve this number in python runtime.
Recommended threads
- 1.8.1 - Databases - inline updating a ro...
When updating a database field via the inline edit method, the `$updatedAt` column does not get updated. Only if the row is updated by the "Update" interface (t...
- Function executions fail with cURL error...
Appwrite version: 1.8.0 Executor version: 0.11.4 Function runtime: Python 3.12 SELF-HOSTED Function executions that occur at the same moment as the executor's ...
- Github App "Failed to retrieve access to...
When trying to connect the Github App on 1.8.1 I recieve this error: ```[Error] Method: GET [Error] URL: /v1/vcs/github/callback [Error] Type: Exception [Error]...