[MAGNOLIA-3594] performance issues on querying DMS repository Created: 10/Mar/11  Updated: 11/Mar/11  Resolved: 11/Mar/11

Status: Closed
Project: Magnolia
Component/s: core
Affects Version/s: 4.4.2
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Jurjen de Groot Assignee: Philipp Bärfuss
Resolution: Outdated Votes: 0
Labels: jackrabbit, performance
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Ubuntu 10.04.2 LTS 64 bits
tomcat 6.0.24-2ubuntu1.6
mysql-server 5.1.41-3ubuntu12.10


Attachments: Zip Archive threaddump-annexum-test-2.tdump.zip    
Template:
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   

For a project we are querying the DMS for relevant documents, but when we are simulating a request by only 15 users at the same time the server's processor usage goes up to 100%. And all new requests are put on hold while the requests are waiting for the previous requests to be handled.

We ran a thread dump including an analyzer. The dump is included as an attachment.

Looking at the dump we can see that calling info.magnolia.module.dms.beans.Document.isDocument() takes a long time and subsequent threads are being blocked waiting for the call to end.

In the isDocument method jackrabbit is being accessed and that is where it hangs.

Our config file holds the following settings for the persistancemanager:

<PersistenceManager class="org.apache.jackrabbit.core.persistence.db.SimpleDbPersistenceManager">
<param name="driver" value="com.mysql.jdbc.Driver" />
<param name="url" value="jdbc:mysql://mydb" />
<param name="schema" value="mysql" /><!-- warning, this is not the schema name, it's the db type -->
<param name="user" value="***" />
<param name="password" value="***" />
<param name="schemaObjectPrefix" value="${wsp.name}_" />
<param name="externalBLOBs" value="false" />
</PersistenceManager>



 Comments   
Comment by Philipp Bärfuss [ 11/Mar/11 ]

As far I can see the problem is that you use SimpleDbPersistenceManager. This makes jackrabbit requesting the database for each and every property. As the PresistanceManager synchronizes all the accesses this blocks the other threads.

You should use BundleDbPersistenceManager. In case you are a customer please open a support ticket to get more detailed instructions.

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