4

For last few weeks my profile count on main site is stick on 37. I have tested this with few users of Meta Stack Over here. They visited my profile for testing purpose. But even after 5-6 hours after they visited the count remains 37. So it's not a caching issue.

This doesn't happen on Stack Overflow or Meta Stack Overflow. So posting here only. Can we look into it?


Update

It's almost 2 days after that user visited my profile. Still the count remains 37. So it's probably not a heavy caching too.

  • When in doubt, blame caching. If it's not caching, then blame heavy caching. – Michael Myers Sep 29 '13 at 3:19
  • @MichaelMyers - May be, but when will the heavy caching be cleared? – hims056 Sep 30 '13 at 4:20
6

I checked with the devs and it turns out the answer is:

Caching

Heavy caching even. Each of our web servers buffer incrementing view counts until a threshold is met, then all the updates are written to the database. So, we have 9 web servers and the default site threshold is 10 views of all profiles for each site. Therefore a web server needs to get 10 views of Sports' users to have those views get saved. On large sites, the threshold is higher (SO = 300 views, SU and SF = 30 views) to avoid constant database updates. On child metas, which are far less likely to be updated, the threshold is 1.

So your views are being counted by whichever server the users happened to hit, but they haven't been pushed to the database because none has served up 10 or more profiles since the last time the view counts were updated. (In theory, it could take 82 profile views for that to happen. But probably not.)

As a result of this question, the threshold has been set to 5 for small sites, such as Sports.

Update: as an experiment, I clicked through to your profile (it was still at 37), then I clicked through 4 other profiles on the site. Since the threshold is now 5 and since I (presumably) was hitting the same web server, the threshold for profile views was reached. Sure enough, when I looked back at your profile, the view count had risen to 38. (And the other people who I'd viewed had their view count incremented as well.) So the system is working as designed.

  • Thanks. However I didn't get the meaning of threshold here. (the default site threshold is 10 views of all profiles for each site). Can you explain please? – hims056 Oct 2 '13 at 7:32
  • 2
    @hims056: Sure. Each web server waits until it has 10 (now 5) views of any profile on the site before the view count is updated from that server. I was able to trigger an update to your profile by looking at 4 other people's profiles. I'm pretty sure that these are unique views so one person hitting the same profile 5 times won't work. And 5 people hitting one profile won't work either unless the are very lucky and all end up on the same web server. Does that help? – Jon Ericson Oct 2 '13 at 15:56

You must log in to answer this question.

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