Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Posting Geokrety (by c:geo) #866

Closed
paraleline opened this issue Sep 27, 2023 · 14 comments
Closed

Posting Geokrety (by c:geo) #866

paraleline opened this issue Sep 27, 2023 · 14 comments
Assignees
Labels
-medium- Difficulty to fix: medium bug Something isn't working

Comments

@paraleline
Copy link

Hi

I can only log in all my geokrety for the first few geocaches per day. Then c:geo logs geokrety supposedly, but in fact there are no logs on the geokrety.org website. The next day the situation repeats itself.
Few more details in my attachment.

problem 3

@kumy
Copy link
Member

kumy commented Sep 27, 2023

This should be related to the new rate limiting system. How many log do you do per day ???? I see 8/263 (🫣), I think the rate limit is 1500 logs per day (I thought is was a reasonable number). So after your 5th cache you should have problems...
Another thing for the "next day", the counters is a fifo, so first logs should not count anymore after the delay.

Regarding c:geo, maybe it doesn't handle the proper http error code for a "too many request" http 429. Also, the current user rate limit is available in the response header from the server. /cc @Lineflyer

@kumy
Copy link
Member

kumy commented Sep 27, 2023

I did some checks, and effectively you are hitting the rate-limit
image

@paraleline
Copy link
Author

263 geokrets x approximately 30 caches a day (or more ;) - almost 8.000 logs a day...

@kumy
Copy link
Member

kumy commented Sep 27, 2023

@paraleline I manually reset your rate limit usage for this API endpoint. could you test if you can post logs (in the current limit of course...)

@paraleline
Copy link
Author

It seems I can. I've tried just now for a one geocache and few geokrets and there were no problems (a few hours ago it wasn't possible after the today's limit was used). Do I still have a limit of 1,500 or will it be increased?

@kumy
Copy link
Member

kumy commented Sep 27, 2023

cool, at least your main issue cause is identified...

Do I still have a limit of 1,500 or will it be increased?

I will raise it a bit so you can play, but I also need to check if the "purge" is really done in the background...

@Lineflyer
Copy link
Member

@kumy
As I am on holiday: Can you crosspost an issue to cgeo regarding the return code handling. I am sure we silently swallow the error instead of providing proper feedback.

@paraleline
Copy link
Author

@kumy
ok - thanks a lot!

@kumy
Copy link
Member

kumy commented Sep 27, 2023

Raised temporarily the limit to 10000/day.

I still need to check if the "purge" is really done in the background... But I'll do that this weekend

@paraleline
Copy link
Author

Unfortunately: after logging only a few geocaches today (and thus about 1000 geokrety), further logging of geokrety using c:geo has become impossible again :(

@kumy
Copy link
Member

kumy commented Sep 28, 2023

@paraleline I just checked, your actual quota usage count is 11/10000
The error I see in the logs is Something already exists at the same datetime "Moved_on_datetime"

image

@paraleline
Copy link
Author

ok - I know what the problem is: my mistake.
Today I logged 19 geocaches (therefore about 5000 geokrets) and everything worked perfectly :)
Thank you very much for your quick and effective help!

@kumy
Copy link
Member

kumy commented Sep 29, 2023

Good to know. 👍

I looked at the rate-limit reset code, and it need to be reworked. I will do that during the weekend...

I found that usage will reset only after 1day without log. Or something like that. This is not what I expected...

@kumy kumy self-assigned this Sep 29, 2023
@kumy kumy added bug Something isn't working -medium- Difficulty to fix: medium labels Sep 29, 2023
@kumy
Copy link
Member

kumy commented Sep 30, 2023

I've reworked the rate-limiter. Let me know how it goes.

You can get your current rate limit using this address:
https://geokrety.org/api/v1/rate-limit/usage?secid=<secid_here>

It's using Token Bucket Algorithm, and should quota should properly refill regularly...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-medium- Difficulty to fix: medium bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants