Hello Alessandro!
Yes, I'm using the DB for the DataStore on several of our test-instances. It
seems to work so far without any problems.
We're using MySQL.
My DataStore is configured like this:
<DataStore class="org.apache.jackrabbit.core.data.db.DbDataStore">
<param name="driver" value="javax.naming.InitialContext"/>
<param name="url" value="java:comp/env/jdbc/magnoliaAuthorDS"/>
<param name="databaseType" value="mysql"/>
<param name="schemaObjectPrefix" value="ds_" />
</DataStore>
Note that I am using a JNDI-Datasource configured in tomcat's
GlobalNamingResources.
In Order for this setup to work well, I needed to change 2 mysqld
configurations (in my.ini):
max_allowed_packet = 32M
max_connections = 200
Max-Connections needed to go up, since I use the DB for all parts of the
repository (FileSystems, PersistenceManagers, DataStore, also for Versioning,
etc...). I found that one Magnolia Server (Public+Author) was using >80
connections (and there was no load on this server).
Max-Allowed-Packet needs to be set to 32M (or larger) if you're going to move
the DataStore into the DB. Basically, this setting imposes a hard limit on the
maximum "file size" you will be able to upload to the repository. Setting it to
32M means that approximately 32M is then the limit for any one Data-Element in
the repository.
This limit can become a problem for DMS-content (large images or video-files
for example), but especially for the packager module, if you use that.
Regards from Vienna,
Richard
-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[email protected]]
Im Auftrag von Alessandro Vicari
Gesendet: Mittwoch, 09. Februar 2011 00:31
An: Magnolia User-List
Betreff: Re: [magnolia-user] Magnolia 4.4 + MySQL clustering
Thank you guys, I was able to make it work too.
Does anyone use a database for Datastore instead of NFS?
Another question (unfortunately I haven't found anything about that in the
technical docs):
which is the best way to have a 3 layer servers structure? (author ->
public-stage -> public-production in cluster) Is it posibile to add 2
subscribers (stage and production) and let the author choose which target to
use when activate? Or is it possibile to add an action on the author to push
into production what it's on stage?
Thanks again for your help!
Alex
2011/2/8 Michele <[email protected]>:
>
>
> 2011/2/7 Dertinger, Matthew <[email protected]>
>>
>> For the shared Datastore, I've accomplished this in the past my
>> having an NFS mount on my second second server that points to the
>> datastore on my first server. If you haven't already done so, it's a
>> good idea to set ${magnolia.repositories.home} to a location outside
>> of your webapp, to do so, open up
>> WEB-INF/config/magnoliaPublic/magnolia.properties and edit the
>> magnolia.reposities.home property, it should be something like the
>> following:
>>
>> # set to a value outside the webapp to not loose the data on
>> redeploys
>> magnolia.repositories.home=/usr/local/magnolia-repos/public/repositor
>> ies
>
> Many thanks, now my cluster is working correctly, with any error or
> exception in logs!
> I tried the solution you proposed for the shared Datastore, but it
> didn't work for me.
> I think this is because if you redefine ${magnolia.repositories.home}
> by editing WEB-INF/config/magnoliaPublic/magnolia.properties, it
> modifies also ${wsp.home} that appears in
> jackrabbit-bundle-mysql-search-pub1.xml and
> jackrabbit-bundle-mysql-search-pub2.xml as follows:
>
> <SearchIndex
> class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
> <param name="path" value="${wsp.home}/index" />
> .....
> </SearchIndex>
>
> In this way you share the search indexes of the two public instances
> in the cluster, that I think must be private.
> I solved removing the line above in
> WEB-INF/config/magnoliaPublic/magnolia.properties and defining shared
> repository in jackrabbit-bundle-mysql-search-pub1.xml and
> jackrabbit-bundle-mysql-search-pub2.xml as follows:
>
> <DataStore
> class="org.apache.jackrabbit.core.data.FileDataStore">
> <!-- <param name="path" value="${rep.home}/repository/datastore"/>
> -->
> <param name="path" value="/magnolia-repos"/>
> <param name="minRecordLength" value="1024"/>
> </DataStore>
>
> Where /magnolia-repos is an NFS share on the same machine who hosts
> the MySQL db (not which one who runs the author and public instances,
> nor the one who runs the clustered public instance, in my case).
> Hope this could be helpful to someone.
>
>
> I still have the cluster id in an "unset" state, as you can see in
> catalina.out:
>
> 2011-02-08 12:13:21,981 INFO
> info.magnolia.jackrabbit.ProviderImpl : Loading repository
> at
> /var/lib/tomcat/apache-tomcat-6.0.30/webapps/magnoliaAuthor/repositori
> es/magnolia
> (config fil
> e:
> /var/lib/tomcat/apache-tomcat-6.0.30/webapps/magnoliaAuthor/WEB-INF/co
> nfig/repo-conf/jackrabbit-bundle-mysql-search.xml)
> - cluster id: "<unset>"
>
> But, as I said, it seems that everything is working properly. Could I
> ignore this INFO?
>
>
> Many thanks again for your help, guys!
> Bye.
>
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------