{"action":"opened","issue":{"url":"https://api.github.com/repos/malinoff/amqproto/issues/7","repository_url":"https://api.github.com/repos/malinoff/amqproto","labels_url":"https://api.github.com/repos/malinoff/amqproto/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/malinoff/amqproto/issues/7/comments","events_url":"https://api.github.com/repos/malinoff/amqproto/issues/7/events","html_url":"https://github.com/malinoff/amqproto/issues/7","id":265249884,"number":7,"title":"Massive queues deletion eventually hangs","user":{"login":"kxepal","id":785983,"avatar_url":"https://avatars0.githubusercontent.com/u/785983?v=4","gravatar_id":"","url":"https://api.github.com/users/kxepal","html_url":"https://github.com/kxepal","followers_url":"https://api.github.com/users/kxepal/followers","following_url":"https://api.github.com/users/kxepal/following{/other_user}","gists_url":"https://api.github.com/users/kxepal/gists{/gist_id}","starred_url":"https://api.github.com/users/kxepal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kxepal/subscriptions","organizations_url":"https://api.github.com/users/kxepal/orgs","repos_url":"https://api.github.com/users/kxepal/repos","events_url":"https://api.github.com/users/kxepal/events{/privacy}","received_events_url":"https://api.github.com/users/kxepal/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-10-13T10:57:03Z","updated_at":"2017-10-13T10:57:03Z","closed_at":null,"author_association":"NONE","body":"Case: delete 130K queues. Script:\r\n```python\r\nimport asyncio\r\nfrom amqproto.io.asyncio import Channel, Connection\r\n\r\n\r\nasync def main():\r\n    with open('queues.txt') as fobj:\r\n        queues = fobj.read().splitlines()\r\n    connection = Connection()\r\n    async with connection:  # type: Connection\r\n        async with connection.get_channel() as channel:  # type: Channel\r\n            for idx, queue in enumerate(queues):\r\n                await channel.queue_delete(queue)\r\n                print(idx)\r\n\r\nasyncio.get_event_loop().run_until_complete(main())\r\n```\r\n\r\nMay be not optimal, but what I made quickly. Counter keeps printing quite fast until some moment (100-200 items) and then script hangs and nothing happens more than for a minute. Rerun causes the same. \r\n\r\nMeanwhile, pika deletes queues much slower, also eventually hangs, but for short periods, about dozen seconds (I suspect due to RabbitMQ GC or else stuff) and then keeps going.\r\n\r\nIt also could reproduced with less number of queues: for 30K amqproto successfully deleted 12K queues before hang."}}
{"actor":{"display_login":"kxepal"}}