Coder Social home page Coder Social logo

Comments (3)

pcraciunoiu avatar pcraciunoiu commented on July 29, 2024

@adarnimrod thanks for reporting this issue. Would you be willing to open a pull request with a proposed fix? (and ideally unit test)

from django-ses.

mdw123 avatar mdw123 commented on July 29, 2024

Same issue. Will look into a PR for this.

I'm glad to see this bug because I was just talking to my co-worker, saying, "What we need to do is cache the GetSendQuota result."

from django-ses.

mdw123 avatar mdw123 commented on July 29, 2024

Reading the code, I don't think this is an actual problem. There's probably a different reason you're calling get_send_quota too much.

cached_rate_limits is a dictionary.

If you use a machine role to access AWS, you correctly point out that self._access_key_id is unset. More specifically, self._access_key_id defaults to None based on line 9 of settings.py

ACCESS_KEY = getattr(settings, 'AWS_SES_ACCESS_KEY_ID',
                     getattr(settings, 'AWS_ACCESS_KEY_ID', None))

Because (None or None) is None, the cache key is None. None is a valid index in a dictionary. Because you're using a machine role to access AWS, there is only ever one SES instance involved and because the cache key is None, I believe this code is functioning as designed, and this issue can be closed.

The problem is more likely because you have too many instances of django-ses trying to find out how to throttle their send rate at the same time, perhaps too many processes, too many nodes, too many somethings. But, within the context of that single EC2 instance, I think it is successfully using the cache.

I think I've figured out what my problem is in general, but I'm not sure how to fix it yet, so you can remove my +1 from this issue.

I think the code is working sufficiently well that you can close this issue.

from django-ses.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.