muety / wakapi

📊 A minimalist, self-hosted WakaTime-compatible backend for coding statistics
https://wakapi.dev
MIT License
2.75k stars 171 forks source link

How to solve this problem? #473

Closed JedediahXu closed 1 year ago

JedediahXu commented 1 year ago

I'm unable to get Wakatime stats in my dashboard due to rate limitation. I'm on the free plan. Did something change or do I need to upgrade for stats to start being sent or?

May I ask why encounter this problem? "message":"sending heartbeat(s) failed: rate limited: won't send heartbeat due to backoff"

{"caller":"pkg/backoff/backoff.go:97","file":"/Users/xxxxxx/xxxx/xxxx","func":"backoff.shouldBackoff","is_write":true,"level":"debug","lineno":18,"message":"exponential backoff tried 7 times since Mar 10 14:43:11, will retry at Mar 10 15:15:11","now":"2023-03-10T15:12:26+08:00","os/arch":"darwin/arm64","plugin":"vscode/1.76.1 vscode-wakatime/24.0.7","time":1678432346.5902731,"version":"v1.68.3"} {"caller":"pkg/offline/offline.go:65","file":"/Users/xxxxxx/xxxx/xxxx","func":"offline.WithQueue","is_write":true,"level":"debug","lineno":18,"message":"pushing 1 heartbeat(s) to queue due to error","now":"2023-03-10T15:12:26+08:00","os/arch":"darwin/arm64","plugin":"vscode/1.76.1 vscode-wakatime/24.0.7","time":1678432346.5902731,"version":"v1.68.3"} {"caller":"cmd/heartbeat/heartbeat.go:41","file":"/Users/xxxxxx/xxxx/xxxx","func":"heartbeat.Run","is_write":true,"level":"debug","lineno":18,"message":"sending heartbeat(s) failed: rate limited: won't send heartbeat due to backoff","now":"2023-03-10T15:12:26+08:00","os/arch":"darwin/arm64","plugin":"vscode/1.76.1 vscode-wakatime/24.0.7","time":1678432346.5902731,"version":"v1.68.3"}

muety commented 1 year ago

Hi @ChetSerenade, no, nothing has changed and you won't need a subscription to push heartbeats. I'll investigate this and get back to you. Just for confirmation: you're talking about Wakapi.dev, not some self-hosted instance, correct?

What are the outputs of:

./.wakatime/wakatime-cli --today

and

./.wakatime/wakatime-cli --offline-count

(or the Windows version of that command, respectively)?

JedediahXu commented 1 year ago

Hello,I ran into this problem in vscode.I just modified the wakatime.cfg file,And now it's fine. Let me add this: api_url = https://wakatime.com/api/v1/

Thank you for your reply

muety commented 1 year ago

With this API URL, you'll send data to Wakatime, not Wakapi, though.