Did you figure out what % of those 12k users are active?
There are 7,259 Strava accounts connected to a user who hasn’t signed in within the last 3 months. IF that database field is correct. My account’s last sign in value is
Fri, 03 Apr 2020 17:37:53 EDT -04:00 so that seems decently accurate. I still haven’t figured out when devise sets that value (if any fellow coders want to try & hunt that down for me ).
This could be a way to at least kick the can down the road a little while you explore options.
Yeah, that’s all this does. Once (if) those people come back to the site, they’re going to want their activities and I’m (currently) going to have to run a manual sync for their account which will add to the API usage. I’m not actually saving myself by doing this. I’m just deferring the pain.
https://veloviewer.com/ is actually a good example of a site that actively has you sync Strava by clicking a button and it fetches all of your activities then. This would have to reduce your calls significantly.
This would not. This would defer the pain. This is also explicitly stated in Strava’s rate limiting documentation as well as their support team’s responses as the thing not to do. They want me using webhooks. I don’t know what VeloViewer is doing to work around that.
You could make it so that supporters have one daily sync and non supporters 2 weekly syncs ?
The core issue is nuanced. It’s not, generally, the full account sync that is the issue. It’s the individual activities that are coming in, and it’s the new user full account sync - or the combo of two, paired with the low rate limit. If I can handle just over 1 activity per person per day, and then 50-100 new people show up with anywhere from 50-1,000s of activities, I cannot do both things (handle new activities and sync new people’s history).
Heck a auto sync could be for supporters and a button or manual sync could be for non-supporters.
I can’t do this because Strava wants and expects me to use webhooks. They’ve been very clear about this in their documentation and their email responses.
I’ve been making piles of changes over the last week to help work through this.
- I self-limit to 300 requests per fifteen minute period, which allows the site to communicate with Strava over a full 24hr period (their 600 call limit every fifteen minutes only allows you to be active with their API for half the day )
- I set aside 2/3 of the available API calls for subscriber accounts (active supporters; either on a monthly subscription or a one-time contribution with active months left)
- These changes allow me to decrease the “saved” daily calls from 1000 to 100 (I might be able to go even lower; I’m monitoring that)
- I changed the full history sync to only sync 100 activities per day
- I’m about to release a change that skips people who have not signed in within the past 3 months. I’ve deleted their currently-queued syncs as well (this dropped about 10k from the queue). I’m going to work on an email that tells them about this deactivation & directs them to either use the site again or to revoke access (which deletes all that data in CityStrides; do not revoke access unless you want your data deleted).
- I’m disabling Sync Now for Strava-connected accounts.
Still as well … More thoughts/ideas are welcome - I’m happy to correct people with insider knowledge as needed. Thanks everyone!
Update: Changed above numbers from 6 months to 3 months.