1. Jesper Noehr
  2. django-piston
  3. Issues
Issue #187 new

Too many nonces

created an issue


I have over a million nonces now in my Nonce table, and queries are becoming slow. Should I delete the nonces? If so, is this something that should be done regularly? Could this cause any problems?


Comments (2)

  1. ryanbalfanz

    We were having a lot of issues several months ago. The issue was in fact, too many nonces -- over a million. The queries MySQL was performing bottlenecked the system taking everything down. For us, the solution is to use celery to routinely delete many, if not all, of the nonces. Just a few minutes ago I increased the frequency of the job to every 5 minutes, up from every 15 minutes.

    We have no issues with doing this, but our use of OAuth is slightly different than the norm, so YMMV.

    Btw, I chose 5 minutes because of: https://bitbucket.org/jespern/django-piston/src/7c90898072ce/piston/oauth.py#cl-513.

  2. Log in to comment