You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi.
I'm trying to write a key with a value in the memcached server but the client connection is not closed. I use this functions in aiohttp.web.Application.
`
async def mc_write(key, an):
mc = aiomcache.Client("memcached", 11211)
await mc.set(key.encode(encoding='UTF-8'), an.encode(encoding='UTF-8'))
mc.close()
async def Handler(body, headers, key, url):
logging.info("Start processing key: {}".format(key))
try:
async with aiohttp.ClientSession() as session:
async with session.post(url, data=body, headers=headers) as resp:
an = await resp.text()
end = time.time()
except Exception as e:
return e
#Send result to memcache
await mc_write(key, an)`
On memcached server i see lots of connections:
``
lsof -p 1 | grep ESTABLISHED | wc -l
12
``
What I'm do wrong, how I can close connections?
The text was updated successfully, but these errors were encountered:
Hi.
I'm trying to write a key with a value in the memcached server but the client connection is not closed. I use this functions in aiohttp.web.Application.
`
On memcached server i see lots of connections:
``
lsof -p 1 | grep ESTABLISHED | wc -l
12
``
What I'm do wrong, how I can close connections?
The text was updated successfully, but these errors were encountered: