Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-6288

Apache Felix SCR Lock timeout

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • None

    Description

      The SCR timeout for obtaining the lock to create a component instance (state lock) is 5 secs. We ran into a case where this was not sufficient on embedded hardware. Clearly an activate method/constructor should not take this amount of time. However, while tracing this it was clear that this time included a large number of activate methods. If you have a set of lazy services in a dependency chain, and someone activates the top of the chain, all downstream activate methods will be running.

      The purpose of the 5 secs is imho to break deadlocks, there seems nothing to win by breaking an application because you only want to wait 5 secs. If an application takes too long to startup, it is far superior to let the application finish correctly than put it in an unknown state by failing the component creation.

      I suggest increasing the default timeout to something like 30sec. This will break deadlocks and should handle the 99,999% of the cases slowly but correctly.

      Attachments

        Activity

          People

            Unassigned Unassigned
            pkriens Peter Kriens
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: