# User Profile Views - Extremely High Lately

**URL:** https://meta.discourse.org/t/user-profile-views-extremely-high-lately/48487
**Category:** Support
**Created:** [August 11, 2016, 4:46am UTC](https://meta.discourse.org/t/user-profile-views-extremely-high-lately/48487 "2016-08-11T04:46:44Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![BCHK](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bchk/32/3268_2.png) [@BCHK](https://meta.discourse.org/u/BCHK)
#### Post date: [August 11, 2016, 4:46am UTC](https://meta.discourse.org/t/user-profile-views-extremely-high-lately/48487/1 "2016-08-11T04:46:44Z")

</div>

I’m getting a crazy high number of User Profile Views lately - and I’m wondering what it means. It used to be down in the low hundreds - but the past few weeks its been up around 10,000 per day. It seems like someone is hitting them way too hard - is there any easy way to see who it is, or block them?

 ![](https://global.discourse-cdn.com/meta/original/3X/a/f/af2d987f6f04d92c1bcfd2cf7d9e53b750c5eac5.png)

---

<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: [August 11, 2016, 4:51am UTC](https://meta.discourse.org/t/user-profile-views-extremely-high-lately/48487/2 "2016-08-11T04:51:43Z")

</div>

Hmm, did anything change in that code path recently @sam?

I don’t see any anomalous stats here on meta:

 ![](https://global.discourse-cdn.com/meta/original/3X/2/8/288dfef6e74d0c5d4c8602f6ef0c8fc9dc474bd8.png)

---

<div class="post-metadata">

### Author: ![erlend\_sh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/erlend_sh/32/119475_2.png) [@erlend\_sh](https://meta.discourse.org/u/erlend_sh)
#### Post date: [August 11, 2016, 8:56am UTC](https://meta.discourse.org/t/user-profile-views-extremely-high-lately/48487/3 "2016-08-11T08:56:00Z")

</div>

We have at least two other recorded cases of this happening:

[https://meta.discourse.org/t/user-profile-views-dramatic-increase-in-count/38557?u=erlend\_sh](https://meta.discourse.org/t/user-profile-views-dramatic-increase-in-count/38557)

> [@Noticing a strange pattern. How high are profile views on your community?](https://meta.discourse.org/t/noticing-a-strange-pattern-how-high-are-profile-views-on-your-community/46833):
>
> I manage a couple of communities, they are both the same size (both member count and active members) and both run on Discourse. In one of those communities we get ~100 User Profile Views per week and in the other we get ~17.5k per week. That number is almost inconceivably different, so I’m curious to know whether anyone else is experiencing something similar. For context, these communities both sit around the 1500 member mark. Edit: This seems to be a relatively recent phenomenon. I’m suspic…

---

<div class="post-metadata">

### Author: ![BCHK](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bchk/32/3268_2.png) [@BCHK](https://meta.discourse.org/u/BCHK)
#### Post date: [August 11, 2016, 6:49pm UTC](https://meta.discourse.org/t/user-profile-views-extremely-high-lately/48487/4 "2016-08-11T18:49:38Z")

</div>

Here is my “trend line” the past few months on User Profile Views:

 ![](https://global.discourse-cdn.com/meta/original/3X/7/a/7ad0c322b9de4cc2ac26d40c958ed849e6a4ce36.png)

---

<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: [August 11, 2016, 9:32pm UTC](https://meta.discourse.org/t/user-profile-views-extremely-high-lately/48487/5 "2016-08-11T21:32:03Z")

</div>

@tgxworld we should cross correlate with kibana to see if this looks legit, in particular confirm we can count it all and that we are not counting user card expands

---

<div class="post-metadata">

### Author: ![BCHK](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bchk/32/3268_2.png) [@BCHK](https://meta.discourse.org/u/BCHK)
#### Post date: [August 17, 2016, 11:16pm UTC](https://meta.discourse.org/t/user-profile-views-extremely-high-lately/48487/6 "2016-08-17T23:16:41Z")

</div>

Any updates on this?

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [August 23, 2016, 8:35am UTC](https://meta.discourse.org/t/user-profile-views-extremely-high-lately/48487/7 "2016-08-23T08:35:24Z")

</div>

Fixed in

[https://github.com/discourse/discourse/commit/17f0727b0409ca92001c78a7b8d954c83d94121a](https://github.com/discourse/discourse/commit/17f0727b0409ca92001c78a7b8d954c83d94121a)

Only forums that are using @DiscourseMetrics.com are affected by this bug.

---

<div class="post-metadata">

### Author: ![BCHK](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bchk/32/3268_2.png) [@BCHK](https://meta.discourse.org/u/BCHK)
#### Post date: [August 23, 2016, 7:58pm UTC](https://meta.discourse.org/t/user-profile-views-extremely-high-lately/48487/8 "2016-08-23T19:58:57Z")

</div>

Great. Please Let us know when its been phased into the code for the discourse-hosted sites.

Thanks.

---

<div class="post-metadata">

### Author: ![JagWaugh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagwaugh/32/69335_2.png) [@JagWaugh](https://meta.discourse.org/u/JagWaugh)
#### Post date: [February 21, 2017, 7:57am UTC](https://meta.discourse.org/t/user-profile-views-extremely-high-lately/48487/9 "2017-02-21T07:57:33Z")

</div>

Is there any chance that this is again an issue? I just noticed this:

 ![](https://global.discourse-cdn.com/meta/original/3X/8/5/85d7a4c77cf3a42a7329abcd2ce621f76f5ed4b4.png)

My initial thought was “Probably the Who’s online plugin”, but when I view the graph the numbers were high before we installed that plugin.

Is there a way to confirm that the stats are accurate?

---

<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: [February 21, 2017, 12:57pm UTC](https://meta.discourse.org/t/user-profile-views-extremely-high-lately/48487/10 "2017-02-21T12:57:45Z")

</div>

No repro on my sites, including this one. So something about your site. Are you using the discoursemetrics plugin, as stated above?

---

<div class="post-metadata">

### Author: ![JagWaugh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagwaugh/32/69335_2.png) [@JagWaugh](https://meta.discourse.org/u/JagWaugh)
#### Post date: [February 21, 2017, 1:46pm UTC](https://meta.discourse.org/t/user-profile-views-extremely-high-lately/48487/11 "2017-02-21T13:46:57Z")

</div>

I just filled in the form at [www.discoursemetrics.com/](http://www.discoursemetrics.com/)

---

<div class="post-metadata">

### Author: ![DiscourseMetrics](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/discoursemetrics/32/55756_2.png) [@DiscourseMetrics](https://meta.discourse.org/u/DiscourseMetrics)
#### Post date: [February 21, 2017, 2:28pm UTC](https://meta.discourse.org/t/user-profile-views-extremely-high-lately/48487/12 "2017-02-21T14:28:01Z")

</div>

> [@codinghorror](#):
>
> So something about your site. Are you using the discoursemetrics plugin, as stated above?

He’s not using our service (yet), so no 🙂

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [February 21, 2017, 3:05pm UTC](https://meta.discourse.org/t/user-profile-views-extremely-high-lately/48487/13 "2017-02-21T15:05:31Z")

</div>

> [@JagWaugh](#):
>
> My initial thought was “Probably the Who’s online plugin”

My first thought was “bot crawls”.  
If you look at your dashboard stats for Traffic are the numbers for logged in, anon, and crawler similarly disproportionate?  
Do you have a lot of accounts under Users - Suspect?

---

<div class="post-metadata">

### Author: ![JagWaugh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagwaugh/32/69335_2.png) [@JagWaugh](https://meta.discourse.org/u/JagWaugh)
#### Post date: [February 21, 2017, 3:16pm UTC](https://meta.discourse.org/t/user-profile-views-extremely-high-lately/48487/14 "2017-02-21T15:16:46Z")

</div>

![](https://global.discourse-cdn.com/meta/original/3X/4/c/4c7ad3e20440acb4ab3086851cf9c7987c61b56f.png)

Roughly 500 active users, rarely more than 50 at a time.  
6 Suspect users:

 ![](https://global.discourse-cdn.com/meta/original/3X/a/2/a22010d03ab47a087e02073b3d49901fa542a44e.png)

We’re also seeing about 50 account registration/day on our wordpress site, but they’re spread out irregularly over time, mostly msn, gmail and yoohoo accounts.

Script kiddies?

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [February 21, 2017, 3:29pm UTC](https://meta.discourse.org/t/user-profile-views-extremely-high-lately/48487/15 "2017-02-21T15:29:42Z")

</div>

It looks as if the high profile views are coming from anywhere it would be the anon users. I can get that some would be interested in checking out Profiles, but for numbers like you’re seeing l can’t help but think it would need to be script doing it.

My interest has been sparked, I’ll do some digging ASAP to see if there’s any way to get more data.

---

<div class="post-metadata">

### Author: ![JagWaugh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagwaugh/32/69335_2.png) [@JagWaugh](https://meta.discourse.org/u/JagWaugh)
#### Post date: [February 21, 2017, 3:36pm UTC](https://meta.discourse.org/t/user-profile-views-extremely-high-lately/48487/16 "2017-02-21T15:36:46Z")

</div>

I agree about the script driven. Even if we had a huge number of users with ADHD who couldn’t be bothered to login and were just looking at the site to see if something has happened we wouldn’t be getting those kinds of numbers.

---

<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: [February 21, 2017, 3:49pm UTC](https://meta.discourse.org/t/user-profile-views-extremely-high-lately/48487/17 "2017-02-21T15:49:05Z")

</div>

You can grep trough the logs and look for patterns:

```
grep 'GET /users/' /var/discourse/shared/standalone/log/var-log/nginx/access.log | cut -d " " -f 3 | sort | uniq -c | sort -n | head -n 20

```

This should show if the source of those requests are all the same.

---

<div class="post-metadata">

### Author: ![JagWaugh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagwaugh/32/69335_2.png) [@JagWaugh](https://meta.discourse.org/u/JagWaugh)
#### Post date: [February 21, 2017, 3:57pm UTC](https://meta.discourse.org/t/user-profile-views-extremely-high-lately/48487/18 "2017-02-21T15:57:53Z")

</div>

I’m just trying to get someone who has SSH access to look at it.

Would the /staff/nginx logs be of any use in the meantime?

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [February 22, 2017, 3:28am UTC](https://meta.discourse.org/t/user-profile-views-extremely-high-lately/48487/19 "2017-02-22T03:28:01Z")

</div>

There is a table that stores all these information 🙂

In [data explorer](https://meta.discourse.org/t/32566?silent=true), you can run the following query to see which users are getting the most profile views:

```plaintext
SELECT 
  user_profile_views.user_profile_id AS user_id, 
  COUNT(user_profile_views.user_profile_id) 
FROM user_profile_views
GROUP BY user_profile_views.user_profile_id
ORDER BY COUNT(user_profile_views.user_profile_id) DESC

```

Another query that might be helpful is to see which IP address is generating the most views:

```plaintext
SELECT
  user_profile_views.ip_address,
  COUNT(user_profile_views.ip_address)
FROM user_profile_views
GROUP BY user_profile_views.ip_address
ORDER BY COUNT(user_profile_views.ip_address) DESC

```

---

<div class="post-metadata">

### Author: ![Gunnar](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gunnar/32/119647_2.png) [@Gunnar](https://meta.discourse.org/u/Gunnar)
#### Post date: [March 31, 2017, 7:07pm UTC](https://meta.discourse.org/t/user-profile-views-extremely-high-lately/48487/20 "2017-03-31T19:07:41Z")

</div>

I work with Andrew Waugh on the same Discourse site. I finally had some time to start digging into this, and soon discovered that a whole bunch of the requests came from one IP, 104.236.201.204, and that they all included our API key.

That IP belongs to Digital Ocean, and since the requests included our API key, I’m assuming this is coming from Discourse Metrics. We’ve turned Metrics off now, but here’s a redacted sample from our “outer” nginx log:

`104.236.201.204 - - [31/Mar/2017:19:00:22 +0000] "GET /users/SomeUser.json?api_key=sekrit&api_username=system HTTP/1.1" 200 1343 "-" "Ruby"`

We’ll see in a day or two if this makes our user profile views go down by a significant amount.

Gunnar

[Next page](https://meta.discourse.org/t/user-profile-views-extremely-high-lately/48487.md?page=2)
