Components loading twice while starting OFBiz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Components loading twice while starting OFBiz

Yash Sharma
Hi Dev,

I was looking at some components loading twice while starting OFBiz.
While digging it deep down I found CatalinaContainer calls loadWebapps
which creates a future task which depends on numbers of System cores.
If web app mounts are not available it removes all and adds again all Apps
Mounts which submits all task to future. Which creates a condition where

1) if 2 cores are available task some task is added to the future pool
twice.
2) if 4 cores are available only task one task is added to the future pool
twice.

(These values totally depend on system speed and number of cores available
but the point is slow system will submit few task more than once and faster
vice versa)

I am looking around this piece of code and trying to resolve this problem
if someone else has gone through this please let me know.


Thanks & Regards,
--
*Pradhan Yash Sharma*
*HotWax Systems* | www.hotwaxsystems.com
Reply | Threaded
Open this post in threaded view
|

Re: Components loading twice while starting OFBiz

taher
Hello Yash,

I've made a full refactoring exercise of the CatalinaContainer a while
ago, however I don't think that work altered the behavior. Perhaps
this is an existing bug (not sure).

Either way, I'm familiar with that code and if you'd like to open a
JIRA I can try to help out. I never liked the whole logic for loading
webapps, so this might be a good time to fix the bug and improve the
logic in this class.

On Fri, Oct 6, 2017 at 3:57 PM, Yash Sharma
<[hidden email]> wrote:

> Hi Dev,
>
> I was looking at some components loading twice while starting OFBiz.
> While digging it deep down I found CatalinaContainer calls loadWebapps
> which creates a future task which depends on numbers of System cores.
> If web app mounts are not available it removes all and adds again all Apps
> Mounts which submits all task to future. Which creates a condition where
>
> 1) if 2 cores are available task some task is added to the future pool
> twice.
> 2) if 4 cores are available only task one task is added to the future pool
> twice.
>
> (These values totally depend on system speed and number of cores available
> but the point is slow system will submit few task more than once and faster
> vice versa)
>
> I am looking around this piece of code and trying to resolve this problem
> if someone else has gone through this please let me know.
>
>
> Thanks & Regards,
> --
> *Pradhan Yash Sharma*
> *HotWax Systems* | www.hotwaxsystems.com
Reply | Threaded
Open this post in threaded view
|

Re: Components loading twice while starting OFBiz

Yash Sharma
Hello Taher,

Thanks for your quick response, I am a big fan of your work for that. Yes
this behaviour exists in 14.12 also, I have created JIRA ticket for that
OFBIZ-9827 <https://issues.apache.org/jira/browse/OFBIZ-9827>.

Thanks & Regards,
--
*Pradhan Yash Sharma*
*HotWax Systems* | www.hotwaxsystems.com

On Fri, Oct 6, 2017 at 10:57 PM, Taher Alkhateeb <[hidden email]
> wrote:

> Hello Yash,
>
> I've made a full refactoring exercise of the CatalinaContainer a while
> ago, however I don't think that work altered the behavior. Perhaps
> this is an existing bug (not sure).
>
> Either way, I'm familiar with that code and if you'd like to open a
> JIRA I can try to help out. I never liked the whole logic for loading
> webapps, so this might be a good time to fix the bug and improve the
> logic in this class.
>
> On Fri, Oct 6, 2017 at 3:57 PM, Yash Sharma
> <[hidden email]> wrote:
> > Hi Dev,
> >
> > I was looking at some components loading twice while starting OFBiz.
> > While digging it deep down I found CatalinaContainer calls loadWebapps
> > which creates a future task which depends on numbers of System cores.
> > If web app mounts are not available it removes all and adds again all
> Apps
> > Mounts which submits all task to future. Which creates a condition where
> >
> > 1) if 2 cores are available task some task is added to the future pool
> > twice.
> > 2) if 4 cores are available only task one task is added to the future
> pool
> > twice.
> >
> > (These values totally depend on system speed and number of cores
> available
> > but the point is slow system will submit few task more than once and
> faster
> > vice versa)
> >
> > I am looking around this piece of code and trying to resolve this problem
> > if someone else has gone through this please let me know.
> >
> >
> > Thanks & Regards,
> > --
> > *Pradhan Yash Sharma*
> > *HotWax Systems* | www.hotwaxsystems.com
>
Reply | Threaded
Open this post in threaded view
|

Re: Components loading twice while starting OFBiz

taher
Hello Yash

Great, we'll continue this discussion in OFBIZ-9827. Thank you for your
kind words.

On Oct 7, 2017 7:25 AM, "Yash Sharma" <[hidden email]> wrote:

Hello Taher,

Thanks for your quick response, I am a big fan of your work for that. Yes
this behaviour exists in 14.12 also, I have created JIRA ticket for that
OFBIZ-9827 <https://issues.apache.org/jira/browse/OFBIZ-9827>.

Thanks & Regards,
--
*Pradhan Yash Sharma*
*HotWax Systems* | www.hotwaxsystems.com

On Fri, Oct 6, 2017 at 10:57 PM, Taher Alkhateeb <[hidden email]
> wrote:

> Hello Yash,
>
> I've made a full refactoring exercise of the CatalinaContainer a while
> ago, however I don't think that work altered the behavior. Perhaps
> this is an existing bug (not sure).
>
> Either way, I'm familiar with that code and if you'd like to open a
> JIRA I can try to help out. I never liked the whole logic for loading
> webapps, so this might be a good time to fix the bug and improve the
> logic in this class.
>
> On Fri, Oct 6, 2017 at 3:57 PM, Yash Sharma
> <[hidden email]> wrote:
> > Hi Dev,
> >
> > I was looking at some components loading twice while starting OFBiz.
> > While digging it deep down I found CatalinaContainer calls loadWebapps
> > which creates a future task which depends on numbers of System cores.
> > If web app mounts are not available it removes all and adds again all
> Apps
> > Mounts which submits all task to future. Which creates a condition where
> >
> > 1) if 2 cores are available task some task is added to the future pool
> > twice.
> > 2) if 4 cores are available only task one task is added to the future
> pool
> > twice.
> >
> > (These values totally depend on system speed and number of cores
> available
> > but the point is slow system will submit few task more than once and
> faster
> > vice versa)
> >
> > I am looking around this piece of code and trying to resolve this
problem
> > if someone else has gone through this please let me know.
> >
> >
> > Thanks & Regards,
> > --
> > *Pradhan Yash Sharma*
> > *HotWax Systems* | www.hotwaxsystems.com
>