You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "jiang017 (via GitHub)" <gi...@apache.org> on 2024/08/13 10:35:20 UTC
[I] protocol线程池参数配置无效 [dubbo]
jiang017 opened a new issue, #14531:
URL: https://github.com/apache/dubbo/issues/14531
### Pre-check
- [X] I am sure that all the content I provide is in English.
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dubbo/issues?q=is%3Aissue) and found no similar issues.
### Apache Dubbo Component
Java SDK (apache/dubbo)
### Dubbo Version
Dubbo version: 3.1.1
Operating System version:Windows 10
Java version: 1.8
Spring Boot: 2.1.18
### Steps to reproduce this issue
如下图所示:
当添加如下配置时,只有iothreads配置是有效的,其余3个属性未生效,线程池依旧是CachedThreadPool。
dubbo.protocol.threadpool: fixed
dubbo.protocol.threads: 102
dubbo.protocol.corethreads: 11
dubbo.protocol.iothreads: 21

跟踪参数链路发现,在ConfigurableMetadataServiceExporter#buildServiceConfig进行了默认参数设置,最终导致配置失效。
为了使得上述配置生效,项目当前路径导入ConfigurableMetadataServiceExporter并重写buildServiceConfig方法。
对以下代码进行注释,线程池参数 及 类型,均正确,达到预期。
位置:ConfigurableMetadataServiceExporter#buildServiceConfig
``` java
threadParams.put(THREADPOOL_KEY, "cached");
threadParams.put(THREADS_KEY, "100");
threadParams.put(CORE_THREADS_KEY, "2");
```
### What you expected to happen
希望通过其它方式让线程池配置dubbo.protocol.threadpool 及 dubbo.protocol.threads 生效,而非以上代码重写(注释)的方式。
### Anything else
_No response_
### Are you willing to submit a pull request to fix on your own?
- [X] Yes I am willing to submit a pull request on my own!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] protocol线程池参数配置无效 [dubbo]
Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ closed issue #14531: protocol线程池参数配置无效
URL: https://github.com/apache/dubbo/issues/14531
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] protocol线程池参数配置无效 [dubbo]
Posted by "heliang666s (via GitHub)" <gi...@apache.org>.
heliang666s commented on issue #14531:
URL: https://github.com/apache/dubbo/issues/14531#issuecomment-2289039944
Hello, welcome to the dubbo community, please describe your problem in English
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] protocol线程池参数配置无效 [dubbo]
Posted by "jiang017 (via GitHub)" <gi...@apache.org>.
jiang017 commented on issue #14531:
URL: https://github.com/apache/dubbo/issues/14531#issuecomment-2292600806
> > Did you create a `ProtocolConfig` bean yourself, or are you not using `dubbo-spring-boot-starter` at all?
>
> I used dubbo spring boot starter with version 3.1.8 and have not made any custom beans for ProtocolConfig
I feel it's strange. As long as I delete the configuration of ConfigurableMetadataServiceExporter#buildServiceConfig-threadParams, everything will become normal and parameter dubbo.protocol.threads will take effect
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] protocol线程池参数配置无效 [dubbo]
Posted by "funky-eyes (via GitHub)" <gi...@apache.org>.
funky-eyes commented on issue #14531:
URL: https://github.com/apache/dubbo/issues/14531#issuecomment-2290898126
Did you create a `ProtocolConfig` bean yourself, or are you not using `dubbo-spring-boot-starter` at all?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] protocol线程池参数配置无效 [dubbo]
Posted by "jiang017 (via GitHub)" <gi...@apache.org>.
jiang017 commented on issue #14531:
URL: https://github.com/apache/dubbo/issues/14531#issuecomment-2292594878
> Did you create a `ProtocolConfig` bean yourself, or are you not using `dubbo-spring-boot-starter` at all?
I used dubbo spring boot starter with version 3.1.8 and have not made any custom beans for ProtocolConfig
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] protocol线程池参数配置无效 [dubbo]
Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ commented on issue #14531:
URL: https://github.com/apache/dubbo/issues/14531#issuecomment-2298455508
1. Please try on the latest version (3.2.x)
2. Please re-submit the issue in English if you still have any question.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] protocol线程池参数配置无效 [dubbo]
Posted by "laywin (via GitHub)" <gi...@apache.org>.
laywin commented on issue #14531:
URL: https://github.com/apache/dubbo/issues/14531#issuecomment-2295598123
In version 3.1.8, metadata export uses the internal cached thread pool configuration. Application-level service export uses your own thread pool configuration.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] protocol线程池参数配置无效 [dubbo]
Posted by "jiang017 (via GitHub)" <gi...@apache.org>.
jiang017 commented on issue #14531:
URL: https://github.com/apache/dubbo/issues/14531#issuecomment-2292594557
> 你是自己创造了一个豆子,还是你根本没有使用?`ProtocolConfig``dubbo-spring-boot-starter`
>
> 你是自己创造了一个豆子,还是你根本没有使用?`ProtocolConfig``dubbo-spring-boot-starter`
I used dubbo spring boot starter with version 3.1.8 and have not made any custom beans for ProtocolConfig
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org