[ 
https://issues.apache.org/jira/browse/KARAF-4748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15544720#comment-15544720
 ] 

Guillaume Nodet edited comment on KARAF-4748 at 10/4/16 8:28 AM:
-----------------------------------------------------------------

I'm not questionning the fact that you have too many threads started.
But in a typical run of Karaf, the resolver from the FeaturesService is usually 
only used once (and that's only when starting from a clean state, i.e. it 
should not even run at all if you're restarting a karaf), while the resolver 
from the felix framework itself, is usually run multiple times.

The creating thread for those threads is "FelixStartLevel" which is controlled 
by the felix framework, so I suspect the problem is in the resolver used by the 
felix framework and not the one used by karaf in the FeaturesService.



was (Author: gnt):
I'm not questionning the fact that you have too many threads started.
But in a typical run of Karaf, the resolver from the FeaturesService is usually 
only used once (and that's only when starting from a clean state, i.e. it 
should not even run at all if you're restarting a karaf), while the resolver 
from the felix framework itself, is usually run multiple times.

Also, the felix framework never launches more that one thread named 
"FelixStartLevel", so the screenshots you have showing dozens of such threads 
look very suspicious to me.  I suspect you have multiple frameworks running at 
the same time.


> Make Felix Resolver Threads configurable
> ----------------------------------------
>
>                 Key: KARAF-4748
>                 URL: https://issues.apache.org/jira/browse/KARAF-4748
>             Project: Karaf
>          Issue Type: Bug
>            Reporter: Fabian Lange
>         Attachments: Screen Shot 2016-10-03 at 20.13.47.png, Screen Shot 
> 2016-10-04 at 09.25.48.png, Screen Shot 2016-10-04 at 09.26.04.png, Screen 
> Shot 2016-10-04 at 09.26.17.png, Screen Shot 2016-10-04 at 09.27.45.png, 
> Screen Shot 2016-10-04 at 09.28.20.png, Screen Shot 2016-10-04 at 
> 09.28.50.png, Screen Shot 2016-10-04 at 09.30.14.png, Screen Shot 2016-10-04 
> at 09.31.16.png
>
>
> It was requested in https://issues.apache.org/jira/browse/FELIX-5247 to make 
> the resolver threads configurable to avoid creating many threads by karaf.
> It turns out Felix already has that feature, but Karaf is not using it:
> https://github.com/apache/karaf/blob/karaf-4.0.x/features/core/src/main/java/org/apache/karaf/features/internal/osgi/Activator.java#L119
> Resolver resolver = new ResolverImpl(new Logger(Logger.LOG_INFO));
> I propose to configure and supply an Executor with the desired threads. As 
> additional up, this prevents situations where there are unnecessary threads 
> created.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to