-
Bug
-
Resolution: Done
-
Critical
-
30.0.0.Beta1
Session data can be stored on file system on a file located in standalone/data/infinispan/web/<DEPLOYMENT_NAME>/data;
When a session expires, this file should be purged and shrink in size;
This doesn't happen anymore;
- is caused by
-
ISPN-15177 SIFS Index may point at a deleted file
-
- Resolved
-
-
ISPN-15184 SIFS can leave many data files left around
-
- Resolved
-
- is cloned by
-
JBEAP-25488 (8.0.z) WFLY-18384 - [CLUSTERING] File containing session data is never shrunk or deleted
-
- QA In Progress
-
- is incorporated by
-
WFLY-18630 Upgrade Infinispan to 14.0.20.Final
-
- Closed
-
- is related to
-
ISPN-14869 Compactor is not closing the file iterator on expiration check and causing heap accumulation
-
- Resolved
-
[WFLY-18384] [CLUSTERING] File containing session data is never shrunk or deleted
Steps to Reproduce |
Original:
Create a cluster of 4 nodes:
{noformat} rm -rdf server1 unzip -q /home/tborgato/Downloads/wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server1 rm -rdf server2 unzip -q /home/tborgato/Downloads/wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server2 rm -rdf server3 unzip -q /home/tborgato/Downloads/wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server3 rm -rdf server4 unzip -q /home/tborgato/Downloads/wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server4 {noformat} Configure the 4 nodes to persist session data in a file that should be purged: {noformat} cat <<EOF > $PWD/test.cli embed-server --server-config=standalone-ha.xml if (outcome != success) of /subsystem=jgroups:read-attribute(name=default-stack) /subsystem=jgroups/channel=ee:write-attribute(name=stack,value=tcp) else /subsystem=jgroups:write-attribute(name=default-stack,value=tcp) /subsystem=jgroups/channel=ee:write-attribute(name=stack,value=tcp) end-if batch /subsystem=infinispan/cache-container=web/distributed-cache=dist:remove /subsystem=infinispan/cache-container=ejb/distributed-cache=dist:remove # web cache /subsystem=infinispan/cache-container=web/replicated-cache=dist:add() /subsystem=infinispan/cache-container=web/replicated-cache=dist/component=locking:add(isolation=REPEATABLE_READ) /subsystem=infinispan/cache-container=web/replicated-cache=dist/component=transaction:add(mode=BATCH) /subsystem=infinispan/cache-container=web/replicated-cache=dist/store=file:add(purge=true, passivation=true) /subsystem=infinispan/cache-container=web:write-attribute(name=default-cache, value=dist) # ejb cache /subsystem=infinispan/cache-container=ejb/replicated-cache=dist:add() /subsystem=infinispan/cache-container=ejb/replicated-cache=dist/component=locking:add(isolation=REPEATABLE_READ) /subsystem=infinispan/cache-container=ejb/replicated-cache=dist/component=transaction:add(mode=BATCH) /subsystem=infinispan/cache-container=ejb/replicated-cache=dist/store=file:add(purge=true, passivation=true) /subsystem=infinispan/cache-container=ejb:write-attribute(name=default-cache, value=dist) run-batch EOF ./server1/bin/jboss-cli.sh --file=$PWD/test.cli ./server2/bin/jboss-cli.sh --file=$PWD/test.cli ./server3/bin/jboss-cli.sh --file=$PWD/test.cli ./server4/bin/jboss-cli.sh --file=$PWD/test.cli {noformat} Deploy an application that is supposed to persist session data: [^clusterbench-ee10.ear] Create 2000 session; if you are familiar with JMeter and you deployed [^clusterbench-ee10.ear], you can use [^jmeter.jmx]; open [^jmeter.jmx] with JMeter 5.5 GUI, and press the start button, wait 1 minute, stop and start again, wait 1 minute and stop; At this point you should have the following files: server1/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data/ispn12.0 server2/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data/ispn12.0 server3/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data/ispn12.0 server4/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data/ispn12.0 All these files should be about 1.7MB Wait until sessions expire (default should be 30 minutes - I have waited more than 1 hour to be sure): you will see that the file doesn't shrink in size Note that if you stop and restart a node the file is automatically deleted |
New:
Create a cluster of 4 nodes:
{noformat} rm -rdf server1 unzip -q /home/tborgato/Downloads/wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server1 rm -rdf server2 unzip -q /home/tborgato/Downloads/wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server2 rm -rdf server3 unzip -q /home/tborgato/Downloads/wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server3 rm -rdf server4 unzip -q /home/tborgato/Downloads/wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server4 {noformat} Configure the 4 nodes to persist session data in a file that should be purged: {noformat} cat <<EOF > $PWD/test.cli embed-server --server-config=standalone-ha.xml if (outcome != success) of /subsystem=jgroups:read-attribute(name=default-stack) /subsystem=jgroups/channel=ee:write-attribute(name=stack,value=tcp) else /subsystem=jgroups:write-attribute(name=default-stack,value=tcp) /subsystem=jgroups/channel=ee:write-attribute(name=stack,value=tcp) end-if batch /subsystem=infinispan/cache-container=web/distributed-cache=dist:remove /subsystem=infinispan/cache-container=ejb/distributed-cache=dist:remove # web cache /subsystem=infinispan/cache-container=web/replicated-cache=dist:add() /subsystem=infinispan/cache-container=web/replicated-cache=dist/component=locking:add(isolation=REPEATABLE_READ) /subsystem=infinispan/cache-container=web/replicated-cache=dist/component=transaction:add(mode=BATCH) /subsystem=infinispan/cache-container=web/replicated-cache=dist/store=file:add(purge=true, passivation=true) /subsystem=infinispan/cache-container=web:write-attribute(name=default-cache, value=dist) # ejb cache /subsystem=infinispan/cache-container=ejb/replicated-cache=dist:add() /subsystem=infinispan/cache-container=ejb/replicated-cache=dist/component=locking:add(isolation=REPEATABLE_READ) /subsystem=infinispan/cache-container=ejb/replicated-cache=dist/component=transaction:add(mode=BATCH) /subsystem=infinispan/cache-container=ejb/replicated-cache=dist/store=file:add(purge=true, passivation=true) /subsystem=infinispan/cache-container=ejb:write-attribute(name=default-cache, value=dist) run-batch EOF ./server1/bin/jboss-cli.sh --file=$PWD/test.cli ./server2/bin/jboss-cli.sh --file=$PWD/test.cli ./server3/bin/jboss-cli.sh --file=$PWD/test.cli ./server4/bin/jboss-cli.sh --file=$PWD/test.cli {noformat} Deploy an application that is supposed to persist session data: [^clusterbench-ee10.ear]: {noformat} CLUSTERBENCH_EAR=clusterbench-ee10.ear cp $CLUSTERBENCH_EAR ./server1/standalone/deployments/ cp $CLUSTERBENCH_EAR ./server2/standalone/deployments/ cp $CLUSTERBENCH_EAR ./server3/standalone/deployments/ cp $CLUSTERBENCH_EAR ./server4/standalone/deployments/ {noformat} Create 2000 session; if you are familiar with JMeter and you deployed [^clusterbench-ee10.ear], you can use [^jmeter.jmx]; open [^jmeter.jmx] with JMeter 5.5 GUI, and press the start button, wait 1 minute, stop and start again, wait 1 minute and stop; At this point you should have the following files: server1/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data/ispn12.0 server2/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data/ispn12.0 server3/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data/ispn12.0 server4/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data/ispn12.0 All these files should be about 1.7MB Wait until sessions expire (default should be 30 minutes - I have waited more than 1 hour to be sure): you will see that the file doesn't shrink in size Note that if you stop and restart a node the file is automatically deleted |
Attachment | New: Screenshot from 2023-08-25 16-18-37.png [ 13024619 ] |
Steps to Reproduce |
Original:
Create a cluster of 4 nodes:
{noformat} rm -rdf server1 unzip -q /home/tborgato/Downloads/wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server1 rm -rdf server2 unzip -q /home/tborgato/Downloads/wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server2 rm -rdf server3 unzip -q /home/tborgato/Downloads/wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server3 rm -rdf server4 unzip -q /home/tborgato/Downloads/wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server4 {noformat} Configure the 4 nodes to persist session data in a file that should be purged: {noformat} cat <<EOF > $PWD/test.cli embed-server --server-config=standalone-ha.xml if (outcome != success) of /subsystem=jgroups:read-attribute(name=default-stack) /subsystem=jgroups/channel=ee:write-attribute(name=stack,value=tcp) else /subsystem=jgroups:write-attribute(name=default-stack,value=tcp) /subsystem=jgroups/channel=ee:write-attribute(name=stack,value=tcp) end-if batch /subsystem=infinispan/cache-container=web/distributed-cache=dist:remove /subsystem=infinispan/cache-container=ejb/distributed-cache=dist:remove # web cache /subsystem=infinispan/cache-container=web/replicated-cache=dist:add() /subsystem=infinispan/cache-container=web/replicated-cache=dist/component=locking:add(isolation=REPEATABLE_READ) /subsystem=infinispan/cache-container=web/replicated-cache=dist/component=transaction:add(mode=BATCH) /subsystem=infinispan/cache-container=web/replicated-cache=dist/store=file:add(purge=true, passivation=true) /subsystem=infinispan/cache-container=web:write-attribute(name=default-cache, value=dist) # ejb cache /subsystem=infinispan/cache-container=ejb/replicated-cache=dist:add() /subsystem=infinispan/cache-container=ejb/replicated-cache=dist/component=locking:add(isolation=REPEATABLE_READ) /subsystem=infinispan/cache-container=ejb/replicated-cache=dist/component=transaction:add(mode=BATCH) /subsystem=infinispan/cache-container=ejb/replicated-cache=dist/store=file:add(purge=true, passivation=true) /subsystem=infinispan/cache-container=ejb:write-attribute(name=default-cache, value=dist) run-batch EOF ./server1/bin/jboss-cli.sh --file=$PWD/test.cli ./server2/bin/jboss-cli.sh --file=$PWD/test.cli ./server3/bin/jboss-cli.sh --file=$PWD/test.cli ./server4/bin/jboss-cli.sh --file=$PWD/test.cli {noformat} Deploy an application that is supposed to persist session data: [^clusterbench-ee10.ear]: {noformat} CLUSTERBENCH_EAR=clusterbench-ee10.ear cp $CLUSTERBENCH_EAR ./server1/standalone/deployments/ cp $CLUSTERBENCH_EAR ./server2/standalone/deployments/ cp $CLUSTERBENCH_EAR ./server3/standalone/deployments/ cp $CLUSTERBENCH_EAR ./server4/standalone/deployments/ {noformat} Create 2000 session; if you are familiar with JMeter and you deployed [^clusterbench-ee10.ear], you can use [^jmeter.jmx]; open [^jmeter.jmx] with JMeter 5.5 GUI, and press the start button, wait 1 minute, stop and start again, wait 1 minute and stop; At this point you should have the following files: server1/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data/ispn12.0 server2/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data/ispn12.0 server3/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data/ispn12.0 server4/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data/ispn12.0 All these files should be about 1.7MB Wait until sessions expire (default should be 30 minutes - I have waited more than 1 hour to be sure): you will see that the file doesn't shrink in size Note that if you stop and restart a node the file is automatically deleted |
New:
Create a cluster of 4 nodes:
{noformat} rm -rdf server1 unzip -q /home/tborgato/Downloads/wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server1 rm -rdf server2 unzip -q /home/tborgato/Downloads/wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server2 rm -rdf server3 unzip -q /home/tborgato/Downloads/wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server3 rm -rdf server4 unzip -q /home/tborgato/Downloads/wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server4 {noformat} Configure the 4 nodes to persist session data in a file that should be purged: {noformat} cat <<EOF > $PWD/test.cli embed-server --server-config=standalone-ha.xml if (outcome != success) of /subsystem=jgroups:read-attribute(name=default-stack) /subsystem=jgroups/channel=ee:write-attribute(name=stack,value=tcp) else /subsystem=jgroups:write-attribute(name=default-stack,value=tcp) /subsystem=jgroups/channel=ee:write-attribute(name=stack,value=tcp) end-if batch /subsystem=infinispan/cache-container=web/distributed-cache=dist:remove /subsystem=infinispan/cache-container=ejb/distributed-cache=dist:remove # web cache /subsystem=infinispan/cache-container=web/replicated-cache=dist:add() /subsystem=infinispan/cache-container=web/replicated-cache=dist/component=locking:add(isolation=REPEATABLE_READ) /subsystem=infinispan/cache-container=web/replicated-cache=dist/component=transaction:add(mode=BATCH) /subsystem=infinispan/cache-container=web/replicated-cache=dist/store=file:add(purge=true, passivation=true) /subsystem=infinispan/cache-container=web:write-attribute(name=default-cache, value=dist) # ejb cache /subsystem=infinispan/cache-container=ejb/replicated-cache=dist:add() /subsystem=infinispan/cache-container=ejb/replicated-cache=dist/component=locking:add(isolation=REPEATABLE_READ) /subsystem=infinispan/cache-container=ejb/replicated-cache=dist/component=transaction:add(mode=BATCH) /subsystem=infinispan/cache-container=ejb/replicated-cache=dist/store=file:add(purge=true, passivation=true) /subsystem=infinispan/cache-container=ejb:write-attribute(name=default-cache, value=dist) run-batch EOF ./server1/bin/jboss-cli.sh --file=$PWD/test.cli ./server2/bin/jboss-cli.sh --file=$PWD/test.cli ./server3/bin/jboss-cli.sh --file=$PWD/test.cli ./server4/bin/jboss-cli.sh --file=$PWD/test.cli {noformat} Deploy an application that is supposed to persist session data: [^clusterbench-ee10.ear]: {noformat} CLUSTERBENCH_EAR=clusterbench-ee10.ear cp $CLUSTERBENCH_EAR ./server1/standalone/deployments/ cp $CLUSTERBENCH_EAR ./server2/standalone/deployments/ cp $CLUSTERBENCH_EAR ./server3/standalone/deployments/ cp $CLUSTERBENCH_EAR ./server4/standalone/deployments/ {noformat} Create 2000 session; if you are familiar with JMeter and you deployed [^clusterbench-ee10.ear], you can use [^jmeter.jmx]; open [^jmeter.jmx] with JMeter 5.5 GUI, and press the start button, wait 1 minute, stop and start again, wait 1 minute and stop: !Screenshot from 2023-08-25 16-18-37.png|thumbnail! At this point you should have the following files: server1/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data/ispn12.0 server2/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data/ispn12.0 server3/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data/ispn12.0 server4/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data/ispn12.0 All these files should be about 1.7MB Wait until sessions expire (default should be 30 minutes - I have waited more than 1 hour to be sure): you will see that the file doesn't shrink in size Note that if you stop and restart a node the file is automatically deleted |
Steps to Reproduce |
Original:
Create a cluster of 4 nodes:
{noformat} rm -rdf server1 unzip -q /home/tborgato/Downloads/wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server1 rm -rdf server2 unzip -q /home/tborgato/Downloads/wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server2 rm -rdf server3 unzip -q /home/tborgato/Downloads/wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server3 rm -rdf server4 unzip -q /home/tborgato/Downloads/wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server4 {noformat} Configure the 4 nodes to persist session data in a file that should be purged: {noformat} cat <<EOF > $PWD/test.cli embed-server --server-config=standalone-ha.xml if (outcome != success) of /subsystem=jgroups:read-attribute(name=default-stack) /subsystem=jgroups/channel=ee:write-attribute(name=stack,value=tcp) else /subsystem=jgroups:write-attribute(name=default-stack,value=tcp) /subsystem=jgroups/channel=ee:write-attribute(name=stack,value=tcp) end-if batch /subsystem=infinispan/cache-container=web/distributed-cache=dist:remove /subsystem=infinispan/cache-container=ejb/distributed-cache=dist:remove # web cache /subsystem=infinispan/cache-container=web/replicated-cache=dist:add() /subsystem=infinispan/cache-container=web/replicated-cache=dist/component=locking:add(isolation=REPEATABLE_READ) /subsystem=infinispan/cache-container=web/replicated-cache=dist/component=transaction:add(mode=BATCH) /subsystem=infinispan/cache-container=web/replicated-cache=dist/store=file:add(purge=true, passivation=true) /subsystem=infinispan/cache-container=web:write-attribute(name=default-cache, value=dist) # ejb cache /subsystem=infinispan/cache-container=ejb/replicated-cache=dist:add() /subsystem=infinispan/cache-container=ejb/replicated-cache=dist/component=locking:add(isolation=REPEATABLE_READ) /subsystem=infinispan/cache-container=ejb/replicated-cache=dist/component=transaction:add(mode=BATCH) /subsystem=infinispan/cache-container=ejb/replicated-cache=dist/store=file:add(purge=true, passivation=true) /subsystem=infinispan/cache-container=ejb:write-attribute(name=default-cache, value=dist) run-batch EOF ./server1/bin/jboss-cli.sh --file=$PWD/test.cli ./server2/bin/jboss-cli.sh --file=$PWD/test.cli ./server3/bin/jboss-cli.sh --file=$PWD/test.cli ./server4/bin/jboss-cli.sh --file=$PWD/test.cli {noformat} Deploy an application that is supposed to persist session data: [^clusterbench-ee10.ear]: {noformat} CLUSTERBENCH_EAR=clusterbench-ee10.ear cp $CLUSTERBENCH_EAR ./server1/standalone/deployments/ cp $CLUSTERBENCH_EAR ./server2/standalone/deployments/ cp $CLUSTERBENCH_EAR ./server3/standalone/deployments/ cp $CLUSTERBENCH_EAR ./server4/standalone/deployments/ {noformat} Create 2000 session; if you are familiar with JMeter and you deployed [^clusterbench-ee10.ear], you can use [^jmeter.jmx]; open [^jmeter.jmx] with JMeter 5.5 GUI, and press the start button, wait 1 minute, stop and start again, wait 1 minute and stop: !Screenshot from 2023-08-25 16-18-37.png|thumbnail! At this point you should have the following files: server1/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data/ispn12.0 server2/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data/ispn12.0 server3/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data/ispn12.0 server4/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data/ispn12.0 All these files should be about 1.7MB Wait until sessions expire (default should be 30 minutes - I have waited more than 1 hour to be sure): you will see that the file doesn't shrink in size Note that if you stop and restart a node the file is automatically deleted |
New:
Create a cluster of 4 nodes:
{noformat} rm -rdf server1 unzip -q /home/tborgato/Downloads/wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server1 rm -rdf server2 unzip -q /home/tborgato/Downloads/wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server2 rm -rdf server3 unzip -q /home/tborgato/Downloads/wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server3 rm -rdf server4 unzip -q /home/tborgato/Downloads/wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server4 {noformat} Configure the 4 nodes to persist session data in a file that should be purged: {noformat} cat <<EOF > $PWD/test.cli embed-server --server-config=standalone-ha.xml if (outcome != success) of /subsystem=jgroups:read-attribute(name=default-stack) /subsystem=jgroups/channel=ee:write-attribute(name=stack,value=tcp) else /subsystem=jgroups:write-attribute(name=default-stack,value=tcp) /subsystem=jgroups/channel=ee:write-attribute(name=stack,value=tcp) end-if batch /subsystem=infinispan/cache-container=web/distributed-cache=dist:remove /subsystem=infinispan/cache-container=ejb/distributed-cache=dist:remove # web cache /subsystem=infinispan/cache-container=web/replicated-cache=dist:add() /subsystem=infinispan/cache-container=web/replicated-cache=dist/component=locking:add(isolation=REPEATABLE_READ) /subsystem=infinispan/cache-container=web/replicated-cache=dist/component=transaction:add(mode=BATCH) /subsystem=infinispan/cache-container=web/replicated-cache=dist/store=file:add(purge=true, passivation=true) /subsystem=infinispan/cache-container=web:write-attribute(name=default-cache, value=dist) # ejb cache /subsystem=infinispan/cache-container=ejb/replicated-cache=dist:add() /subsystem=infinispan/cache-container=ejb/replicated-cache=dist/component=locking:add(isolation=REPEATABLE_READ) /subsystem=infinispan/cache-container=ejb/replicated-cache=dist/component=transaction:add(mode=BATCH) /subsystem=infinispan/cache-container=ejb/replicated-cache=dist/store=file:add(purge=true, passivation=true) /subsystem=infinispan/cache-container=ejb:write-attribute(name=default-cache, value=dist) run-batch EOF ./server1/bin/jboss-cli.sh --file=$PWD/test.cli ./server2/bin/jboss-cli.sh --file=$PWD/test.cli ./server3/bin/jboss-cli.sh --file=$PWD/test.cli ./server4/bin/jboss-cli.sh --file=$PWD/test.cli {noformat} Deploy an application that is supposed to persist session data: [^clusterbench-ee10.ear]: {noformat} CLUSTERBENCH_EAR=clusterbench-ee10.ear cp $CLUSTERBENCH_EAR ./server1/standalone/deployments/ cp $CLUSTERBENCH_EAR ./server2/standalone/deployments/ cp $CLUSTERBENCH_EAR ./server3/standalone/deployments/ cp $CLUSTERBENCH_EAR ./server4/standalone/deployments/ {noformat} Create 2000 session; if you are familiar with JMeter and you deployed [^clusterbench-ee10.ear], you can use [^jmeter.jmx]; open [^jmeter.jmx] with JMeter 5.5 GUI, and press the start button, wait 1 minute, stop and start again, wait 1 minute and stop: !Screenshot from 2023-08-25 16-18-37.png|thumbnail! At this point you should have the following files: server1/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data/ispn12.0 server2/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data/ispn12.0 server3/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data/ispn12.0 server4/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data/ispn12.0 All these files should be about 1.7MB Wait until sessions expire (default should be 30 minutes - I have waited more than 1 hour to be sure): you will see that the file doesn't shrink in size Note that if you stop and restart a node the file is automatically deleted |
Steps to Reproduce |
Original:
Create a cluster of 4 nodes:
{noformat} rm -rdf server1 unzip -q /home/tborgato/Downloads/wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server1 rm -rdf server2 unzip -q /home/tborgato/Downloads/wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server2 rm -rdf server3 unzip -q /home/tborgato/Downloads/wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server3 rm -rdf server4 unzip -q /home/tborgato/Downloads/wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server4 {noformat} Configure the 4 nodes to persist session data in a file that should be purged: {noformat} cat <<EOF > $PWD/test.cli embed-server --server-config=standalone-ha.xml if (outcome != success) of /subsystem=jgroups:read-attribute(name=default-stack) /subsystem=jgroups/channel=ee:write-attribute(name=stack,value=tcp) else /subsystem=jgroups:write-attribute(name=default-stack,value=tcp) /subsystem=jgroups/channel=ee:write-attribute(name=stack,value=tcp) end-if batch /subsystem=infinispan/cache-container=web/distributed-cache=dist:remove /subsystem=infinispan/cache-container=ejb/distributed-cache=dist:remove # web cache /subsystem=infinispan/cache-container=web/replicated-cache=dist:add() /subsystem=infinispan/cache-container=web/replicated-cache=dist/component=locking:add(isolation=REPEATABLE_READ) /subsystem=infinispan/cache-container=web/replicated-cache=dist/component=transaction:add(mode=BATCH) /subsystem=infinispan/cache-container=web/replicated-cache=dist/store=file:add(purge=true, passivation=true) /subsystem=infinispan/cache-container=web:write-attribute(name=default-cache, value=dist) # ejb cache /subsystem=infinispan/cache-container=ejb/replicated-cache=dist:add() /subsystem=infinispan/cache-container=ejb/replicated-cache=dist/component=locking:add(isolation=REPEATABLE_READ) /subsystem=infinispan/cache-container=ejb/replicated-cache=dist/component=transaction:add(mode=BATCH) /subsystem=infinispan/cache-container=ejb/replicated-cache=dist/store=file:add(purge=true, passivation=true) /subsystem=infinispan/cache-container=ejb:write-attribute(name=default-cache, value=dist) run-batch EOF ./server1/bin/jboss-cli.sh --file=$PWD/test.cli ./server2/bin/jboss-cli.sh --file=$PWD/test.cli ./server3/bin/jboss-cli.sh --file=$PWD/test.cli ./server4/bin/jboss-cli.sh --file=$PWD/test.cli {noformat} Deploy an application that is supposed to persist session data: [^clusterbench-ee10.ear]: {noformat} CLUSTERBENCH_EAR=clusterbench-ee10.ear cp $CLUSTERBENCH_EAR ./server1/standalone/deployments/ cp $CLUSTERBENCH_EAR ./server2/standalone/deployments/ cp $CLUSTERBENCH_EAR ./server3/standalone/deployments/ cp $CLUSTERBENCH_EAR ./server4/standalone/deployments/ {noformat} Create 2000 session; if you are familiar with JMeter and you deployed [^clusterbench-ee10.ear], you can use [^jmeter.jmx]; open [^jmeter.jmx] with JMeter 5.5 GUI, and press the start button, wait 1 minute, stop and start again, wait 1 minute and stop: !Screenshot from 2023-08-25 16-18-37.png|thumbnail! At this point you should have the following files: server1/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data/ispn12.0 server2/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data/ispn12.0 server3/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data/ispn12.0 server4/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data/ispn12.0 All these files should be about 1.7MB Wait until sessions expire (default should be 30 minutes - I have waited more than 1 hour to be sure): you will see that the file doesn't shrink in size Note that if you stop and restart a node the file is automatically deleted |
New:
Create a cluster of 4 nodes:
{noformat} rm -rdf server1 unzip -q /home/tborgato/Downloads/wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server1 rm -rdf server2 unzip -q /home/tborgato/Downloads/wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server2 rm -rdf server3 unzip -q /home/tborgato/Downloads/wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server3 rm -rdf server4 unzip -q /home/tborgato/Downloads/wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server4 {noformat} Configure the 4 nodes to persist session data in a file that should be purged: {noformat} cat <<EOF > $PWD/test.cli embed-server --server-config=standalone-ha.xml if (outcome != success) of /subsystem=jgroups:read-attribute(name=default-stack) /subsystem=jgroups/channel=ee:write-attribute(name=stack,value=tcp) else /subsystem=jgroups:write-attribute(name=default-stack,value=tcp) /subsystem=jgroups/channel=ee:write-attribute(name=stack,value=tcp) end-if batch /subsystem=infinispan/cache-container=web/distributed-cache=dist:remove /subsystem=infinispan/cache-container=ejb/distributed-cache=dist:remove # web cache /subsystem=infinispan/cache-container=web/replicated-cache=dist:add() /subsystem=infinispan/cache-container=web/replicated-cache=dist/component=locking:add(isolation=REPEATABLE_READ) /subsystem=infinispan/cache-container=web/replicated-cache=dist/component=transaction:add(mode=BATCH) /subsystem=infinispan/cache-container=web/replicated-cache=dist/store=file:add(purge=true, passivation=true) /subsystem=infinispan/cache-container=web:write-attribute(name=default-cache, value=dist) # ejb cache /subsystem=infinispan/cache-container=ejb/replicated-cache=dist:add() /subsystem=infinispan/cache-container=ejb/replicated-cache=dist/component=locking:add(isolation=REPEATABLE_READ) /subsystem=infinispan/cache-container=ejb/replicated-cache=dist/component=transaction:add(mode=BATCH) /subsystem=infinispan/cache-container=ejb/replicated-cache=dist/store=file:add(purge=true, passivation=true) /subsystem=infinispan/cache-container=ejb:write-attribute(name=default-cache, value=dist) run-batch EOF ./server1/bin/jboss-cli.sh --file=$PWD/test.cli ./server2/bin/jboss-cli.sh --file=$PWD/test.cli ./server3/bin/jboss-cli.sh --file=$PWD/test.cli ./server4/bin/jboss-cli.sh --file=$PWD/test.cli {noformat} Deploy an application that is supposed to persist session data: [^clusterbench-ee10.ear]: {noformat} CLUSTERBENCH_EAR=clusterbench-ee10.ear cp $CLUSTERBENCH_EAR ./server1/standalone/deployments/ cp $CLUSTERBENCH_EAR ./server2/standalone/deployments/ cp $CLUSTERBENCH_EAR ./server3/standalone/deployments/ cp $CLUSTERBENCH_EAR ./server4/standalone/deployments/ {noformat} Create 2000 session; if you are familiar with JMeter and you deployed [^clusterbench-ee10.ear], you can use [^jmeter.jmx]; open [^jmeter.jmx] with JMeter 5.5 GUI, and press the start button, wait 1 minute, stop and start again, wait 1 minute and stop: !Screenshot from 2023-08-25 16-18-37.png|thumbnail! At this point you should have the following files: {noformat} server1/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data/ispn12.0 server2/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data/ispn12.0 server3/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data/ispn12.0 server4/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data/ispn12.0 {noformat} All these files should be about 1.7MB Wait until sessions expire (default should be 30 minutes - I have waited more than 1 hour to be sure): you will see that the file doesn't shrink in size Note that if you stop and restart a node the file is automatically deleted |
Link |
New:
This issue is cloned by |
Steps to Reproduce |
Original:
Create a cluster of 4 nodes:
{noformat} rm -rdf server1 unzip -q /home/tborgato/Downloads/wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server1 rm -rdf server2 unzip -q /home/tborgato/Downloads/wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server2 rm -rdf server3 unzip -q /home/tborgato/Downloads/wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server3 rm -rdf server4 unzip -q /home/tborgato/Downloads/wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server4 {noformat} Configure the 4 nodes to persist session data in a file that should be purged: {noformat} cat <<EOF > $PWD/test.cli embed-server --server-config=standalone-ha.xml if (outcome != success) of /subsystem=jgroups:read-attribute(name=default-stack) /subsystem=jgroups/channel=ee:write-attribute(name=stack,value=tcp) else /subsystem=jgroups:write-attribute(name=default-stack,value=tcp) /subsystem=jgroups/channel=ee:write-attribute(name=stack,value=tcp) end-if batch /subsystem=infinispan/cache-container=web/distributed-cache=dist:remove /subsystem=infinispan/cache-container=ejb/distributed-cache=dist:remove # web cache /subsystem=infinispan/cache-container=web/replicated-cache=dist:add() /subsystem=infinispan/cache-container=web/replicated-cache=dist/component=locking:add(isolation=REPEATABLE_READ) /subsystem=infinispan/cache-container=web/replicated-cache=dist/component=transaction:add(mode=BATCH) /subsystem=infinispan/cache-container=web/replicated-cache=dist/store=file:add(purge=true, passivation=true) /subsystem=infinispan/cache-container=web:write-attribute(name=default-cache, value=dist) # ejb cache /subsystem=infinispan/cache-container=ejb/replicated-cache=dist:add() /subsystem=infinispan/cache-container=ejb/replicated-cache=dist/component=locking:add(isolation=REPEATABLE_READ) /subsystem=infinispan/cache-container=ejb/replicated-cache=dist/component=transaction:add(mode=BATCH) /subsystem=infinispan/cache-container=ejb/replicated-cache=dist/store=file:add(purge=true, passivation=true) /subsystem=infinispan/cache-container=ejb:write-attribute(name=default-cache, value=dist) run-batch EOF ./server1/bin/jboss-cli.sh --file=$PWD/test.cli ./server2/bin/jboss-cli.sh --file=$PWD/test.cli ./server3/bin/jboss-cli.sh --file=$PWD/test.cli ./server4/bin/jboss-cli.sh --file=$PWD/test.cli {noformat} Deploy an application that is supposed to persist session data: [^clusterbench-ee10.ear]: {noformat} CLUSTERBENCH_EAR=clusterbench-ee10.ear cp $CLUSTERBENCH_EAR ./server1/standalone/deployments/ cp $CLUSTERBENCH_EAR ./server2/standalone/deployments/ cp $CLUSTERBENCH_EAR ./server3/standalone/deployments/ cp $CLUSTERBENCH_EAR ./server4/standalone/deployments/ {noformat} Create 2000 session; if you are familiar with JMeter and you deployed [^clusterbench-ee10.ear], you can use [^jmeter.jmx]; open [^jmeter.jmx] with JMeter 5.5 GUI, and press the start button, wait 1 minute, stop and start again, wait 1 minute and stop: !Screenshot from 2023-08-25 16-18-37.png|thumbnail! At this point you should have the following files: {noformat} server1/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data/ispn12.0 server2/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data/ispn12.0 server3/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data/ispn12.0 server4/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data/ispn12.0 {noformat} All these files should be about 1.7MB Wait until sessions expire (default should be 30 minutes - I have waited more than 1 hour to be sure): you will see that the file doesn't shrink in size Note that if you stop and restart a node the file is automatically deleted |
New:
Create a cluster of 4 nodes:
{noformat} rm -rdf server1 unzip -q wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server1 rm -rdf server2 unzip -q wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server2 rm -rdf server3 unzip -q wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server3 rm -rdf server4 unzip -q wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server4 {noformat} Configure the 4 nodes to persist session data in a file that should be purged: {noformat} cat <<EOF > $PWD/test.cli embed-server --server-config=standalone-ha.xml if (outcome != success) of /subsystem=jgroups:read-attribute(name=default-stack) /subsystem=jgroups/channel=ee:write-attribute(name=stack,value=tcp) else /subsystem=jgroups:write-attribute(name=default-stack,value=tcp) /subsystem=jgroups/channel=ee:write-attribute(name=stack,value=tcp) end-if batch /subsystem=infinispan/cache-container=web/distributed-cache=dist:remove /subsystem=infinispan/cache-container=ejb/distributed-cache=dist:remove # web cache /subsystem=infinispan/cache-container=web/replicated-cache=dist:add() /subsystem=infinispan/cache-container=web/replicated-cache=dist/component=locking:add(isolation=REPEATABLE_READ) /subsystem=infinispan/cache-container=web/replicated-cache=dist/component=transaction:add(mode=BATCH) /subsystem=infinispan/cache-container=web/replicated-cache=dist/store=file:add(purge=true, passivation=true) /subsystem=infinispan/cache-container=web:write-attribute(name=default-cache, value=dist) # ejb cache /subsystem=infinispan/cache-container=ejb/replicated-cache=dist:add() /subsystem=infinispan/cache-container=ejb/replicated-cache=dist/component=locking:add(isolation=REPEATABLE_READ) /subsystem=infinispan/cache-container=ejb/replicated-cache=dist/component=transaction:add(mode=BATCH) /subsystem=infinispan/cache-container=ejb/replicated-cache=dist/store=file:add(purge=true, passivation=true) /subsystem=infinispan/cache-container=ejb:write-attribute(name=default-cache, value=dist) run-batch EOF ./server1/bin/jboss-cli.sh --file=$PWD/test.cli ./server2/bin/jboss-cli.sh --file=$PWD/test.cli ./server3/bin/jboss-cli.sh --file=$PWD/test.cli ./server4/bin/jboss-cli.sh --file=$PWD/test.cli {noformat} Deploy an application that is supposed to persist session data: [^clusterbench-ee10.ear]: {noformat} CLUSTERBENCH_EAR=clusterbench-ee10.ear cp $CLUSTERBENCH_EAR ./server1/standalone/deployments/ cp $CLUSTERBENCH_EAR ./server2/standalone/deployments/ cp $CLUSTERBENCH_EAR ./server3/standalone/deployments/ cp $CLUSTERBENCH_EAR ./server4/standalone/deployments/ {noformat} Create 2000 session; if you are familiar with JMeter and you deployed [^clusterbench-ee10.ear], you can use [^jmeter.jmx]; open [^jmeter.jmx] with JMeter 5.5 GUI, and press the start button, wait 1 minute, stop and start again, wait 1 minute and stop: !Screenshot from 2023-08-25 16-18-37.png|thumbnail! At this point you should have the following files: {noformat} server1/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data/ispn12.0 server2/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data/ispn12.0 server3/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data/ispn12.0 server4/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data/ispn12.0 {noformat} All these files should be about 1.7MB Wait until sessions expire (default should be 30 minutes - I have waited more than 1 hour to be sure): you will see that the file doesn't shrink in size Note that if you stop and restart a node the file is automatically deleted |
Link |
New:
This issue is related to |
Summary | Original: File containing session data is never purged | New: File containing session data is never shrinked |
Priority | Original: Blocker [ 1 ] | New: Critical [ 2 ] |
Assignee | Original: Paul Ferraro [ pferraro@redhat.com ] | New: Tommaso Borgato [ tborgato@redhat.com ] |
Fix Version/s | New: 30.0.0.Final [ 12413594 ] | |
Fix Version/s | Original: 30.0.0.Beta1 [ 12410348 ] |
Steps to Reproduce |
Original:
Create a cluster of 4 nodes:
{noformat} rm -rdf server1 unzip -q wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server1 rm -rdf server2 unzip -q wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server2 rm -rdf server3 unzip -q wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server3 rm -rdf server4 unzip -q wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server4 {noformat} Configure the 4 nodes to persist session data in a file that should be purged: {noformat} cat <<EOF > $PWD/test.cli embed-server --server-config=standalone-ha.xml if (outcome != success) of /subsystem=jgroups:read-attribute(name=default-stack) /subsystem=jgroups/channel=ee:write-attribute(name=stack,value=tcp) else /subsystem=jgroups:write-attribute(name=default-stack,value=tcp) /subsystem=jgroups/channel=ee:write-attribute(name=stack,value=tcp) end-if batch /subsystem=infinispan/cache-container=web/distributed-cache=dist:remove /subsystem=infinispan/cache-container=ejb/distributed-cache=dist:remove # web cache /subsystem=infinispan/cache-container=web/replicated-cache=dist:add() /subsystem=infinispan/cache-container=web/replicated-cache=dist/component=locking:add(isolation=REPEATABLE_READ) /subsystem=infinispan/cache-container=web/replicated-cache=dist/component=transaction:add(mode=BATCH) /subsystem=infinispan/cache-container=web/replicated-cache=dist/store=file:add(purge=true, passivation=true) /subsystem=infinispan/cache-container=web:write-attribute(name=default-cache, value=dist) # ejb cache /subsystem=infinispan/cache-container=ejb/replicated-cache=dist:add() /subsystem=infinispan/cache-container=ejb/replicated-cache=dist/component=locking:add(isolation=REPEATABLE_READ) /subsystem=infinispan/cache-container=ejb/replicated-cache=dist/component=transaction:add(mode=BATCH) /subsystem=infinispan/cache-container=ejb/replicated-cache=dist/store=file:add(purge=true, passivation=true) /subsystem=infinispan/cache-container=ejb:write-attribute(name=default-cache, value=dist) run-batch EOF ./server1/bin/jboss-cli.sh --file=$PWD/test.cli ./server2/bin/jboss-cli.sh --file=$PWD/test.cli ./server3/bin/jboss-cli.sh --file=$PWD/test.cli ./server4/bin/jboss-cli.sh --file=$PWD/test.cli {noformat} Deploy an application that is supposed to persist session data: [^clusterbench-ee10.ear]: {noformat} CLUSTERBENCH_EAR=clusterbench-ee10.ear cp $CLUSTERBENCH_EAR ./server1/standalone/deployments/ cp $CLUSTERBENCH_EAR ./server2/standalone/deployments/ cp $CLUSTERBENCH_EAR ./server3/standalone/deployments/ cp $CLUSTERBENCH_EAR ./server4/standalone/deployments/ {noformat} Create 2000 session; if you are familiar with JMeter and you deployed [^clusterbench-ee10.ear], you can use [^jmeter.jmx]; open [^jmeter.jmx] with JMeter 5.5 GUI, and press the start button, wait 1 minute, stop and start again, wait 1 minute and stop: !Screenshot from 2023-08-25 16-18-37.png|thumbnail! At this point you should have the following files: {noformat} server1/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data/ispn12.0 server2/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data/ispn12.0 server3/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data/ispn12.0 server4/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data/ispn12.0 {noformat} All these files should be about 1.7MB Wait until sessions expire (default should be 30 minutes - I have waited more than 1 hour to be sure): you will see that the file doesn't shrink in size Note that if you stop and restart a node the file is automatically deleted |
New:
Create a cluster of 4 nodes:
{noformat} rm -rdf server1 unzip -q wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server1 rm -rdf server2 unzip -q wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server2 rm -rdf server3 unzip -q wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server3 rm -rdf server4 unzip -q wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server4 {noformat} Configure the 4 nodes to persist session data in a file that should be purged: {noformat} cat <<EOF > $PWD/test.cli embed-server --server-config=standalone-ha.xml if (outcome != success) of /subsystem=jgroups:read-attribute(name=default-stack) /subsystem=jgroups/channel=ee:write-attribute(name=stack,value=tcp) else /subsystem=jgroups:write-attribute(name=default-stack,value=tcp) /subsystem=jgroups/channel=ee:write-attribute(name=stack,value=tcp) end-if batch /subsystem=infinispan/cache-container=web/distributed-cache=dist:remove /subsystem=infinispan/cache-container=ejb/distributed-cache=dist:remove # web cache /subsystem=infinispan/cache-container=web/replicated-cache=dist:add() /subsystem=infinispan/cache-container=web/replicated-cache=dist/component=locking:add(isolation=REPEATABLE_READ) /subsystem=infinispan/cache-container=web/replicated-cache=dist/component=transaction:add(mode=BATCH) /subsystem=infinispan/cache-container=web/replicated-cache=dist/store=file:add(purge=true, passivation=true) /subsystem=infinispan/cache-container=web:write-attribute(name=default-cache, value=dist) # ejb cache /subsystem=infinispan/cache-container=ejb/replicated-cache=dist:add() /subsystem=infinispan/cache-container=ejb/replicated-cache=dist/component=locking:add(isolation=REPEATABLE_READ) /subsystem=infinispan/cache-container=ejb/replicated-cache=dist/component=transaction:add(mode=BATCH) /subsystem=infinispan/cache-container=ejb/replicated-cache=dist/store=file:add(purge=true, passivation=true) /subsystem=infinispan/cache-container=ejb:write-attribute(name=default-cache, value=dist) run-batch EOF ./server1/bin/jboss-cli.sh --file=$PWD/test.cli ./server2/bin/jboss-cli.sh --file=$PWD/test.cli ./server3/bin/jboss-cli.sh --file=$PWD/test.cli ./server4/bin/jboss-cli.sh --file=$PWD/test.cli {noformat} Deploy an application that is supposed to persist session data: [^clusterbench-ee10.ear]: {noformat} CLUSTERBENCH_EAR=clusterbench-ee10.ear cp $CLUSTERBENCH_EAR ./server1/standalone/deployments/ cp $CLUSTERBENCH_EAR ./server2/standalone/deployments/ cp $CLUSTERBENCH_EAR ./server3/standalone/deployments/ cp $CLUSTERBENCH_EAR ./server4/standalone/deployments/ {noformat} start the 4 nodes in separate shells: {noformat} ./server1/bin/standalone.sh --server-config=standalone-ha.xml -Djboss.socket.binding.port-offset=100 -Djboss.node.name=wildfly1 {noformat} {noformat} ./server2/bin/standalone.sh --server-config=standalone-ha.xml -Djboss.socket.binding.port-offset=200 -Djboss.node.name=wildfly2 {noformat} {noformat} ./server3/bin/standalone.sh --server-config=standalone-ha.xml -Djboss.socket.binding.port-offset=300 -Djboss.node.name=wildfly3 {noformat} {noformat} ./server4/bin/standalone.sh --server-config=standalone-ha.xml -Djboss.socket.binding.port-offset=400 -Djboss.node.name=wildfly4 {noformat} Create 2000 session; if you are familiar with JMeter and you deployed [^clusterbench-ee10.ear], you can use [^jmeter.jmx]; open [^jmeter.jmx] with JMeter 5.5 GUI, and press the start button, wait 1 minute, stop and start again, wait 1 minute and stop: !Screenshot from 2023-08-25 16-18-37.png|thumbnail! At this point you should have the following files: {noformat} server1/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data/ispn12.0 server2/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data/ispn12.0 server3/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data/ispn12.0 server4/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data/ispn12.0 {noformat} All these files should be about 1.7MB Wait until sessions expire (default should be 30 minutes - I have waited more than 1 hour to be sure): you will see that the file doesn't shrink in size Note that if you stop and restart a node the file is automatically deleted |
Attachment | Original: jmeter.jmx [ 13024616 ] |
Attachment | New: jmeter.jmx [ 13047864 ] |
Steps to Reproduce |
Original:
Create a cluster of 4 nodes:
{noformat} rm -rdf server1 unzip -q wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server1 rm -rdf server2 unzip -q wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server2 rm -rdf server3 unzip -q wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server3 rm -rdf server4 unzip -q wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server4 {noformat} Configure the 4 nodes to persist session data in a file that should be purged: {noformat} cat <<EOF > $PWD/test.cli embed-server --server-config=standalone-ha.xml if (outcome != success) of /subsystem=jgroups:read-attribute(name=default-stack) /subsystem=jgroups/channel=ee:write-attribute(name=stack,value=tcp) else /subsystem=jgroups:write-attribute(name=default-stack,value=tcp) /subsystem=jgroups/channel=ee:write-attribute(name=stack,value=tcp) end-if batch /subsystem=infinispan/cache-container=web/distributed-cache=dist:remove /subsystem=infinispan/cache-container=ejb/distributed-cache=dist:remove # web cache /subsystem=infinispan/cache-container=web/replicated-cache=dist:add() /subsystem=infinispan/cache-container=web/replicated-cache=dist/component=locking:add(isolation=REPEATABLE_READ) /subsystem=infinispan/cache-container=web/replicated-cache=dist/component=transaction:add(mode=BATCH) /subsystem=infinispan/cache-container=web/replicated-cache=dist/store=file:add(purge=true, passivation=true) /subsystem=infinispan/cache-container=web:write-attribute(name=default-cache, value=dist) # ejb cache /subsystem=infinispan/cache-container=ejb/replicated-cache=dist:add() /subsystem=infinispan/cache-container=ejb/replicated-cache=dist/component=locking:add(isolation=REPEATABLE_READ) /subsystem=infinispan/cache-container=ejb/replicated-cache=dist/component=transaction:add(mode=BATCH) /subsystem=infinispan/cache-container=ejb/replicated-cache=dist/store=file:add(purge=true, passivation=true) /subsystem=infinispan/cache-container=ejb:write-attribute(name=default-cache, value=dist) run-batch EOF ./server1/bin/jboss-cli.sh --file=$PWD/test.cli ./server2/bin/jboss-cli.sh --file=$PWD/test.cli ./server3/bin/jboss-cli.sh --file=$PWD/test.cli ./server4/bin/jboss-cli.sh --file=$PWD/test.cli {noformat} Deploy an application that is supposed to persist session data: [^clusterbench-ee10.ear]: {noformat} CLUSTERBENCH_EAR=clusterbench-ee10.ear cp $CLUSTERBENCH_EAR ./server1/standalone/deployments/ cp $CLUSTERBENCH_EAR ./server2/standalone/deployments/ cp $CLUSTERBENCH_EAR ./server3/standalone/deployments/ cp $CLUSTERBENCH_EAR ./server4/standalone/deployments/ {noformat} start the 4 nodes in separate shells: {noformat} ./server1/bin/standalone.sh --server-config=standalone-ha.xml -Djboss.socket.binding.port-offset=100 -Djboss.node.name=wildfly1 {noformat} {noformat} ./server2/bin/standalone.sh --server-config=standalone-ha.xml -Djboss.socket.binding.port-offset=200 -Djboss.node.name=wildfly2 {noformat} {noformat} ./server3/bin/standalone.sh --server-config=standalone-ha.xml -Djboss.socket.binding.port-offset=300 -Djboss.node.name=wildfly3 {noformat} {noformat} ./server4/bin/standalone.sh --server-config=standalone-ha.xml -Djboss.socket.binding.port-offset=400 -Djboss.node.name=wildfly4 {noformat} Create 2000 session; if you are familiar with JMeter and you deployed [^clusterbench-ee10.ear], you can use [^jmeter.jmx]; open [^jmeter.jmx] with JMeter 5.5 GUI, and press the start button, wait 1 minute, stop and start again, wait 1 minute and stop: !Screenshot from 2023-08-25 16-18-37.png|thumbnail! At this point you should have the following files: {noformat} server1/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data/ispn12.0 server2/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data/ispn12.0 server3/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data/ispn12.0 server4/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data/ispn12.0 {noformat} All these files should be about 1.7MB Wait until sessions expire (default should be 30 minutes - I have waited more than 1 hour to be sure): you will see that the file doesn't shrink in size Note that if you stop and restart a node the file is automatically deleted |
New:
Create a cluster of 4 nodes:
{noformat} rm -rdf server1 unzip -q wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server1 rm -rdf server2 unzip -q wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server2 rm -rdf server3 unzip -q wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server3 rm -rdf server4 unzip -q wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server4 {noformat} Configure the 4 nodes to persist session data in a file that should be purged: {noformat} cat <<EOF > $PWD/test.cli embed-server --server-config=standalone-ha.xml if (outcome != success) of /subsystem=jgroups:read-attribute(name=default-stack) /subsystem=jgroups/channel=ee:write-attribute(name=stack,value=tcp) else /subsystem=jgroups:write-attribute(name=default-stack,value=tcp) /subsystem=jgroups/channel=ee:write-attribute(name=stack,value=tcp) end-if batch /subsystem=infinispan/cache-container=web/distributed-cache=dist:remove /subsystem=infinispan/cache-container=ejb/distributed-cache=dist:remove # web cache /subsystem=infinispan/cache-container=web/replicated-cache=dist:add() /subsystem=infinispan/cache-container=web/replicated-cache=dist/component=locking:add(isolation=REPEATABLE_READ) /subsystem=infinispan/cache-container=web/replicated-cache=dist/component=transaction:add(mode=BATCH) /subsystem=infinispan/cache-container=web/replicated-cache=dist/store=file:add(purge=true, passivation=true) /subsystem=infinispan/cache-container=web:write-attribute(name=default-cache, value=dist) # ejb cache /subsystem=infinispan/cache-container=ejb/replicated-cache=dist:add() /subsystem=infinispan/cache-container=ejb/replicated-cache=dist/component=locking:add(isolation=REPEATABLE_READ) /subsystem=infinispan/cache-container=ejb/replicated-cache=dist/component=transaction:add(mode=BATCH) /subsystem=infinispan/cache-container=ejb/replicated-cache=dist/store=file:add(purge=true, passivation=true) /subsystem=infinispan/cache-container=ejb:write-attribute(name=default-cache, value=dist) run-batch # session timeout after 1 minute /subsystem=undertow/servlet-container=default:write-attribute(name=default-session-timeout, value=1) EOF ./server1/bin/jboss-cli.sh --file=$PWD/test.cli ./server2/bin/jboss-cli.sh --file=$PWD/test.cli ./server3/bin/jboss-cli.sh --file=$PWD/test.cli ./server4/bin/jboss-cli.sh --file=$PWD/test.cli {noformat} Deploy an application that is supposed to persist session data: [^clusterbench-ee10.ear]: {noformat} CLUSTERBENCH_EAR=clusterbench-ee10.ear cp $CLUSTERBENCH_EAR ./server1/standalone/deployments/ cp $CLUSTERBENCH_EAR ./server2/standalone/deployments/ cp $CLUSTERBENCH_EAR ./server3/standalone/deployments/ cp $CLUSTERBENCH_EAR ./server4/standalone/deployments/ {noformat} start the 4 nodes in separate shells: {noformat} ./server1/bin/standalone.sh --server-config=standalone-ha.xml -Djboss.socket.binding.port-offset=100 -Djboss.node.name=wildfly1 {noformat} {noformat} ./server2/bin/standalone.sh --server-config=standalone-ha.xml -Djboss.socket.binding.port-offset=200 -Djboss.node.name=wildfly2 {noformat} {noformat} ./server3/bin/standalone.sh --server-config=standalone-ha.xml -Djboss.socket.binding.port-offset=300 -Djboss.node.name=wildfly3 {noformat} {noformat} ./server4/bin/standalone.sh --server-config=standalone-ha.xml -Djboss.socket.binding.port-offset=400 -Djboss.node.name=wildfly4 {noformat} Create enough session in order to get e.g. 3 store files created; if you are familiar with JMeter and you deployed [^clusterbench-ee10.ear], you can use [^jmeter.jmx]; open [^jmeter.jmx] with JMeter 5.5 GUI, and press the start button, wait until all 2000 sessions are created, stop end repeat enough times to get the 3 store files created: !Screenshot from 2023-08-25 16-18-37.png|thumbnail! At this point you should have the following files: {noformat} $ ls -ltr server1/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data total 32872 -rw-r--r--. 1 tborgato tborgato 16777152 Sep 28 18:12 ispn12.0 -rw-r--r--. 1 tborgato tborgato 16777152 Sep 28 18:22 ispn12.1 -rw-r--r--. 1 tborgato tborgato 105192 Sep 28 18:22 ispn12.2 {noformat} {noformat} $ ls -ltr server2/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data total 32872 -rw-r--r--. 1 tborgato tborgato 16777152 Sep 28 18:12 ispn12.0 -rw-r--r--. 1 tborgato tborgato 16777152 Sep 28 18:22 ispn12.1 -rw-r--r--. 1 tborgato tborgato 105192 Sep 28 18:22 ispn12.2 {noformat} {noformat} $ ls -ltr server3/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data total 32872 -rw-r--r--. 1 tborgato tborgato 16777152 Sep 28 18:12 ispn12.0 -rw-r--r--. 1 tborgato tborgato 16777152 Sep 28 18:22 ispn12.1 -rw-r--r--. 1 tborgato tborgato 105192 Sep 28 18:22 ispn12.2 {noformat} {noformat} $ ls -ltr server4/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data total 32872 -rw-r--r--. 1 tborgato tborgato 16777152 Sep 28 18:12 ispn12.0 -rw-r--r--. 1 tborgato tborgato 16777152 Sep 28 18:22 ispn12.1 -rw-r--r--. 1 tborgato tborgato 105192 Sep 28 18:22 ispn12.2 {noformat} Wait until sessions expire (default should be 30 minutes but this reproduces set session timeout to 1 minute - I have waited more than 1 hour to be sure): you will see that none of these files is nor shrink in size or deleted; Note that if you stop and restart a node the file is automatically deleted; |
Attachment | New: screenshot-1.png [ 13050696 ] |
Summary | Original: File containing session data is never shrinked | New: File containing session data is never shrunk or deleted |
Steps to Reproduce |
Original:
Create a cluster of 4 nodes:
{noformat} rm -rdf server1 unzip -q wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server1 rm -rdf server2 unzip -q wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server2 rm -rdf server3 unzip -q wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server3 rm -rdf server4 unzip -q wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server4 {noformat} Configure the 4 nodes to persist session data in a file that should be purged: {noformat} cat <<EOF > $PWD/test.cli embed-server --server-config=standalone-ha.xml if (outcome != success) of /subsystem=jgroups:read-attribute(name=default-stack) /subsystem=jgroups/channel=ee:write-attribute(name=stack,value=tcp) else /subsystem=jgroups:write-attribute(name=default-stack,value=tcp) /subsystem=jgroups/channel=ee:write-attribute(name=stack,value=tcp) end-if batch /subsystem=infinispan/cache-container=web/distributed-cache=dist:remove /subsystem=infinispan/cache-container=ejb/distributed-cache=dist:remove # web cache /subsystem=infinispan/cache-container=web/replicated-cache=dist:add() /subsystem=infinispan/cache-container=web/replicated-cache=dist/component=locking:add(isolation=REPEATABLE_READ) /subsystem=infinispan/cache-container=web/replicated-cache=dist/component=transaction:add(mode=BATCH) /subsystem=infinispan/cache-container=web/replicated-cache=dist/store=file:add(purge=true, passivation=true) /subsystem=infinispan/cache-container=web:write-attribute(name=default-cache, value=dist) # ejb cache /subsystem=infinispan/cache-container=ejb/replicated-cache=dist:add() /subsystem=infinispan/cache-container=ejb/replicated-cache=dist/component=locking:add(isolation=REPEATABLE_READ) /subsystem=infinispan/cache-container=ejb/replicated-cache=dist/component=transaction:add(mode=BATCH) /subsystem=infinispan/cache-container=ejb/replicated-cache=dist/store=file:add(purge=true, passivation=true) /subsystem=infinispan/cache-container=ejb:write-attribute(name=default-cache, value=dist) run-batch # session timeout after 1 minute /subsystem=undertow/servlet-container=default:write-attribute(name=default-session-timeout, value=1) EOF ./server1/bin/jboss-cli.sh --file=$PWD/test.cli ./server2/bin/jboss-cli.sh --file=$PWD/test.cli ./server3/bin/jboss-cli.sh --file=$PWD/test.cli ./server4/bin/jboss-cli.sh --file=$PWD/test.cli {noformat} Deploy an application that is supposed to persist session data: [^clusterbench-ee10.ear]: {noformat} CLUSTERBENCH_EAR=clusterbench-ee10.ear cp $CLUSTERBENCH_EAR ./server1/standalone/deployments/ cp $CLUSTERBENCH_EAR ./server2/standalone/deployments/ cp $CLUSTERBENCH_EAR ./server3/standalone/deployments/ cp $CLUSTERBENCH_EAR ./server4/standalone/deployments/ {noformat} start the 4 nodes in separate shells: {noformat} ./server1/bin/standalone.sh --server-config=standalone-ha.xml -Djboss.socket.binding.port-offset=100 -Djboss.node.name=wildfly1 {noformat} {noformat} ./server2/bin/standalone.sh --server-config=standalone-ha.xml -Djboss.socket.binding.port-offset=200 -Djboss.node.name=wildfly2 {noformat} {noformat} ./server3/bin/standalone.sh --server-config=standalone-ha.xml -Djboss.socket.binding.port-offset=300 -Djboss.node.name=wildfly3 {noformat} {noformat} ./server4/bin/standalone.sh --server-config=standalone-ha.xml -Djboss.socket.binding.port-offset=400 -Djboss.node.name=wildfly4 {noformat} Create enough session in order to get e.g. 3 store files created; if you are familiar with JMeter and you deployed [^clusterbench-ee10.ear], you can use [^jmeter.jmx]; open [^jmeter.jmx] with JMeter 5.5 GUI, and press the start button, wait until all 2000 sessions are created, stop end repeat enough times to get the 3 store files created: !Screenshot from 2023-08-25 16-18-37.png|thumbnail! At this point you should have the following files: {noformat} $ ls -ltr server1/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data total 32872 -rw-r--r--. 1 tborgato tborgato 16777152 Sep 28 18:12 ispn12.0 -rw-r--r--. 1 tborgato tborgato 16777152 Sep 28 18:22 ispn12.1 -rw-r--r--. 1 tborgato tborgato 105192 Sep 28 18:22 ispn12.2 {noformat} {noformat} $ ls -ltr server2/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data total 32872 -rw-r--r--. 1 tborgato tborgato 16777152 Sep 28 18:12 ispn12.0 -rw-r--r--. 1 tborgato tborgato 16777152 Sep 28 18:22 ispn12.1 -rw-r--r--. 1 tborgato tborgato 105192 Sep 28 18:22 ispn12.2 {noformat} {noformat} $ ls -ltr server3/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data total 32872 -rw-r--r--. 1 tborgato tborgato 16777152 Sep 28 18:12 ispn12.0 -rw-r--r--. 1 tborgato tborgato 16777152 Sep 28 18:22 ispn12.1 -rw-r--r--. 1 tborgato tborgato 105192 Sep 28 18:22 ispn12.2 {noformat} {noformat} $ ls -ltr server4/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data total 32872 -rw-r--r--. 1 tborgato tborgato 16777152 Sep 28 18:12 ispn12.0 -rw-r--r--. 1 tborgato tborgato 16777152 Sep 28 18:22 ispn12.1 -rw-r--r--. 1 tborgato tborgato 105192 Sep 28 18:22 ispn12.2 {noformat} Wait until sessions expire (default should be 30 minutes but this reproduces set session timeout to 1 minute - I have waited more than 1 hour to be sure): you will see that none of these files is nor shrink in size or deleted; Note that if you stop and restart a node the file is automatically deleted; |
New:
Create a cluster of 4 nodes:
{noformat} rm -rdf server1 unzip -q wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server1 rm -rdf server2 unzip -q wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server2 rm -rdf server3 unzip -q wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server3 rm -rdf server4 unzip -q wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server4 {noformat} Configure the 4 nodes to persist session data in a file that should be purged: {noformat} cat <<EOF > $PWD/test.cli embed-server --server-config=standalone-ha.xml if (outcome != success) of /subsystem=jgroups:read-attribute(name=default-stack) /subsystem=jgroups/channel=ee:write-attribute(name=stack,value=tcp) else /subsystem=jgroups:write-attribute(name=default-stack,value=tcp) /subsystem=jgroups/channel=ee:write-attribute(name=stack,value=tcp) end-if batch /subsystem=infinispan/cache-container=web/distributed-cache=dist:remove /subsystem=infinispan/cache-container=ejb/distributed-cache=dist:remove # web cache /subsystem=infinispan/cache-container=web/replicated-cache=dist:add() /subsystem=infinispan/cache-container=web/replicated-cache=dist/component=locking:add(isolation=REPEATABLE_READ) /subsystem=infinispan/cache-container=web/replicated-cache=dist/component=transaction:add(mode=BATCH) /subsystem=infinispan/cache-container=web/replicated-cache=dist/store=file:add(purge=true, passivation=true) /subsystem=infinispan/cache-container=web:write-attribute(name=default-cache, value=dist) # ejb cache /subsystem=infinispan/cache-container=ejb/replicated-cache=dist:add() /subsystem=infinispan/cache-container=ejb/replicated-cache=dist/component=locking:add(isolation=REPEATABLE_READ) /subsystem=infinispan/cache-container=ejb/replicated-cache=dist/component=transaction:add(mode=BATCH) /subsystem=infinispan/cache-container=ejb/replicated-cache=dist/store=file:add(purge=true, passivation=true) /subsystem=infinispan/cache-container=ejb:write-attribute(name=default-cache, value=dist) run-batch # session timeout after 1 minute /subsystem=undertow/servlet-container=default:write-attribute(name=default-session-timeout, value=1) EOF ./server1/bin/jboss-cli.sh --file=$PWD/test.cli ./server2/bin/jboss-cli.sh --file=$PWD/test.cli ./server3/bin/jboss-cli.sh --file=$PWD/test.cli ./server4/bin/jboss-cli.sh --file=$PWD/test.cli {noformat} Deploy an application that is supposed to persist session data: [^clusterbench-ee10.ear]: {noformat} CLUSTERBENCH_EAR=clusterbench-ee10.ear cp $CLUSTERBENCH_EAR ./server1/standalone/deployments/ cp $CLUSTERBENCH_EAR ./server2/standalone/deployments/ cp $CLUSTERBENCH_EAR ./server3/standalone/deployments/ cp $CLUSTERBENCH_EAR ./server4/standalone/deployments/ {noformat} start the 4 nodes in separate shells: {noformat} ./server1/bin/standalone.sh --server-config=standalone-ha.xml -Djboss.socket.binding.port-offset=100 -Djboss.node.name=wildfly1 {noformat} {noformat} ./server2/bin/standalone.sh --server-config=standalone-ha.xml -Djboss.socket.binding.port-offset=200 -Djboss.node.name=wildfly2 {noformat} {noformat} ./server3/bin/standalone.sh --server-config=standalone-ha.xml -Djboss.socket.binding.port-offset=300 -Djboss.node.name=wildfly3 {noformat} {noformat} ./server4/bin/standalone.sh --server-config=standalone-ha.xml -Djboss.socket.binding.port-offset=400 -Djboss.node.name=wildfly4 {noformat} Create enough session in order to get e.g. 3 store files created; if you are familiar with JMeter and you deployed [^clusterbench-ee10.ear], you can use [^jmeter.jmx]; open [^jmeter.jmx] with JMeter 5.5 GUI, and press the start button, wait until all 2000 sessions are created, stop end repeat enough times to get the 3 store files created: !Screenshot from 2023-08-25 16-18-37.png|thumbnail! Alternatively, you can run a script like this: {noformat} for i in {1..10} do echo "JMeter Run $i ..." apache-jmeter-5.5/bin/jmeter -n -t jmeter.jmx done {noformat} At this point you should have the following files: {noformat} $ ls -ltr server1/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data total 32872 -rw-r--r--. 1 tborgato tborgato 16777152 Sep 28 18:12 ispn12.0 -rw-r--r--. 1 tborgato tborgato 16777152 Sep 28 18:22 ispn12.1 -rw-r--r--. 1 tborgato tborgato 105192 Sep 28 18:22 ispn12.2 {noformat} {noformat} $ ls -ltr server2/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data total 32872 -rw-r--r--. 1 tborgato tborgato 16777152 Sep 28 18:12 ispn12.0 -rw-r--r--. 1 tborgato tborgato 16777152 Sep 28 18:22 ispn12.1 -rw-r--r--. 1 tborgato tborgato 105192 Sep 28 18:22 ispn12.2 {noformat} {noformat} $ ls -ltr server3/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data total 32872 -rw-r--r--. 1 tborgato tborgato 16777152 Sep 28 18:12 ispn12.0 -rw-r--r--. 1 tborgato tborgato 16777152 Sep 28 18:22 ispn12.1 -rw-r--r--. 1 tborgato tborgato 105192 Sep 28 18:22 ispn12.2 {noformat} {noformat} $ ls -ltr server4/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data total 32872 -rw-r--r--. 1 tborgato tborgato 16777152 Sep 28 18:12 ispn12.0 -rw-r--r--. 1 tborgato tborgato 16777152 Sep 28 18:22 ispn12.1 -rw-r--r--. 1 tborgato tborgato 105192 Sep 28 18:22 ispn12.2 {noformat} Wait until sessions expire (default should be 30 minutes but this reproduces set session timeout to 1 minute - I have waited more than 1 hour to be sure): you will see that none of these files is nor shrink in size or deleted; Note that if you stop and restart a node the file is automatically deleted; |
Summary | Original: File containing session data is never shrunk or deleted | New: [CLUSTERING] File containing session data is never shrunk or deleted |
Steps to Reproduce |
Original:
Create a cluster of 4 nodes:
{noformat} rm -rdf server1 unzip -q wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server1 rm -rdf server2 unzip -q wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server2 rm -rdf server3 unzip -q wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server3 rm -rdf server4 unzip -q wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server4 {noformat} Configure the 4 nodes to persist session data in a file that should be purged: {noformat} cat <<EOF > $PWD/test.cli embed-server --server-config=standalone-ha.xml if (outcome != success) of /subsystem=jgroups:read-attribute(name=default-stack) /subsystem=jgroups/channel=ee:write-attribute(name=stack,value=tcp) else /subsystem=jgroups:write-attribute(name=default-stack,value=tcp) /subsystem=jgroups/channel=ee:write-attribute(name=stack,value=tcp) end-if batch /subsystem=infinispan/cache-container=web/distributed-cache=dist:remove /subsystem=infinispan/cache-container=ejb/distributed-cache=dist:remove # web cache /subsystem=infinispan/cache-container=web/replicated-cache=dist:add() /subsystem=infinispan/cache-container=web/replicated-cache=dist/component=locking:add(isolation=REPEATABLE_READ) /subsystem=infinispan/cache-container=web/replicated-cache=dist/component=transaction:add(mode=BATCH) /subsystem=infinispan/cache-container=web/replicated-cache=dist/store=file:add(purge=true, passivation=true) /subsystem=infinispan/cache-container=web:write-attribute(name=default-cache, value=dist) # ejb cache /subsystem=infinispan/cache-container=ejb/replicated-cache=dist:add() /subsystem=infinispan/cache-container=ejb/replicated-cache=dist/component=locking:add(isolation=REPEATABLE_READ) /subsystem=infinispan/cache-container=ejb/replicated-cache=dist/component=transaction:add(mode=BATCH) /subsystem=infinispan/cache-container=ejb/replicated-cache=dist/store=file:add(purge=true, passivation=true) /subsystem=infinispan/cache-container=ejb:write-attribute(name=default-cache, value=dist) run-batch # session timeout after 1 minute /subsystem=undertow/servlet-container=default:write-attribute(name=default-session-timeout, value=1) EOF ./server1/bin/jboss-cli.sh --file=$PWD/test.cli ./server2/bin/jboss-cli.sh --file=$PWD/test.cli ./server3/bin/jboss-cli.sh --file=$PWD/test.cli ./server4/bin/jboss-cli.sh --file=$PWD/test.cli {noformat} Deploy an application that is supposed to persist session data: [^clusterbench-ee10.ear]: {noformat} CLUSTERBENCH_EAR=clusterbench-ee10.ear cp $CLUSTERBENCH_EAR ./server1/standalone/deployments/ cp $CLUSTERBENCH_EAR ./server2/standalone/deployments/ cp $CLUSTERBENCH_EAR ./server3/standalone/deployments/ cp $CLUSTERBENCH_EAR ./server4/standalone/deployments/ {noformat} start the 4 nodes in separate shells: {noformat} ./server1/bin/standalone.sh --server-config=standalone-ha.xml -Djboss.socket.binding.port-offset=100 -Djboss.node.name=wildfly1 {noformat} {noformat} ./server2/bin/standalone.sh --server-config=standalone-ha.xml -Djboss.socket.binding.port-offset=200 -Djboss.node.name=wildfly2 {noformat} {noformat} ./server3/bin/standalone.sh --server-config=standalone-ha.xml -Djboss.socket.binding.port-offset=300 -Djboss.node.name=wildfly3 {noformat} {noformat} ./server4/bin/standalone.sh --server-config=standalone-ha.xml -Djboss.socket.binding.port-offset=400 -Djboss.node.name=wildfly4 {noformat} Create enough session in order to get e.g. 3 store files created; if you are familiar with JMeter and you deployed [^clusterbench-ee10.ear], you can use [^jmeter.jmx]; open [^jmeter.jmx] with JMeter 5.5 GUI, and press the start button, wait until all 2000 sessions are created, stop end repeat enough times to get the 3 store files created: !Screenshot from 2023-08-25 16-18-37.png|thumbnail! Alternatively, you can run a script like this: {noformat} for i in {1..10} do echo "JMeter Run $i ..." apache-jmeter-5.5/bin/jmeter -n -t jmeter.jmx done {noformat} At this point you should have the following files: {noformat} $ ls -ltr server1/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data total 32872 -rw-r--r--. 1 tborgato tborgato 16777152 Sep 28 18:12 ispn12.0 -rw-r--r--. 1 tborgato tborgato 16777152 Sep 28 18:22 ispn12.1 -rw-r--r--. 1 tborgato tborgato 105192 Sep 28 18:22 ispn12.2 {noformat} {noformat} $ ls -ltr server2/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data total 32872 -rw-r--r--. 1 tborgato tborgato 16777152 Sep 28 18:12 ispn12.0 -rw-r--r--. 1 tborgato tborgato 16777152 Sep 28 18:22 ispn12.1 -rw-r--r--. 1 tborgato tborgato 105192 Sep 28 18:22 ispn12.2 {noformat} {noformat} $ ls -ltr server3/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data total 32872 -rw-r--r--. 1 tborgato tborgato 16777152 Sep 28 18:12 ispn12.0 -rw-r--r--. 1 tborgato tborgato 16777152 Sep 28 18:22 ispn12.1 -rw-r--r--. 1 tborgato tborgato 105192 Sep 28 18:22 ispn12.2 {noformat} {noformat} $ ls -ltr server4/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data total 32872 -rw-r--r--. 1 tborgato tborgato 16777152 Sep 28 18:12 ispn12.0 -rw-r--r--. 1 tborgato tborgato 16777152 Sep 28 18:22 ispn12.1 -rw-r--r--. 1 tborgato tborgato 105192 Sep 28 18:22 ispn12.2 {noformat} Wait until sessions expire (default should be 30 minutes but this reproduces set session timeout to 1 minute - I have waited more than 1 hour to be sure): you will see that none of these files is nor shrink in size or deleted; Note that if you stop and restart a node the file is automatically deleted; |
New:
Create a cluster of 4 nodes:
{noformat} rm -rdf server1 unzip -q wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server1 rm -rdf server2 unzip -q wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server2 rm -rdf server3 unzip -q wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server3 rm -rdf server4 unzip -q wildfly-30.0.0.Beta1-202308192044-7e816de9.zip mv server server4 {noformat} Configure the 4 nodes to persist session data in a file that should be purged: {noformat} cat <<EOF > $PWD/test.cli embed-server --server-config=standalone-ha.xml if (outcome != success) of /subsystem=jgroups:read-attribute(name=default-stack) /subsystem=jgroups/channel=ee:write-attribute(name=stack,value=tcp) else /subsystem=jgroups:write-attribute(name=default-stack,value=tcp) /subsystem=jgroups/channel=ee:write-attribute(name=stack,value=tcp) end-if batch /subsystem=infinispan/cache-container=web/distributed-cache=dist:remove /subsystem=infinispan/cache-container=ejb/distributed-cache=dist:remove # web cache /subsystem=infinispan/cache-container=web/replicated-cache=dist:add() /subsystem=infinispan/cache-container=web/replicated-cache=dist/component=locking:add(isolation=REPEATABLE_READ) /subsystem=infinispan/cache-container=web/replicated-cache=dist/component=transaction:add(mode=BATCH) /subsystem=infinispan/cache-container=web/replicated-cache=dist/store=file:add(purge=true, passivation=true) /subsystem=infinispan/cache-container=web:write-attribute(name=default-cache, value=dist) # ejb cache /subsystem=infinispan/cache-container=ejb/replicated-cache=dist:add() /subsystem=infinispan/cache-container=ejb/replicated-cache=dist/component=locking:add(isolation=REPEATABLE_READ) /subsystem=infinispan/cache-container=ejb/replicated-cache=dist/component=transaction:add(mode=BATCH) /subsystem=infinispan/cache-container=ejb/replicated-cache=dist/store=file:add(purge=true, passivation=true) /subsystem=infinispan/cache-container=ejb:write-attribute(name=default-cache, value=dist) run-batch # session timeout after 1 minute /subsystem=undertow/servlet-container=default:write-attribute(name=default-session-timeout, value=1) EOF ./server1/bin/jboss-cli.sh --file=$PWD/test.cli ./server2/bin/jboss-cli.sh --file=$PWD/test.cli ./server3/bin/jboss-cli.sh --file=$PWD/test.cli ./server4/bin/jboss-cli.sh --file=$PWD/test.cli {noformat} Deploy an application that is supposed to persist session data: [^clusterbench-ee10.ear]: {noformat} CLUSTERBENCH_EAR=clusterbench-ee10.ear cp $CLUSTERBENCH_EAR ./server1/standalone/deployments/ cp $CLUSTERBENCH_EAR ./server2/standalone/deployments/ cp $CLUSTERBENCH_EAR ./server3/standalone/deployments/ cp $CLUSTERBENCH_EAR ./server4/standalone/deployments/ {noformat} start the 4 nodes in separate shells: {noformat} ./server1/bin/standalone.sh --server-config=standalone-ha.xml -Djboss.socket.binding.port-offset=100 -Djboss.node.name=wildfly1 {noformat} {noformat} ./server2/bin/standalone.sh --server-config=standalone-ha.xml -Djboss.socket.binding.port-offset=200 -Djboss.node.name=wildfly2 {noformat} {noformat} ./server3/bin/standalone.sh --server-config=standalone-ha.xml -Djboss.socket.binding.port-offset=300 -Djboss.node.name=wildfly3 {noformat} {noformat} ./server4/bin/standalone.sh --server-config=standalone-ha.xml -Djboss.socket.binding.port-offset=400 -Djboss.node.name=wildfly4 {noformat} Create enough session in order to get e.g. 3 store files created; if you are familiar with JMeter and you deployed [^clusterbench-ee10.ear], you can use [^jmeter.jmx]; open [^jmeter.jmx] with JMeter 5.5 GUI, and press the start button, wait until all 2000 sessions are created, stop end repeat enough times to get the 3 store files created: !Screenshot from 2023-08-25 16-18-37.png|thumbnail! Alternatively, you can run a script like this: {noformat} for i in {1..20} do echo "JMeter Run $i ..." apache-jmeter-5.5/bin/jmeter -n -t jmeter.jmx done {noformat} At this point you should have the following files: {noformat} $ ls -ltr server1/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data total 32872 -rw-r--r--. 1 tborgato tborgato 16777152 Sep 28 18:12 ispn12.0 -rw-r--r--. 1 tborgato tborgato 16777152 Sep 28 18:22 ispn12.1 -rw-r--r--. 1 tborgato tborgato 105192 Sep 28 18:22 ispn12.2 {noformat} {noformat} $ ls -ltr server2/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data total 32872 -rw-r--r--. 1 tborgato tborgato 16777152 Sep 28 18:12 ispn12.0 -rw-r--r--. 1 tborgato tborgato 16777152 Sep 28 18:22 ispn12.1 -rw-r--r--. 1 tborgato tborgato 105192 Sep 28 18:22 ispn12.2 {noformat} {noformat} $ ls -ltr server3/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data total 32872 -rw-r--r--. 1 tborgato tborgato 16777152 Sep 28 18:12 ispn12.0 -rw-r--r--. 1 tborgato tborgato 16777152 Sep 28 18:22 ispn12.1 -rw-r--r--. 1 tborgato tborgato 105192 Sep 28 18:22 ispn12.2 {noformat} {noformat} $ ls -ltr server4/standalone/data/infinispan/web/clusterbench-ee10.ear.clusterbench-ee10-web.war/data total 32872 -rw-r--r--. 1 tborgato tborgato 16777152 Sep 28 18:12 ispn12.0 -rw-r--r--. 1 tborgato tborgato 16777152 Sep 28 18:22 ispn12.1 -rw-r--r--. 1 tborgato tborgato 105192 Sep 28 18:22 ispn12.2 {noformat} Wait until sessions expire (default should be 30 minutes but this reproduces set session timeout to 1 minute - I have waited more than 1 hour to be sure): you will see that none of these files is nor shrink in size or deleted; Note that if you stop and restart a node the file is automatically deleted; |
Attachment | Original: jmeter.jmx [ 13047864 ] |
Attachment | New: jmeter.jmx [ 13050732 ] |
Attachment | New: screenshot-2.png [ 13050751 ] |
Link |
New:
This issue is caused by |
Link |
New:
This issue is caused by |
Labels | New: waiting |
Labels | Original: waiting | New: waiting-on-infinispan-fix |
Assignee | Original: Tommaso Borgato [ tborgato@redhat.com ] | New: Radoslav Husar [ rhn-engineering-rhusar ] |
Fix Version/s | New: 31.0.0.Beta1 [ 12414670 ] | |
Fix Version/s | Original: 30.0.0.Final [ 12413594 ] |
Link |
New:
This issue is incorporated by |
Git Pull Request | New: https://github.com/wildfly/wildfly/pull/17369 | |
Status | Original: Open [ 1 ] | New: Pull Request Sent [ 10011 ] |
Git Pull Request | Original: https://github.com/wildfly/wildfly/pull/17369 | New: https://github.com/wildfly/wildfly/pull/17369, https://github.com/wildfly/wildfly/pull/17384 |
Status | Original: Pull Request Sent [ 10011 ] | New: Pull Request Sent [ 10011 ] |
Fix Version/s | New: 30.0.1.Final [ 12414983 ] | |
Resolution | New: Done [ 1 ] | |
Status | Original: Pull Request Sent [ 10011 ] | New: Resolved [ 5 ] |
Fix Version/s | New: 31.0.0.Final [ 12418261 ] |
Status | Original: Resolved [ 5 ] | New: Closed [ 6 ] |