Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PoolInterface的initPool,worker进程是无法复用这些链接的,导致产生了很多无用的连接 #123

Open
jinand10 opened this issue Jul 18, 2019 · 2 comments

Comments

@jinand10
Copy link

No description provided.

@JanHuang
Copy link
Member

在同个worker里面使用的连接是同一个的,不同worker之间的连接是不通用的。也就是说,假如您开了8个worker,那么就会产生8个连接,而这8个连接仅服务与当前worker里面的业务使用

@jinand10
Copy link
Author

是这样的,假设开了10个worker,服务启动后, 我查看DB连接 已经初始化了30个连接,这些连接是无用的,每当有请求过来, 对应的worker会再初始化一次,不会去复用之前的那30个连接

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants