django-silk icon indicating copy to clipboard operation
django-silk copied to clipboard

SILKY_MAX_RECORDED_REQUESTS does not work with sqlite3

Open mkadlof opened this issue 6 years ago • 2 comments

HI,

I'm trying to limit requests saved in sqlite3 database, but I do not see any effect of my tries.

I added: SILKY_MAX_RECORDED_REQUESTS = 3

cleared Silk entires in database

./manage.py silk_clear_request_log

restart app and refresh several time my app in browser. And Silk still saves more than 3 requests. What am I doing wrong?

mkadlof avatar Oct 15 '18 10:10 mkadlof

same here, how does this work? In the docs it simply says

To make sure silky garbage collects old request/response data, a config var can be set to limit the number of request/response rows it stores.

It sounds like it should only save until it hits the limit and then start clearing old rows.

I'm using Postgres thogh

Elbullazul avatar Jul 19 '19 14:07 Elbullazul

Garbage collection (clearing the old requests given SILKY_MAX_RECORDED_REQUESTS is done either:

  • during request save, but with a chance given SILKY_MAX_RECORDED_REQUESTS_CHECK_PERCENT
  • on launching the ./manage.py silk_request_garbage_collect command

SebCorbin avatar Oct 27 '22 08:10 SebCorbin