Forums de discussion
data cache problems
Marco Bolzan, modifié il y a 14 années.
data cache problems
Junior Member Publications: 47 Date d'inscription: 03/09/09 Publications récentes
On a production enviroment "pre-existing" we have installed SO 1.5b, we have two installation for clustering machine,
on the top a roundRobin and a cluster database, so we have two istances running on two different tomcat.
My problem is that I found data cache: when for example I edit from first machine admin profile,
when I open http://machine_A/web/admin/profile i see my edit, when I open http://machine_B/web/admin/profile I see old data!
Exist some cache of jdbc pool or from the point of view of resultset ?
Which are properties of Liferay to disable cache (any type of cache) ?
Thank a lot
Bolzan
I'm going on my research and I found "cluster configuration" in wiki.
but Social Offfice has ehcache or oscache ?
I try to apply these properties
but nothing changes..
Anyone have ever configured a cluster environment with SO ?
on the top a roundRobin and a cluster database, so we have two istances running on two different tomcat.
My problem is that I found data cache: when for example I edit from first machine admin profile,
when I open http://machine_A/web/admin/profile i see my edit, when I open http://machine_B/web/admin/profile I see old data!
Exist some cache of jdbc pool or from the point of view of resultset ?
Which are properties of Liferay to disable cache (any type of cache) ?
Thank a lot
Bolzan
I'm going on my research and I found "cluster configuration" in wiki.
but Social Offfice has ehcache or oscache ?
I try to apply these properties
hibernate.cache.provider_class=org.hibernate.cache.NoCacheProvider
hibernate.cache.use_query_cache=false
hibernate.cache.use_second_level_cache=false
but nothing changes..
Anyone have ever configured a cluster environment with SO ?
Jonas Yuan, modifié il y a 14 années.
RE: data cache problems
Liferay Master Publications: 993 Date d'inscription: 27/04/07 Publications récentes
Hi Marco Bolzan,
The SO (1.5b) is a special portal instance (that is 5.2.3). Thus the clustering settings would be same as that of the portal.
Simply adding the following lines in portal-ext.properties
Hope that it helps.
Jonas Yuan
-----------------
The Author of Liferay Books:
Liferay Portal 5.2 Systems Development
Liferay Portal Enterprise Intranets
The SO (1.5b) is a special portal instance (that is 5.2.3). Thus the clustering settings would be same as that of the portal.
Simply adding the following lines in portal-ext.properties
net.sf.ehcache.configurationResourceName=/ehcache/hibernate-clustered.xml
ehcache.multi.vm.config.location=/ehcache/liferay-multi-vm-clustered.xml
Hope that it helps.
Jonas Yuan
-----------------
The Author of Liferay Books:
Liferay Portal 5.2 Systems Development
Liferay Portal Enterprise Intranets
Marco Bolzan, modifié il y a 14 années.
RE: data cache problems
Junior Member Publications: 47 Date d'inscription: 03/09/09 Publications récentes
Sorry nothing change..
Please let me understand better, what's the meaning of those properties?
I also read to edit \data\jackrabbit\repository.xml with cluster configuration, is to do togheter with those properties or not?
Please let me understand better, what's the meaning of those properties?
I also read to edit \data\jackrabbit\repository.xml with cluster configuration, is to do togheter with those properties or not?
Jonas Yuan, modifié il y a 14 années.
RE: data cache problems
Liferay Master Publications: 993 Date d'inscription: 27/04/07 Publications récentes
Yes, adding clustering repository like following.
Thanks
Jonas Yuan
-----------------
The Author of Liferay Books:
Liferay Portal 5.2 Systems Development
Liferay Portal Enterprise Intranets
Adding one line in portal-ext.properties
and update repository.xml
Thanks
Jonas Yuan
-----------------
The Author of Liferay Books:
Liferay Portal 5.2 Systems Development
Liferay Portal Enterprise Intranets
Adding one line in portal-ext.properties
dl.hook.impl=com.liferay.documentlibrary.util.JCRHook
and update repository.xml
<!--?xml version="1.0"?-->
<repository>
<filesystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
<param name="driver" value="com.mysql.jdbc.Driver">
<param name="url" value="jdbc:mysql://localhost/jcr">
<param name="user" value="jcr">
<param name="password" value="jcr">
<param name="schema" value="mysql">
<param name="schemaObjectPrefix" value="J_R_FS_">
</filesystem>
<security appname="Jackrabbit">
<accessmanager class="org.apache.jackrabbit.core.security.SimpleAccessManager" />
<loginmodule class="org.apache.jackrabbit.core.security.SimpleLoginModule">
<param name="anonymousId" value="anonymous">
</loginmodule>
</security>
<workspaces rootPath="${rep.home}/workspaces" defaultWorkspace="liferay" />
<workspace name="${wsp.name}">
<persistencemanager class="org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager">
<param name="driver" value="com.mysql.jdbc.Driver">
<param name="url" value="jdbc:mysql://localhost/jcr">
<param name="user" value="jcr">
<param name="password" value="jcr">
<param name="schema" value="mysql">
<param name="schemaObjectPrefix" value="J_PM_${wsp.name}_">
<param name="externalBLOBs" value="false">
</persistencemanager>
<filesystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
<param name="driver" value="com.mysql.jdbc.Driver">
<param name="url" value="jdbc:mysql://localhost/jcr">
<param name="user" value="jcr">
<param name="password" value="jcr">
<param name="schema" value="mysql">
<param name="schemaObjectPrefix" value="J_FS_${wsp.name}_">
</filesystem>
</workspace>
<versioning rootpath="${rep.home}/version">
<filesystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
<param name="driver" value="com.mysql.jdbc.Driver">
<param name="url" value="jdbc:mysql://localhost/jcr">
<param name="user" value="jcr">
<param name="password" value="jcr">
<param name="schema" value="mysql">
<param name="schemaObjectPrefix" value="J_V_FS_">
</filesystem>
<persistencemanager class="org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager">
<param name="driver" value="com.mysql.jdbc.Driver">
<param name="url" value="jdbc:mysql://localhost/jcr">
<param name="user" value="jcr">
<param name="password" value="jcr">
<param name="schema" value="mysql">
<param name="schemaObjectPrefix" value="J_V_PM_">
<param name="externalBLOBs" value="false">
</persistencemanager>
</versioning>
<cluster id="node1" syncdelay="5">
<journal class="org.apache.jackrabbit.core.journal.DatabaseJournal">
<param name="revision" value="${rep.home}/revision">
<param name="driver" value="com.mysql.jdbc.Driver">
<param name="url" value="jdbc:mysql://localhost/jcr">
<param name="user" value="jcr">
<param name="password" value="jcr">
<param name="schema" value="mysql">
<param name="schemaObjectPrefix" value="J_C_">
</journal>
</cluster>
</repository>
Marco Bolzan, modifié il y a 14 années.
RE: cluster data cache problems
Junior Member Publications: 47 Date d'inscription: 03/09/09 Publications récentes
Sorry, but which are my variables in repository.xml ?
url, user, password, schema.. ok I know them
others? schemaObjectPrefix, syncDelay and id node cluster, what are these?
So, I edit my repository.xml in two machine and I add to both portal-ext.properties theese rows..
correct? others configurations ?
Thanks
url, user, password, schema.. ok I know them
others? schemaObjectPrefix, syncDelay and id node cluster, what are these?
So, I edit my repository.xml in two machine and I add to both portal-ext.properties theese rows..
net.sf.ehcache.configurationResourceName=/ehcache/hibernate-clustered.xml
ehcache.multi.vm.config.location=/ehcache/liferay-multi-vm-clustered.xml
dl.hook.impl=com.liferay.documentlibrary.util.JCRHook
correct? others configurations ?
Thanks
Marco Bolzan, modifié il y a 14 années.
RE: cluster data cache problems
Junior Member Publications: 47 Date d'inscription: 03/09/09 Publications récentes
We solved it!
Fondamental for this cluster configuration are:
Liferay Administrator's guide 2nd edition preview here on google-book administrator guide
wiki clustering article http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/Clustering
1) in portal-ext.properties add 3 important configuration
jackrabbit configuration
hibernate configuration
where myehcache must be a new folder in \webapps\ROOT\WEB-INF\classes contains theese files
hibernate.xml, hibernate-clustered.xml, hibernate-terracotta.xml, liferay-multi-vm.xml, liferay-multi-vm-clustered.xml, liferay-single-vm.xml
extracted by \webapps\ROOT\WEB-INF\lib\portal-impl.jar file
ehcache configuration
2) configure jackrabbit
creating jackrabbit folder according to path property specification for example in /data
editing /data/jackrabbit/repository.xml with db params connection and clustering elements
then editing /data/jackrabbit/home/workspaces/liferay/workspace.xml with db params
=> document library will be mange by db
3) tuning on liferay-multi-vm-clustered.xml and hibernate-clustered.xml about timeToLiveSeconds param
bye
Fondamental for this cluster configuration are:
Liferay Administrator's guide 2nd edition preview here on google-book administrator guide
wiki clustering article http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/Clustering
1) in portal-ext.properties add 3 important configuration
jackrabbit configuration
jcr.initialize.on.startup=true
jcr.jackrabbit.repository.root=myjackrabbit_absolutepath
jcr.jackrabbit.config.file.path=myjackrabbit_absolutepath/repository.xml
dl.hook.impl=com.liferay.documentlibrary.util.JCRHook
hibernate configuration
hibernate.configs=\
META-INF/mail-hbm.xml,\
META-INF/portal-hbm.xml,\
META-INF/ext-hbm.xml
hibernate.cache.provider_class=com.liferay.portal.dao.orm.hibernate.EhCacheProvider
net.sf.ehcache.configurationResourceName=\\myehcache\\hibernate-clustered.xml
hibernate.cache.use_query_cache=true
hibernate.cache.use_second_level_cache=true
hibernate.cache.use_minimal_puts=true
hibernate.cache.use_structured_entries=false
hibernate.jdbc.batch_size=20
hibernate.jdbc.use_scrollable_resultset=true
hibernate.bytecode.use_reflection_optimizer=true
hibernate.show_sql=false
hibernate.query.factory_class=org.hibernate.hql.classic.ClassicQueryTranslatorFactory
hibernate.generate_statistics=false
where myehcache must be a new folder in \webapps\ROOT\WEB-INF\classes contains theese files
hibernate.xml, hibernate-clustered.xml, hibernate-terracotta.xml, liferay-multi-vm.xml, liferay-multi-vm-clustered.xml, liferay-single-vm.xml
extracted by \webapps\ROOT\WEB-INF\lib\portal-impl.jar file
ehcache configuration
ehcache.disk.store.dir=myabsolutepathof_myehcache
ehcache.single.vm.config.location=\\myehcache\\liferay-single-vm.xml
ehcache.multi.vm.config.location=\\myehcache\\liferay-multi-vm-clustered.xml
2) configure jackrabbit
creating jackrabbit folder according to path property specification for example in /data
editing /data/jackrabbit/repository.xml with db params connection and clustering elements
then editing /data/jackrabbit/home/workspaces/liferay/workspace.xml with db params
=> document library will be mange by db
3) tuning on liferay-multi-vm-clustered.xml and hibernate-clustered.xml about timeToLiveSeconds param
<defaultcache maxelementsinmemory="10000" eternal="false" timetoidleseconds="1" timetoliveseconds="1" overflowtodisk="false"></defaultcache>
setting one second we have a very fast cache bye