Replies: 1 comment
-
Split the pool into smaller chunks for each of the workers and initialize it within onWorkerStart, and / or each of the custom (Swoole's) Process which you may create. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I was recently pondering about correct or optimal place to initialize DB Pool when the
worker_num
is greater than one. And because I couldn't find any answer I thought I'm gonna ask here. So where is best to do it? Before the HTTP Server starts, with the full pool being available "globally"? Or maybe split the pool into smaller chunks for each of the workers and initialize it withinWorkerStart
?Beta Was this translation helpful? Give feedback.
All reactions