Hi David,

You should really wait for Jackrabbit to shut down cleanly, since otherwise you 
might get a corrupted repository.

Normally, Jackrabbit shuts down within seconds. Is Jackrabbit taking much 
longer than this (many seconds or even minutes)?

If yes, it sounds to me like you are maybe running into troubles with your 
connection management in combination with mysql:

Jackrabbit manages its own connection pooling. If you are using Jackrabbit will 
obtain up to 50 connections from the underlying datasource, and not release 
them the way a normal app would.

This has several implications:


1.       You should avoid using a datasource with "connection pooling". Specify 
"com.mysql.jdbc.jdbc2.optional.MysqlDataSource" instead of the normal (pooled) 
DBCP Datasource if you are using tomcat. Something like this:

<Resource name="jdbc/magnoliaAuthorDS " auth="Container"
                type="com.mysql.jdbc.jdbc2.optional.MysqlDataSource"
                factory="com.mysql.jdbc.jdbc2.optional.MysqlDataSourceFactory"
                user="Magnolia" password=" ****" 
driverClassName="com.mysql.jdbc.Driver"
                explicitUrl="true" 
url="jdbc:mysql://localhost:3306/magnolia_author1"/>


2.       If you do use a shared datasource, for whatever reason, disable idle 
connection recovery. Jackrabbit keeps many idle connections (this is not an 
error) and if the container reclaims them jackrabbit will have problems.


3.       Unless your instance is a busy production instance, some jackrabbit 
connections will lie around idle for a long time. mysql will close idle 
connections after a configurable time interval. This is especially a problem 
with development instances, which see no traffic at all overnight (while the 
developer is sleeping, or partying ;-) ). By the next morning, mysql has closed 
all of jackrabbit's connections. When shutting jackrabbit down, these closed 
connections cause very large delays as jackrabbit tries to close them again, 
and spends time recovering from the error. Our development instances were 
taking up to 5 minutes to shut down because of this.
The solution: change the parameters "wait_timeout" and "interactive_timeout" in 
your mysql configuration.

Regards from Vienna,

Richard



Von: [email protected] [mailto:[email protected]] 
Im Auftrag von Toniolo, David
Gesendet: Donnerstag, 29. Dezember 2011 16:57
An: [email protected]
Betreff: [magnolia-user] Configure Persistance Manager to force disconnection 
on shutdown

Hi Magnolians,

i have Magnolia running as a regular webapp but as a webapp component within 
Ofbiz which is the "master" application. This means when i stop the Ofbiz 
instance the Magnolia instance will be stopped as well by Ofbiz.

Magnolia is configured with a MySQL Backend. JackRabbit manages the 
connections. So, when i stop Ofbiz it takes a long long time until JackRabbit 
gives the connections free and Magnolia (and finally Ofbiz) can shutdown 
correctly.

Is there a configuration mechanism in PersistanceManager to "force 
disconnection" when Magnolia is shutting down?


Best regards,
David

________________________________
----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: 
<[email protected]<mailto:[email protected]>>
----------------------------------------------------------------


----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to