pepy icon indicating copy to clipboard operation
pepy copied to clipboard

Total downloads not always up-to-date

Open tmillenaar opened this issue 1 year ago • 10 comments
trafficstars

Hey there,

I noticed that the total downloads in the summary is often showing the number of downloads from a previous day. The badge showing total downloads does seem to be up-to-date more often. This means sometimes they are out-of-sync. An example: image

I also noticed that sometimes refreshing the page many times might result in a different number for total downloads. Sometimes this number is then correct and sometimes this number is from a different previous day. Using a different device or browser also seems to help sometimes. 'Private' or 'incognito' mode usually does not help. It seems to work best to use a VPN and pretend I am at a different location.

I don't know how the app is deployed, but seeing as a VPN seems to be the most reliable way to get the number up-to-date I imagine there is some edge-caching going on.

I encountered the issue on:

Ubuntu 22.04.4 LTS

  • firefox
  • chrome

Android 11

  • firefox
  • chrome

Let me know if you need me to give more details when this occurs again for me,

Cheers, Timo

tmillenaar avatar May 05 '24 14:05 tmillenaar

FYI, ciscoconfparse2 also has this problem, but downloads are now frozen-in-time from ten days ago. This is May 15th 2024, but the downloads are frozen at May 4th

image

mpenning avatar May 15 '24 11:05 mpenning

We are using CloudFlare Edge, the cache for the badge should be 12 hours max and for the data 1 hour max.

@mpenning can you access the webpage, right clic on the page, click inspect, select the ciscoconfparse2 request and send me the screenshot. The result should be similar to this image

psincraian avatar May 18 '24 19:05 psincraian

can you access the webpage, right clic on the page, click inspect, select the ciscoconfparse2 request and send me the screenshot. The result should be similar to this

@psincraian I just checked and this problem no longer exists. All I know is that it existed in ciscoconfparse2 for almost two weeks. I wish I could help more...

mpenning avatar May 18 '24 20:05 mpenning

@mpenning Thanks for taking a look at the matter.

Since at this moment I happen to have the case where for the gridkit package the most recent date with data is three days ago, I can post the network request:

General Request URL: https://www.pepy.tech/projects/gridkit Request Method: GET Status Code: 200 OK Remote Address: [2a06:98c1:3121::c]:443 Referrer Policy: strict-origin-when-cross-origin

Response Headers Alt-Svc: h3=":443"; ma=86400 Cf-Cache-Status: DYNAMIC Cf-Placement: local-AMS Cf-Ray: 887e1871db1265fe-AMS Content-Encoding: br Content-Type: text/html; charset=utf-8 Date: Wed, 22 May 2024 16:13:47 GMT Nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800} Report-To: {"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=So542YxCvU6PU8lP9p1R48sGyabd98xM3rLWBgQ1Vh6RI1dnKFyPHMwhJuSF0WHTCS7PTqGIOtxdDjt%2BlhjdwQdetNGxQFKwZjrCOBE6pZ4%2BXR65y2xxhpNkHBCOt%2F%2FpIwXpJdBZYPAwuOwm"}],"group":"cf-nel","max_age":604800} Server: cloudflare Vary: RSC, Next-Router-State-Tree, Next-Router-Prefetch, Accept-Encoding X-Edge-Runtime: 1 X-Matched-Path: /projects/[project] X-Powered-By: Next.js

Request Headers :authority: www.pepy.tech :method: GET :path: /projects/gridkit :scheme: https Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.7 Accept-Encoding: gzip, deflate, br, zstd Accept-Language: en-US,en;q=0.9 Priority: u=0, i Sec-Ch-Ua: "Google Chrome";v="125", "Chromium";v="125", "Not.A/Brand";v="24" Sec-Ch-Ua-Mobile: ?0 Sec-Ch-Ua-Platform: "Linux" Sec-Fetch-Dest: document Sec-Fetch-Mode: navigate Sec-Fetch-Site: none Sec-Fetch-User: ?1 Upgrade-Insecure-Requests: 1 User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36

image

Is this the kind of information you were after?

tmillenaar avatar May 22 '24 16:05 tmillenaar

FYI

Download Data Freeze

  • ciscoconfparse and ciscoconfparse2 downloads data date freeze problem is back again. It's now frozen at 22 May 2024 and today is 28 May 2024.

Download Rate Drop

  • If this is related, the PePy ciscoconfparse and ciscoconfparse2 downloads also took a dramatic drop on 19-May-2024 and never recovered. In particular, ciscoconfparse normally sees thousands of downloads per weekday and has for years... on weekends, it will occasionally creep down to lower than 1000 downloads per day, but I've never seen ciscoconfparse daily downloads as low as 108 (even on Christmas day).

Download Rate Evidence

Example Graph of ciscoconfparse PePy downloads showing the massive drop on May 19, 2024... image

Timing

It's rather odd that both projects simultaneously and independently took a significant download rate hit and then shortly afterward saw the PePy downloads graph freeze...

Reproducability

  • I can reproduce this via Firefox, Chrome and MS Edge on Windows 11 (AT&T Uverse connection - source IP: 104.15.132.24)
  • I can reproduce this via Firefox on my AT&T mobile data on my iPhone 11 iOS 17.4.1 (AT&T mobile data connection - source IP: 66.249.66.89)

p.s.

Something smells wrong but I can only report the problem. I have no independent source to validate downloads unless I can see the daily ciscoconfparse PePy downloads increment and then I could manually spawn a script to download 1000 times as a test.

mpenning avatar May 28 '24 22:05 mpenning

@mpenning The drop in downloads is a different issue and has been described and handled here: https://github.com/psincraian/pepy/issues/667 I imagine that this is separate from the recent dates not showing at all or the total downloads and the badges to be out of sync.

tmillenaar avatar May 29 '24 08:05 tmillenaar

As @tmillenaar mentions the drop is not related to that issue.

I will continue investigating on where the caching is happening 👀 hopefully I can have a remediation by end of this week

psincraian avatar May 29 '24 16:05 psincraian

Please see https://github.com/psincraian/pepy/issues/679

hugovk avatar Jun 21 '24 16:06 hugovk

@hugovk Could you elaborate the link with #679? I read through that ticket but the relation is not obvious to me.

tmillenaar avatar Jun 28 '24 16:06 tmillenaar

Yeah, it seems unrelated now. That one was about data missing at the source, but looks like that was mid June and not late May, like this issue. Sorry for any confusion!

hugovk avatar Jun 28 '24 17:06 hugovk

I simplified the caching configuration in CloudFlare. If the problem happens again, please reopen this ticket.

psincraian avatar Jun 30 '24 18:06 psincraian