Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misleading error message on socket open when hitting ulimit #53

Open
GoogleCodeExporter opened this issue Nov 2, 2015 · 0 comments
Open

Comments

@GoogleCodeExporter
Copy link

Which version of amqplib are you using? 1.0.2

Have you checked to see if there is a newer version in the "Featured
Downloads" section of the front page of this project? Yup.

Which broker are you using (RabbitMQ?) which version? RabbitMQ, 2.8.4

Which version of Python? 2.7.1

What steps will reproduce the problem?
1. Hit your max open file descriptors limit
2. Try to initialize something base on _AbstractTransport


What is the expected output? What do you see instead?

I expect to see something like: 

Traceback (most recent call last):
  File "build/bdist.macosx-10.7-intel/egg/amqplib/client_0_8/connection.py", line 129, in __init__
  File "build/bdist.macosx-10.7-intel/egg/amqplib/client_0_8/transport.py", line 282, in create_transport
  File "build/bdist.macosx-10.7-intel/egg/amqplib/client_0_8/transport.py", line 86, in __init__
error: [Errno 24] Too many open files

But I actually see something like:

  File "build/bdist.macosx-10.7-intel/egg/amqplib/client_0_8/connection.py", line 129, in __init__
  File "build/bdist.macosx-10.7-intel/egg/amqplib/client_0_8/transport.py", line 282, in create_transport
  File "build/bdist.macosx-10.7-intel/egg/amqplib/client_0_8/transport.py", line 79, in __init__
AttributeError: 'NoneType' object has no attribute 'close'

which hides the real error. 

I've attached a patch that fixes this.

Original issue reported on code.google.com by [email protected] on 23 Aug 2012 at 9:23

Attachments:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant