Single-Activity Syncing

James, CityStrides is awesome and you are too. Thanks for all your work.

Just wanted to add the data point that I too have two Strava activities (from 4/11 and 4/12) that have sync’d but not posted. No rush, sounds like you’re on it. I just love seeing them post and watching my %complete creep up, bit by bit :slight_smile:

Oh, and I wrote to Strava to ask them to increase the API limits!

1 Like

My only concern about Garmin integration is the act of switching from Strava to Garmin. Unless you also create some way of turning off my Strava connection when I switch to Garmin, then every activity will be synced from both sources. So while my activities would show up faster, I would still be blocking the Strava users who can’t switch over. This wouldn’t be optimal for the site.

Perhaps you can set up synchronization so that only one data source is active. When I connect through Garmin, the site stops picking up my Strava activities and only picks up my data through Garmin. But it doesn’t clear out all my old activities from Strava. Otherwise you’ll create another bottleneck on Garmin. (Also, on a personal level, I’m not sure that all of my activity is on Garmin. I think I tried to import my Google Fit activity, but I’m not sure it’s all there.)

I created a different thread about alternatives services. Lets take that discussion over there to keep things on-topic

Are there API issues that need to be looked into? I could ask some of my friends who are working on some big data projects for their expertise if you want to chat with them.

The issue is that the limit from Strava is too low for the number of people using CityStrides & how CityStrides operates (the purpose of the site being that it uses your full history of running/walking activities to see which streets you’ve progressed/completed).

  • There are a total of 12,643 Strava-connected accounts
  • The growth rate has been between 56-227 new Strava-connected accounts per day (2,461 new accounts connected since March 18)
  • Each new activity ‘costs’ 2 API calls
  • Each historic activity ‘costs’ 1 API call for each 100 activities for a user plus 1 API for each activity
  • Each login action ‘costs’ 1 API call
  • The daily limit from Strava is 30,000 API calls

We can then figure out what the usage looks like.

  • 12,643 people all create one activity per day * 2 API calls = 25,286 API calls used (4,714 left)
  • Taking an average of 100 new signups per day = 100 API calls used just for the login (4,614 left)
  • I don’t know how many activities each person has (could be anywhere from dozens to tens of thousands) … if it’s 500, then that’s 505 API calls (4,109 left)
  • There are 290k historic activities in the queue (and more that I haven’t yet added to the queue; take a scroll through Reply Here If You Have Missing Activities to get a sense of how many more there likely are) = 290,000 API calls (285,891 over the limit, just for the activities I know are missing)

I think I need 10x the current Strava API limit to handle the current load.

(I updated Reply Here If You Have Missing Activities to include these numbers for easier reference)

2 Likes

Doesn’t seem tenable. Can we help the situation by using other activity trackers for purposes of uploading into CityStrides? I don’t care where the data comes from–it’s just purple lines on a map.

I think this would alleviate a huge chunk of the problem. Out of my running friends, probably < 20% use something other than a garmin watch (including using the Strava app to record).

If you get the garmin integration going I’ll double my monthly supporter “donation” - I suggest anyone else who is frustrated by recent delays in syncing here and who also use Garmin consider upping their support $ a bit to compensate. And if you aren’t a supporter, all the more reason to become one. A $5,000 one time API fee should not be an issue AT ALL with this many users. Couple bucks a month from everyone more than does it.

A $5,000 one time API fee should not be an issue AT ALL with this many users.

There’s no API access fee any more. It’s just time spent coding, now.

5 Likes

You might need an extra server to process the hundreds or thousands of full syncs to Garmin :slightly_smiling_face:

1 Like

You don’t need 10x the current Strava API limit to handle the current load.

As long as the limit is higher than the average number of API calls, the queue should converge to 0, but it will take A LOT of time to get there.

In practice, everything less than 120.000 Strava API calls/day won’t help.

On the other hand, Europeans runners I know from different countries mostly use Garmin devices, and Garmin market share is probably not smaller on the home market (USA), so I really hope the future Garmin API will help.

Is it possible to have an option to flag and remove irrelevant Strava activities from our status list? I am doing a lot more cross training right now so there is a bunch of cycling and weight training activities often sitting in my queue that could be omitted to save on API calls.

2 Likes

To implement that, the metadata in the web hook needs to include the type of activity. I think that James already ignores anything other than running and walking. But I’d be willing to have all walking activities become extremely low priority.

Guys, honestly at this point all these little changes and inefficiencies are probably largely meaningless when you have 300,000 activities queued with the current limit and user growth rate. James is working on the Garmin option which is realistically the real solution as that will probably take care of most users. Others have mentioned as well that Strava cut off Relive from their API and frankly I would not be surprised to see them do that here as well if James implements his friend feature (looking forward to that) or for any other arbitrary reason.

1 Like

I am new here, and have also registered as a supporter. Is it still a good idea to turn on the Strava Sync now? Or better wait for GARMIN Connect Integ.? Is the way via Runkeeper maybe easier? Because I can link Runnkeeper to Garmin, and here I could activate the Runkeeper sync? Does that make sense? To prevent the queue at Strava from getting even longer or to keep the servers busy?

I would use Runkeeper. You get your full history now.
No telling how long untill the issues get resolved.

Hello Henrik, thank you for your answer - how do I solve the queue at Strava now? Should I just disconnect? Since I am initially logged in with my Strava account, I don’t think it is that easy? If I register by email, what happens to the subscription?

You can head to your Settings page, and connect Runkeeper from there.
Leave the Strava connection - if you revoke access, all of that data is deleted in CityStrides.

1 Like

Hey James. First off thanks for all your hard work, looks like this Garmin integration is gonna solve the Strava backlog issue. My issue is with single activity sync. I’ve tried two activities that didn’t sync originally and neither has worked after twice attempting with the single activity sync feature. I’d guess that there is just a glitch that won’t allow these specific activities to sync?

That features puts the activity into the historic syncing, which has a large backlog. So it could just be in there.