tabledog / tdog-cli

Download your Stripe account to a SQLite database.
MIT License
18 stars 2 forks source link

Rate limit fails, rate increases dramatically, eventually crashes process #1

Open qbatten opened 2 years ago

qbatten commented 2 years ago

So, I havent been able to complete a full download of my stripe data because something funky is going on with the rate limiter.

This is the context:

Here's my config.json, click to expand I redacted the key of course ``` { "cmd": { "fn": "download", "args": { "from": { "stripe": { "secret_key": "rk_redacted", "max_requests_per_second": 20 } }, "to": { "sqlite": { "file": "main.db" } }, "options": { "watch": false, } } }, "log": "trace" } ```

What happens:

qbatten commented 2 years ago

I've attached two log files from different runs where this issue occurs.

Thanks for making this awesome program and let me know if I can help further!

debug_shared_1.log debug_shared_2.log

emadda commented 2 years ago

Hello @qbatten,

Thanks.

Can you try two things:

  1. Request a rate limit increase from Stripe.
  2. Set a lower max_requests_per_second, perhaps starting at 5?

After the first full download you will be able to apply the events to the DB to keep it up to date. Applying the events should take a few seconds.

The logs are helpful. Let me know how it goes.