Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW

How to clear the cache used by QlikView Server and QlikSense Engine

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
Bjorn_Wedbratt
Former Employee
Former Employee

How to clear the cache used by QlikView Server and QlikSense Engine

Last Update:

Aug 24, 2023 6:54:34 AM

Updated By:

Sonja_Bauernfeind

Created date:

Sep 20, 2012 8:53:12 AM

The cache is handled automatically by QlikView Server or Qlik Sense Engine and should not be cleared manually.

However, in some situations, there might be a reason to clear the cache on a regular basis. An example would be memory starvation due to an insufficiently sized system. 

Note using this option does not unload any Documents/Apps from memory. It only clear out stored information such as sessions and calculations.

Clearing the cache has an immediate negative impact on performance. Qlik is built as an in-memory engine and relies on access to cached information in memory. We do not recommend using the clear cache functionality but instead ensure the server is correctly scaled.


Environment:

QlikView any version 
Qlik Sense all verions

 

The first and obvious way to clear the cache is to restart the QlikView Server or the Qlik Sense engine service. This leads to service interruption and will disconnect users.
 
Another option is to enable automated cache clearing by modifying the Engine settings.ini file.
 
File locations:

QlikView:
%ProgramData%\QlikTech\QlikView Server

Qlik Sense:
%ProgramData%\Qlik\Sense\Engine for QlikSense
 
[Settings 7]
ClearCacheTimesPerDay=1


The value set is the number of times per day the cache will be cleared, synchronized at midnight. A value of 1 will clear the cache once per day at midnight (UTC). The number needs to be 1 or higher. Always a natural number.

AttentionClearing the cache may lead to increased response times from the user's perspective.  Use with caution!

Details on how to modify the settings.ini for Sense: How to modify Qlik Sense Engine's Settings.ini.

To verify if the cache is cleared, perform the below.

Qlik Sense Enterprise on Windows:
  1. Set the Engine System logging to Debug.
  2. This will then generate the PhoenixThread: Zap/clear cache performed line in the _System_Engine.txt log file at the time of cach clearing.
QlikView:
  1. Set the QlikView Event logs to Debug, see How to turn on debug logging for the QlikView Server 
  2. The following line will be output in the logs when the cache clear happens:  PhoenixThread: Zap/clear cache performed

 

Labels (1)
Comments
SwapneelGolapkar
Contributor III
Contributor III

Hi @Sonja_Bauernfeind

Can you please help us understand more clearly.

If we save the settings service as ClearCacheTimesPerDay=1

And restart the server at 2 pm.

Then the next automatic service restart would happen after 24 hours 2 pm   or at midnight ?

Will it kill the current users live session ? 

How can we confirm that Cache got cleared ?

 

If it occurs at midnight then setting -> ClearCacheTimesPerDay=3 will restart it at which two timings ?

(8, 16, 24) o clocks ?

 

Please help confirm!

 

Thanks

 

Sonja_Bauernfeind
Digital Support
Digital Support

Hello @SwapneelGolapkar 

It is always synchronized with midnight UTC (so, 00:00 UTC). Meaning if you set it to 1, it will clear cache once, at midnight.

Please note that this is not a restart. It will not restart any services, but it will drop cached information from, well, the cache. This also means that user traffic will not be impacted at the time of cache clearing. What users may see afterwards is that their experience in an app may be slower, as the Qlik engine will not have any cached data to make use of and has to recalculate everything.

>>> If it occurs at midnight then setting -> ClearCacheTimesPerDay=3 will restart it at which two timings? (8, 16, 24) o clocks ?

00/24, 8, 16, then 00/24 again, that is correct (UTC).

All the best,
Sonja 

SwapneelGolapkar
Contributor III
Contributor III

Thanks @Sonja_Bauernfeind 

Appreciate your quick responses and detailed reply.

Can you plz also suggest how can we validate this ? is there a log which keeps a track of Cache being cleared ?

Or any System event which we can check when Clearing happens ?

 

Regards,

Swapneel

Sonja_Bauernfeind
Digital Support
Digital Support

Hello @SwapneelGolapkar 

To verify: 

  1. Set the Engine System logging to Debug.
  2. This will then generate the PhoenixThread: Zap/clear cache performed line in the _System_Engine.txt log file at the time of cach clearing.
SwapneelGolapkar
Contributor III
Contributor III

Thanks @Sonja_Bauernfeind  for answering my queries.

 

Kind Regards,

Swapneel

dmitri_volkov
Contributor III
Contributor III

Set

ClearCacheTimesPerDay=2

and system logs

20230813T150030.478+0300 PhoenixThread: Zap/clear cache performed

20230814T030011.302+0300 PhoenixThread: Zap/clear cache performed

Seems that cache is cleared at 03:00 and at 15:00 local time.

What needs to be done to have cache cleared at 00:00 and at 12:00 local time?

Sonja_Bauernfeind
Digital Support
Digital Support

Hello @dmitri_volkov 

Later versions of QlikView and Qlik Sense rely on UTC, so you'd be setting the timing for UTC. Specifying other times is not possible.

Please note that this functionality is not recommended, as it has an impact on Qlik's performance; we recommend ensuring the servers are correctly scaled and can manage their memory requirements without the need of cache clearing or restarts.

All the best,
Sonja

Version history
Last update:
‎2023-08-24 06:54 AM
Updated by: