Activity metrics updated only once per day?


We are using the latest version of Discourse. Recently I noticed that the Activity Metrics reports on the administration page is being updated only once per day. Actually: only in the first time of the day that I access the manager. Is it normal? Can I configure Discourse to update this report more frequently?


My understanding is that the stats in the activity section should be updated once every half hour. That doesn’t seem to be happening though. There is no setting that can be used to configure this. We’ll take a look at what’s going on with it.


Is there any log file I could check to see if there’s something wrong with our installation?

I am seeing the same issue on other sites, so I don’t think there is a problem with your installation. The problem I’m seeing is that the stats in the Activity section of the admin dashboard do not keep in sync with the stats of the individual reports that the data is pulled from. We will look into what is going on with this.


Can I help in some way?

1 Like

I am also seeing a lag in the Activity Metrics reports that doesn’t seem to be matching the actual engagement on the community.

I have an admin who wants minute-by-minute counts of today’s pageviews.
This hasn’t updated in a long while:

Shows 1372 pageviews

but still isn’t updating. I’ve poked around and don’t see which sidekiq task might update these.

Is there somewhere else to look?


I’m still seeing this issue in the Today column of the Activity Metrics on Meta. I’m fairly sure the results are only supposed to be cached for half an hour, but it seems that the results for that section are cached for a longer period of time.


(Sorry I missed this topic before, Simon, thanks for moving!)

The strange thing is that the client claims that this hasn’t been a problem until today.

Well, that’s bizarre, as I’d think that (1) you’d know and (2) meta would “work.”

But stranger still is that 20 hours ago the site owner claimed

And this is a standard 2-container install running Discourse 2.6.0.beta1 that hasn’t been updated for 4 weeks.

I have the same problem.

Although the admin page says that the overview has been updated for a few minutes, this only happens once a day. How can I set this to be updated more than once a day?

Bildschirmfoto 2020-12-22 um 14.03.19

Found out that the problem is only with the month view. If I switch to the weekly view, the statistics are correct.

OK. Not everything is up to date in the week view.

I’m not the person to fix this, but the issue could be related to what’s going on here:

Reading through that file, it seems that the intention is for the stats to only be cached for 30 minutes, but as far as I can tell, the stats are only updated once per day.

Most likely unrelated, but the setex method seems like it takes a time in seconds, not minutes. The code is passing 35.minutes in its call to the method. I’m assuming there is some Rails magic that handles the conversion to seconds.


Does anyone else have a tip?

Ok this is awaiting review/merge but that should fix it:

This was a bug in our cache.rb library where we were not passing the expires_in value and as a result were using the default value of one day instead of 30 minutes.


This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.