Message Boards
Database cache is not cleared properly across the cluster
Database cache is not cleared properly across the cluster
New Member Posts: 16 Join Date: 6/24/20 Recent PostsHello,
I have a question. I have created clustered environment with two Liferay instances (hosted on two different servers, same subnet). I'm using unicast over TCP for cluster link with TCPPing option. I'm using the same database, I have shared directory for data and I'm using same, remote ElasticSearch instance. When I start the servers there are messages that suggest proper working on for the cluster (JgroupsReceiver Accepted view... with both servers). The Liferay version is 7.0.6 CE.
Everything seems to be working fine - ES indexes seems to be working fine, documents & media seems to be working fine as well. The only thing I have problem with are web contents. When I update a web content on one node I can't see the changes right away on second node - if I want it to be available right away I need to clear the database cache.
From what I understand from the documentation Liferay should invalidate cache on other nodes so the other nodes can fetch "fresh" data from the database instead of using cache.
I also have following properties in portal-ext.properties connected
to clustering (on both nodes these are the same):
cluster.link.enabled=true
ehcache.cluster.link.replication.enabled=true
web.server.display.node=true
cluster.link.channel.properties.control=/home/liferay/portal_ceGA7/unicast.xml
cluster.link.channel.properties.transport.0=/home/liferay/portal_ceGA7/unicast.xml
Any ideas what else could've been wrong?
RE: Database cache is not cleared properly across the cluster
Expert Posts: 396 Join Date: 8/22/07 Recent PostsHi Rafal,
Did you read this?
https://www.emdev.ru/en/blogs/-/asset_publisher/SQpx6X3FpPt8/content/all-about-liferay-7-ce-clustering
HTH
Fernando
RE: Database cache is not cleared properly across the cluster
New Member Posts: 16 Join Date: 6/24/20 Recent PostsHello,
yes I did that, thanks for the answer anyway!
After all it seems that the issue was different timezone set on one of the servers (in setenv.sh). It seems to be working fine after I changed that
Thanks!