# Daily performance reports keep asking to rebuild container

**URL:** https://meta.discourse.org/t/daily-performance-reports-keep-asking-to-rebuild-container/38311
**Category:** Self-hosting
**Created:** [January 21, 2016, 6:51pm UTC](https://meta.discourse.org/t/daily-performance-reports-keep-asking-to-rebuild-container/38311 "2016-01-21T18:51:16Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)
#### Post date: [January 21, 2016, 6:51pm UTC](https://meta.discourse.org/t/daily-performance-reports-keep-asking-to-rebuild-container/38311/1 "2016-01-21T18:51:16Z")

</div>

## Reproduce:

1. Enable the site setting **daily performance report** (“Analyze NGINX logs daily and post a Staff Only topic with details”).

2. Update the Docker image:

## Expected Results:

- A report appears in the “Staff” category periodically.

## Actual Results:

- An error message appears in the “Website performance reports” topic in the “Staff” category:

> Report is only available in latest image, please run:  
> cd /var/discourse  
> ./launcher rebuild app

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [January 21, 2016, 6:54pm UTC](https://meta.discourse.org/t/daily-performance-reports-keep-asking-to-rebuild-container/38311/2 "2016-01-21T18:54:21Z")

</div>

> [@downey](#):
>
> 2 Update the Docker image:
> 
> cd /var/discourse  
> ./launcher rebuild app

You need a git pull before the rebuild as seen here:

> [@Manually update Discourse and Docker image to latest](https://meta.discourse.org/t/how-do-i-update-my-docker-image-to-latest/23325):
>
> bookmark This guide provides step-by-step instructions for manually updating Discourse, the Docker container, and the Ubuntu operating system on a self-hosted setup. person_raising_hand Required user level: System Administrator warning SSH access to the server. If you self-host Discourse, you occasionally need to run a manual update via the command line to get the latest security releases and newest libraries. These updates are not picked up in admin/upgrade, which is why you’ll occa…

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [January 21, 2016, 9:05pm UTC](https://meta.discourse.org/t/daily-performance-reports-keep-asking-to-rebuild-container/38311/3 "2016-01-21T21:05:06Z")

</div>

Not necessarily I thought the launcher command did an implicit git pull @sam?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [January 21, 2016, 9:07pm UTC](https://meta.discourse.org/t/daily-performance-reports-keep-asking-to-rebuild-container/38311/4 "2016-01-21T21:07:12Z")

</div>

That change was only made in the last year, very possible @downey has an older git repo.

---

<div class="post-metadata">

### Author: ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)
#### Post date: [January 21, 2016, 10:09pm UTC](https://meta.discourse.org/t/daily-performance-reports-keep-asking-to-rebuild-container/38311/5 "2016-01-21T22:09:36Z")

</div>

Don’t know exactly when the change happened but I thought I’d updated  
fairly recently. After doing the first rebuild I could have sworn I saw a  
git pull but I didn’t watch carefully enough. As soon as I can take a  
little more downtime (probably tonight) will try again.

---

<div class="post-metadata">

### Author: ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)
#### Post date: [January 26, 2016, 6:19pm UTC](https://meta.discourse.org/t/daily-performance-reports-keep-asking-to-rebuild-container/38311/6 "2016-01-26T18:19:13Z")

</div>

I definitely did a full `git pull` and then `./launcher rebuild app` last night … but still getting the same bug every day instead of a performance report.

Can anyone reproduce? Is anyone able to successfully get the performance report?

---

<div class="post-metadata">

### Author: ![Stefan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stefan/32/104823_2.png) [@Stefan](https://meta.discourse.org/u/Stefan)
#### Post date: [February 7, 2016, 9:05am UTC](https://meta.discourse.org/t/daily-performance-reports-keep-asking-to-rebuild-container/38311/7 "2016-02-07T09:05:46Z")

</div>

I’m having the same issue. My guess is that because ./launcher rebuild says “Your version of Discourse Docker is ahead of origin” when git tries to get the latest version, so the latest version is never pulled?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [February 7, 2016, 10:31am UTC](https://meta.discourse.org/t/daily-performance-reports-keep-asking-to-rebuild-container/38311/8 "2016-02-07T10:31:38Z")

</div>

Likely, can you just check out discourse-docker from scratch?

---

<div class="post-metadata">

### Author: ![Stefan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stefan/32/104823_2.png) [@Stefan](https://meta.discourse.org/u/Stefan)
#### Post date: [February 7, 2016, 4:44pm UTC](https://meta.discourse.org/t/daily-performance-reports-keep-asking-to-rebuild-container/38311/9 "2016-02-07T16:44:03Z")

</div>

Actually what I did was `git reset --hard origin/master` to have the repository in sync again and then another` ./launcher rebuild` (that didn’t trigger the “ahead of origin” message). Now I’l wait to see if I get the reports. Is there any way to trigger those reports manually so that I don’t have to wait?

---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [February 7, 2016, 5:00pm UTC](https://meta.discourse.org/t/daily-performance-reports-keep-asking-to-rebuild-container/38311/10 "2016-02-07T17:00:30Z")

</div>

Visit /sidekiq/scheduler and trigger Jobs::DailyPerformanceReport AFAIK?

---

<div class="post-metadata">

### Author: ![Stefan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stefan/32/104823_2.png) [@Stefan](https://meta.discourse.org/u/Stefan)
#### Post date: [February 7, 2016, 5:22pm UTC](https://meta.discourse.org/t/daily-performance-reports-keep-asking-to-rebuild-container/38311/11 "2016-02-07T17:22:47Z")

</div>

That worked, thanks! Now I get the report and that’s really nice!

---

<div class="post-metadata">

### Author: ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)
#### Post date: [February 12, 2016, 5:06pm UTC](https://meta.discourse.org/t/daily-performance-reports-keep-asking-to-rebuild-container/38311/12 "2016-02-12T17:06:25Z")

</div>

FWIW, I did the `git reset --hard origin/master` and then `./launcher rebuild app` and still have the same problem.

---

<div class="post-metadata">

### Author: ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)
#### Post date: [February 24, 2016, 3:28pm UTC](https://meta.discourse.org/t/daily-performance-reports-keep-asking-to-rebuild-container/38311/13 "2016-02-24T15:28:12Z")

</div>

Has anyone else seen this problem? (Or can reproduce it if they’re willing to try to enable the option?)

Edit: @Lee_Ars & @Sander78 you were both reporting this in another now-locked topic, are you still having the problem?

Is there somewhere I could look to see if my Docker image is the right version or has the right code to do this?

---

<div class="post-metadata">

### Author: ![Sander78](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sander78/32/296615_2.png) [@Sander78](https://meta.discourse.org/u/Sander78)
#### Post date: [February 29, 2016, 9:13am UTC](https://meta.discourse.org/t/daily-performance-reports-keep-asking-to-rebuild-container/38311/14 "2016-02-29T09:13:08Z")

</div>

Yep, still there. Eventually I turned it off.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [February 29, 2016, 9:39am UTC](https://meta.discourse.org/t/daily-performance-reports-keep-asking-to-rebuild-container/38311/15 "2016-02-29T09:39:04Z")

</div>

If you give me access to your host I can have a quick look

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [March 2, 2016, 5:29am UTC](https://meta.discourse.org/t/daily-performance-reports-keep-asking-to-rebuild-container/38311/16 "2016-03-02T05:29:09Z")

</div>

I don’t want to cause an outage @downey but you have an old pattern in your template:

You have:

```plaintext
volumes:
  - volume:
      host: /var/discourse/shared
      guest: /shared

```

It should be:

```plaintext
volumes:
  - volume:
      host: /var/discourse/shared
      guest: /shared

  - volume:
      host: /var/discourse/shared/var-logs
      guest: /var/log

```

This in turn causes 2 things:

1. You are storing logs inside the container… which is bad
2. Permissions are not ideal on that logs

---

<div class="post-metadata">

### Author: ![dax](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dax/32/244677_2.png) [@dax](https://meta.discourse.org/u/dax)
#### Post date: [May 31, 2016, 10:50pm UTC](https://meta.discourse.org/t/daily-performance-reports-keep-asking-to-rebuild-container/38311/17 "2016-05-31T22:50:02Z")

</div>

In my case the sysadmin deleted Staff category when we installed discourse (3 years ago).

Now I have create another Staff category (only admins and staff can create/reply/see it).  
This category was created before the last upgrade to Discourse Docker Image 1.3.3 (so we have ` git pull` and `rebuild all` and the upgrade was a success).

By the way in logs I have this error when I trigger `Jobs::DailyPerformanceReport` in sidekiq:

![](https://global.discourse-cdn.com/meta/original/4X/c/d/7/cd7c6b26d08cd215441158827b10a3daec737408.png)  
 ![](https://global.discourse-cdn.com/meta/original/4X/2/2/6/226fdbddb679774f9f6d6d7b7fa3e9225a842dba.png)

Have I missed something?

---

<div class="post-metadata">

### Author: ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)
#### Post date: [June 4, 2016, 10:31pm UTC](https://meta.discourse.org/t/daily-performance-reports-keep-asking-to-rebuild-container/38311/18 "2016-06-04T22:31:12Z")

</div>

So this week I did a completely new install on a new box following the standard instructions and script, and this problem is back ☹

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [June 5, 2016, 4:50am UTC](https://meta.discourse.org/t/daily-performance-reports-keep-asking-to-rebuild-container/38311/19 "2016-06-05T04:50:51Z")

</div>

You need to set the hidden site setting staff\_category\_id to the ID of the new staff category.

There’s no UI to do this (because it’s hidden, you’re not supposed to change it), so you need to muck with request editing 😕

---

<div class="post-metadata">

### Author: ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)
#### Post date: [June 12, 2016, 9:17pm UTC](https://meta.discourse.org/t/daily-performance-reports-keep-asking-to-rebuild-container/38311/20 "2016-06-12T21:17:08Z")

</div>

> [@sam](#):
>
> You are storing logs inside the container… which is bad  
> Permissions are not ideal on that logs

> [@downey](#):
>
> So this week I did a completely new install on a new box following the standard instructions and script, and this problem is back

Looking at the “stock” out of the box installation, I see the following volumes that were set up:

```plaintext
volumes:
  - volume:
      host: /var/discourse/shared/standalone
      guest: /shared
  - volume:
      host: /var/discourse/shared/standalone/log/var-log
      guest: /var/log

```

Anything wrong with that that would be causing this problem to appear?

[Next page](https://meta.discourse.org/t/daily-performance-reports-keep-asking-to-rebuild-container/38311.md?page=2)
