4
$\begingroup$

The view counter on questions on the main site doesn't seem to get updated immediately as it does on other SE sites, or even in meta, here. I believe this is some software error on the developer's end. I've been actually observing this since Day 1 of the site, however I thought it would eventually get fixed. But finally, I'm compelled to write about the issue.

Proof:

enter image description here

For example, the "viewed" section (notice top-right of image) there was stuck at 1 time, even I clearly and some other people in the chatroom clearly viewed the question. I even left a comment on the question as you can see. But even then the view counter is stuck at 1 time. From what I've noticed it takes around 10-15 minutes after asking a new question, for the view counter to actually show the correct number of views (just a rough observation).

Could the developer team please clarify what's going on?

$\endgroup$
  • $\begingroup$ The chat widget on the right side of the site also seems to take a while to update. $\endgroup$ – Daniel Burkhart Mar 26 '18 at 2:39
  • $\begingroup$ Is this still an issue? $\endgroup$ – Mithrandir24601 Apr 24 '18 at 21:05
  • 1
    $\begingroup$ @Mithrandir24601 It does still seem to be an issue. Checked it last yesterday, when I posted a question on the main site. $\endgroup$ – Sanchayan Dutta May 4 '18 at 8:52
  • $\begingroup$ Reproduced (finally!) on Firefox 60 ('quantum') on Windows 10 $\endgroup$ – Mithrandir24601 May 31 '18 at 23:30
2
$\begingroup$

It turns out that this is standard, expected behaviour, as per this answer on meta SE:

There is some sort of a throttling mechanism in action. It saves the information about a question view per visitor like in pairs:

  • for anonymous users, it is IP + QuestionNr.

  • for authenticated users it is UserNr + QuestionNr.

This information is saved in an expiring cache entry for about 15 minutes. If a subsequent hit sees the entry is still there it discards the new hit. If it is already gone it allows for a new record.

Every time a new hit is registered, it is also added to a memory buffer in addition to the expiring cache entry. The buffer itself also expires after a few minutes or after it is filled up to a certain size, whichever happens first. When it expires, everything it has accumulated is written into the database in bulk. They call it a "buffered write scheme".

That is, every time a question gathers a unique view in an approximately 15 minute window, that view gets added to a buffer, which then updates the number of views on the question when the buffer is either full or after a few minutes (whichever comes first).


for reference, I wrote a similar answer on Worldbuilding meta

$\endgroup$
1
$\begingroup$

I believe that to be the standard behavior. View counts are in my experience subject to some caching. I have observed that on many SE sites which would point to a more systemic problem if it isn't a wanted behavior.

$\endgroup$
  • $\begingroup$ The view counter seems to work fine on meta and other sites though. On Math SE and Physics SE almost immediately it gets updated. $\endgroup$ – Sanchayan Dutta Mar 25 '18 at 21:04
1
$\begingroup$

Apparently it's updated by a batch background process, see: https://meta.stackoverflow.com/questions/321488/update-the-viewed-counter-asynchronously or What stats are refreshed automatically, other than post score? (and linked to/related, on the right).

Each user is scored one view no matter how many times they view it. Supposedly there's a lot to it. If you want an update you can refresh the webpage. The same on the main site, or other sites; it's just that elsewhere schedules the process at different frequencies and priorities.

While I was looking for info on this and then came back here it still gave the same value but refreshing incremented it. Refreshing a few seconds later again incremented it, while a third attempt did not.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .