Hey so I’m trying to figure out how to have more than one worker per function, so I can run say 5 or 6 simultaneously, rather than one at a time. The reason I need to do this is I’m using AuthNet’s SDK and their API calls sometimes can take a second (literally) and my thought is if 200 users sign in that’s 50-200 seconds, depending on speed, is there anyway to speed it up or allocate more workers or can we add that as an env variable?
#Multiple Function Workers
11 messages · Page 1 of 1 (latest)
I think there was a workers per core env var, maybe that's related? 🤔
Yeah I don’t think that’s what it is, I asked Steven about that
you could try duplicating the appwrite-worker-functions service
So you guys have never tried it?
some community members have
and I presume that's how they did it?
I'm trying to achieve the same thing, and have successfully duplicated the appwrite-worker-functions container 1 time so I have 2 of them. However when I start 5 of these, some function executions complete successfully but some fail because of this error (which is logged by the openruntime-executor container:
[Error] Type: Exception
[Error] Message: Internal curl errors has occurred within the executor! Error Number: 110. Error Msg: Operation timed out
[Error] File: /usr/local/app/http.php
[Error] Line: 1072
I have set _APP_FUNCTIONS_CPUS to the default of 0 and _APP_WORKER_PER_CORE to the default of 6.
Any idea what would cause this issue? Or am I missing something here?
Screenshot of the function execution UI: