Abbreviations, used in manual:
- DD - Drop Down
- FW - Form Wizard
- ARC - Advanced Rest Client
quilliup utilizes Ehcache for DDs, by default it's on.
For comprehensive information on Ehcache, please refer to the following resources:
https://www.ehcache.org/generated/2.9.0/pdf/Ehcache_Configuration_Guide.pdf
https://www.ehcache.org/documentation/2.8/get-started/storage-options.html
https://docs.gigaspaces.com/latest/production/production-jvm-tuning.html
When a DD is created, updated, or used for the first time in a FW, its SQL query is fully implemented in DB by appropriate limit, results are saved in cache and all the following results for this particular DD will be loaded from cache without querying DB again. In that case, FWs that contain DDs will be loaded much faster.
The cached DD values are automatically refreshed whenever changes occur in the DD’s SQL query or in any specific parameter values that determine the DD’s cache lifetime.
Related configuration file: "..\quilliup\webapps\ROOT\WEB-INF\classes\ehcache.xml".
Parameters in ehcache.xml file:
<!-- By default, Ehcache stored the cached files in the temp folder. -->
<diskStore path="PATH_TO_RELATED_FOLDER" />
<!-- caching for DDs/LOVs in RDA -->
<cache name="dd_queries" maxEntriesLocalHeap="700" eternal="false"
timeToIdleSeconds="3600" timeToLiveSeconds="3600"
maxEntriesLocalDisk="2500"
memoryStoreEvictionPolicy="LFU" transactionalMode="off">
<persistence strategy="none" />
ehcahe.xml parameters:
1. diskStore path - the path to the directory where any required disk files will be created is configured with the sub-element of the Ehcache configuration. For "localTempSwap", if the DiskStore path is not specified, a default path is used for the disk storage tier, and the default path will be auto-resolved in the case of a conflict with another CacheManager.
2. maxEntriesLocalHeap - the maximum number of entries or bytes a data set can use in local heap memory. This setting is required for every cache.
3. timeToLiveSeconds – the maximum number of seconds an element can exist in the cache regardless of use. The element expires at this limit and will no longer be returned from Ehcache . The default value is 0, which means no TTL eviction takes place (infinite lifetime). TTL specifies the maximum time (in seconds) that an entry can stay in the cache before it is considered expired, starting from the time the entry was created or last updated.
4. timeToIdleSeconds – the maximum number of seconds an element can exist in the cache without being accessed. The element expires at this limit and will no longer be returned from Ehcache. It's default value is 0, which means no TTI eviction takes place (infinite lifetime). TTI specifies the maximum time (in seconds) that an entry can remain idle in the cache before it is considered expired. "Idle" means not accessed.
5. maxEntriesLocalDisk - the maximum number of entries or bytes a data set can use on the local disk. Note that these settings apply to temporary disk usage (localTempSwap); these settings do not apply to disk persistence.
6. memoryStoreEvictionPolicy - attribute specified in the configuration file. Legal values are LRU (default), LFU and FIFO:
- Least Recently Used (LRU) — LRU is the default setting. The last-used timestamp is updated when an element is put into the cache or an element is retrieved from the cache with a get call.
- Least Frequently Used (LFU) — for each get call on the element the number of hits is updated. When a put call is made for a new element (and assuming that the max limit is reached for the memory store) the element with the least number of hits, the Less Frequently Used element, is evicted.
- First In First Out (FIFO) — elements are evicted in the same order as they come in. When a put call is made for a new element (and assuming that the max limit is reached for the memory store) the element that was placed first (First-In) in the store is the candidate for eviction (First-Out).
** Note: A folder for the diskStore path should be created manually.
For an extended explanation in the logs regarding EH cache, add the following rows to the log4j.xml file:
<logger name="net.sf.ehcache" level="DEBUG"/>
<logger name="net.sf.ehcache.config" level="DEBUG"/>
<logger name="net.sf.ehcache.store" level="DEBUG"/>For additional information on how to modify the log4j file, please use the How to run quilliup in debug mode manual.
------------------------------------ Disabling DD cache Windows -------------------------------------
Pay attention to two possible cases:
Case 1 - your quilliup version is lower than 2.9.0, follow the next steps:
In order to disable the DD's cache, a parameter needs to be added to two Tomcat files. Required steps:
- Stop quilliup.
- change the parameters in:
-
"../quilliup/bin/catalina.bat" - search for set JAVA_OPTS
add at the end of the row next value -Dnet.sf.ehcache.disabled=true
-
"../quilliup/bin/service.bat" - search for --JvmOptions "-Dcatalina.home=%CATALINA_HOME%;
add at the end of the row next value -Dnet.sf.ehcache.disabled=true
(For example: ...-XX:+CMSPermGenSweepingEnabled;-Dnet.sf.ehcache.disabled=true" ^)
- Delete logs and catalina
- Delete quilliup service:
-
Service can be deleted using next cmd command:
Go to cmd -> right click -> run as Administrator - Switch to correct path, for example: cd "..\quilliup\bin"
- Run next command: sc delete quilliup* this command will delete the current service with name quilliup. Open the Services and refresh the list to make sure it was deleted.
- Create new service:
-
Service can be created using next cmd command:
Go to cmd -> right click -> run as Administrator - Switch to correct path: cd "..\quilliup\bin"
- Run the next command: service.bat install quilliup
- This will create/install the service named quilliup. Open the Services and refresh the list to make sure it was created
- Update user for quilliup service:
- Stop quilliup service from the Task manager
- Insert user's details in Properties -> Log On section
3. Restart quilliup service.
Case 2: Your quilliup version is 2.9.0 and upper, follow the next steps to disabling DD cache:
- Stop the service
- Delete log files and Catalina folder from "../quilliup/logs" & "../quilliup/work/Catalina"
- Open the config.properties file located at: "..quilliup\webapps\ROOT\WEBINF\classes\config.properties".
-
Set the following parameter:
disable.dds.cache=true. - Start the service.
------------------------------------ Disabling DD cache Linux-------------------------------------
Pay attention to two possible cases:
Case 1 - your quilliup version is lower than 2.9.0, follow the next steps to disabling DD cache:
In order to disable the DD's cache, a parameter needs to be added to one of the Tomcat files. Required steps:
1. Kill the java process:
ps -ef | grep tomcat -> get the number of the tomcat process ->'Kill <process number>' (of the TOMCAT)Check for the tomcat process number using the "ps -ef | grep tomcat" command:
Kill the Tomcat process using the "kill -9 XXXX" command. (For example, in the above case XXXX = 1719):
2. Go to "../APACHE_INSTALLATION/bin/catalina.sh"
Go to line 251 and add at the end of the row the next value -Dnet.sf.ehcache.disabled=true
3. Delete all the log files (empty "logs" folder) from quilliup logs folder: "../APACHE_INSTALLATION/logs"
4. Delete the "Catalina" folder from quilliup work folder: "../APACHE_INSTALLATION/work"
5. Start tomcat server by running the command:
'./catalina.sh start' (location "../apache-tomcat.../bin)
6. Go to "../APACHE_INSTALLATION/logs" and open "catalina.out" file.
Search for the next row in order to make sure that the DropDown cache has disabled:
"...INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dnet.sf.ehcache.disabled=true..."
Case 2: Your quilliup version is 2.9.0 and upper, follow the next steps to disabling DD cache:
1. Kill the java process:
ps -ef | grep tomcat -> get the number of the tomcat process ->'Kill <process number>' (of the TOMCAT)Check for the tomcat process number using the "ps -ef | grep tomcat" command: Kill the Tomcat process using the "kill -9 XXXX" command. (For example, in the above case XXXX = 1719):
2. Go to "../quilliup/webapps/ROOT/WEB-INF/classes/config.properties"
3. Set the following parameter:
disable.dds.cache=true.
4. Delete all the log files (empty "logs" folder) from quilliup logs folder: "../quilliup/logs"
5. Delete the "Catalina" folder from quilliup work folder: "../quilliup/work"
6. Start tomcat server by running the command:
'./catalina.sh start' (location "../quilliup/bin").
Comments
0 comments
Please sign in to leave a comment.