[MAGNOLIA-4456] Leftover Jackrabbit thread after shutdown. Created: 26/Jun/12  Updated: 10/Mar/21  Resolved: 10/Mar/21

Status: Closed
Project: Magnolia
Component/s: core
Affects Version/s: 4.4.8, 4.5.3
Fix Version/s: 4.5.x

Type: Bug Priority: Neutral
Reporter: Danilo Ghirardelli Assignee: Unassigned
Resolution: Outdated Votes: 1
Labels: jackrabbit
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File ContentRepository.java.patch    
Issue Links:
Relates
relates to MAGNOLIA-6353 (Database) sessions are kept alive af... Closed
relation
is related to MGNLOBS-14 Leftover threads when unregistering l... Closed
Template:
Patch included:
Yes
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

When shutting down Jackrabbit repositories, at least in the 1.6 version of Jackrabbit, Magnolia leaves the Transient File Reaper thread active without apparent reason.
Restarting the app a few times without restarting the application server will leave a bunch of these threads open, thus wasting the thread pool.

The attached patch simply shuts down the TransientFileFactory after the repositories shutdown.

There is a note on the shutdown method that left me a little doubt: obviously repositories are started by the webapp itself and the method is called just after the repo shutdown, but I have no idea on how to check that the TransientFileFactory was loaded within the webapp classloader... Are there Magnolia configuration in which this is not true? Is it really possible to add a check?



 Comments   
Comment by Danilo Ghirardelli [ 27/Jun/12 ]

A little note: this thread is started only when using DatabaseFileSystem, so you probably won't see anything wrong in your local environment but you might have problems in production where these kind of configurations are more common.

Comment by Milan Divilek [ 10/Jul/12 ]

Thanks for reporting the issue Danilo.

Comment by Edgar Vonk [ 13/Apr/15 ]

Hi guys, any news on this issue at all? We also noticed this issue (Magnolia 5.3.7) I guess since we are using the Jackrabbit DB file system.

Comment by Richard Gange [ 10/Mar/21 ]

Cont'd on MAGNOLIA-6353

Generated at Mon Feb 12 03:55:57 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.