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

error(99, 'Cannot assign requested address') on thousands of privision+notification calls #42

Open
mapopa opened this issue Feb 28, 2013 · 0 comments

Comments

@mapopa
Copy link

mapopa commented Feb 28, 2013

When i send large number of provisions+notifications sometimes i get error(99, 'Cannot assign requested address') from the client

The server and the client are on the same machine and i send it this way
devices > 2000

for devices in devices
provision()
notify()

I guess the socket can be reused in case i send thousands of

http://stackoverflow.com/questions/7640619/cannot-assign-requested-address-possible-causes

Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/celery/task/trace.py", line 228, in trace_task
R = retval = fun(_args, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/celery/task/trace.py", line 415, in protected_call
return self.run(_args, *_kwargs)
File "/home/mariuz/notifications/tasks.py", line 37, in task_notifications
provision(settings.CONFIG['APPID'], open(settings.CONFIG['CERTIFICATE']).read(), settings.CONFIG['ENVIRONMENT'])
File "/usr/local/lib/python2.7/dist-packages/pyapns/client.py", line 75, in wrapper
return func(_a, *_kw)
File "/usr/local/lib/python2.7/dist-packages/pyapns/client.py", line 67, in wrapper
return func(_a, *_kw)
File "/usr/local/lib/python2.7/dist-packages/pyapns/client.py", line 85, in provision
return _xmlrpc_thread(_f_args)
File "/usr/local/lib/python2.7/dist-packages/pyapns/client.py", line 122, in _xmlrpc_thread
return callback(proxy(_args))
File "/usr/lib/python2.7/xmlrpclib.py", line 1224, in call
return self.__send(self.__name, args)
File "/usr/lib/python2.7/xmlrpclib.py", line 1578, in __request
verbose=self.__verbose
File "/usr/lib/python2.7/xmlrpclib.py", line 1264, in request
return self.single_request(host, handler, request_body, verbose)
File "/usr/lib/python2.7/xmlrpclib.py", line 1292, in single_request
self.send_content(h, request_body)
File "/usr/lib/python2.7/xmlrpclib.py", line 1439, in send_content
connection.endheaders(request_body)
File "/usr/lib/python2.7/httplib.py", line 954, in endheaders
self._send_output(message_body)
File "/usr/lib/python2.7/httplib.py", line 814, in _send_output
self.send(msg)
File "/usr/lib/python2.7/httplib.py", line 776, in send
self.connect()
File "/usr/local/lib/python2.7/dist-packages/pyapns/client.py", line 155, in connect
httplib.HTTPConnection.connect(self)
File "/usr/lib/python2.7/httplib.py", line 757, in connect
self.timeout, self.source_address)
File "/usr/lib/python2.7/socket.py", line 571, in create_connection
raise err
error: [Errno 99] Cannot assign requested address

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

No branches or pull requests

1 participant