Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to Warm Up JIRA / Confluence after stopping?

Jiri Pik
Contributor
July 6, 2018

I am shutting down both JIRA and Confluence daily for the daily backup.

Once the JIRA/Confluence is restarted, its UI (after the user logs in) responds slowly, most likely because the caches are not yet populated.

Is there a way to warm up JIRA/Confluence so that it is as fast as possible even after a new start?

 

1 answer

1 accepted

0 votes
Answer accepted
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 6, 2018

It is because of the caching.  The only way to populate the caches is to hit the UI with a browser, which you could script, I think.

Jiri Pik
Contributor
July 6, 2018

Nic:

thank you. 

Pre-populating caches via script is the standard in the Apache Httpd world where you typically load all pages in the sitemap.

  1. Are you aware of what specific pages should be hit by the script (would a single issue of a project suffice or shall I hit more)?
  2. Would the cache be global or per user?
  3. Would hitting the API suffice or should I use the selenium or so libs?
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 6, 2018

Problem is the pages are not static, they're generated.  So it can't know what to put in the Tomcat cache until the request arrives, that's why there's no pre-set for it.

But yes, a simple hit will cache a whole load of stuff that will get reused.

  1. Yes, I'd hit an issue that you know is always going to be there. 
  2. It's global
  3. You need to use the Gui ideally - a lot of the stuff it caches is related to building the pages for the browser.  A REST call would still do some of it as it would start caching the "get issue data" stuff, but that's only a tiny fraction of the cache you want to pre-load.

There is a minor trick - although I've said "hit the GUI", that is really just a url, and you don't actually care what you get back.  So, when I've done this in the past, I cheat:

  • Pick a project that has the permission "browse: group: anyone".  Even if it only has one single issue in it, that's fine.  This means the issue is visible without logging in. 
  • Selenium is overkill if you don't need to log in or even do anything with the issue. A simple curl or wget that bins the result will do it fine.

This means your "provoke Jira into starting to build its internal caches" routine can be as simple as

curl https://yourserver/jira/browse/CACHEBUILD-1

I even added it to the "start Jira" script I was using, albeit with a little more around it to give JIra a while to start.  Gave it a 30 second sleep and then start repeating the call until the return result had some text that I knew was on the CACHEBUILD-1 issue.

Jiri Pik
Contributor
July 6, 2018

THANK YOU

MelviN December 21, 2024

How is Confluence warm up? https://confluence (CACHEBUILD-1) not working...

Suggest an answer

Log in or Sign up to answer