Skip to content

OSError: [Errno 99] Cannot assign requested address with pymemcache #621

@ThakurKarthik

Description

@ThakurKarthik

Recently we started getting 500 response status on our api end point and when we checked logs, we have errors coming from pymemcache code.

I have opened SO question as well https://stackoverflow.com/questions/79250060/pymemcache-oserror-errno-99-cannot-assign-requested-address but I think this is something either buggy in pymemcache or something that is not understood by me and thus used incorrectly.

We are using version pymemcache 4.0.0 and memcached for caching purpose. Our application is django based, so we are using the provided api cache.get() to access cache https://docs.djangoproject.com/en/5.1/topics/cache/#memcached

Does the pooled client not reuse existing connections by default? We see a huge number of ports in the wait_time state as it looks like pymemcache opens new connection to memcache server for every request we receive on our application and the ports are thus occupied.

cat /proc/net/tcp|grep 2BCB|grep " 03:"|wc -l
the output of above command keeps on increasing if we triggered huge number of requests on our application server.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions