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

Connection failing after some time #78

Open
KartheekL opened this issue Mar 4, 2020 · 2 comments
Open

Connection failing after some time #78

KartheekL opened this issue Mar 4, 2020 · 2 comments

Comments

@KartheekL
Copy link

Traceback (most recent call last):
File "C:\Users\lingampet.kartheek\AppData\Local\Programs\Python\Python37\lib\site-packages\urllib3\connection.py", line 157, in _new_conn
(self._dns_host, self.port), self.timeout, **extra_kw
File "C:\Users\lingampet.kartheek\AppData\Local\Programs\Python\Python37\lib\site-packages\urllib3\util\connection.py", line 61, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
File "C:\Users\lingampet.kartheek\AppData\Local\Programs\Python\Python37\lib\socket.py", line 752, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno 11002] getaddrinfo failed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "d:/DataDeletion/datacreatorusingbulk.py", line 30, in
batch= bulk.post_batch(job,csv_itr)
File "C:\Users\lingampet.kartheek\AppData\Local\Programs\Python\Python37\lib\site-packages\salesforce_bulk\salesforce_bulk.py", line 334, in post_batch
resp = requests.post(uri, data=data_generator, headers=headers)
File "C:\Users\lingampet.kartheek\AppData\Local\Programs\Python\Python37\lib\site-packages\requests\api.py", line 119, in post
return request('post', url, data=data, json=json, **kwargs)
File "C:\Users\lingampet.kartheek\AppData\Local\Programs\Python\Python37\lib\site-packages\requests\api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "C:\Users\lingampet.kartheek\AppData\Local\Programs\Python\Python37\lib\site-packages\requests\sessions.py", line 530, in request
resp = self.send(prep, **send_kwargs)
File "C:\Users\lingampet.kartheek\AppData\Local\Programs\Python\Python37\lib\site-packages\requests\sessions.py", line 643, in send
r = adapter.send(request, **kwargs)
File "C:\Users\lingampet.kartheek\AppData\Local\Programs\Python\Python37\lib\site-packages\requests\adapters.py", line 467, in send
low_conn.endheaders()
File "C:\Users\lingampet.kartheek\AppData\Local\Programs\Python\Python37\lib\http\client.py", line 1247, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "C:\Users\lingampet.kartheek\AppData\Local\Programs\Python\Python37\lib\http\client.py", line 1026, in _send_output
self.send(msg)
File "C:\Users\lingampet.kartheek\AppData\Local\Programs\Python\Python37\lib\http\client.py", line 966, in send
self.connect()
File "C:\Users\lingampet.kartheek\AppData\Local\Programs\Python\Python37\lib\site-packages\urllib3\connection.py", line 300, in connect
conn = self._new_conn()
File "C:\Users\lingampet.kartheek\AppData\Local\Programs\Python\Python37\lib\site-packages\urllib3\connection.py", line 169, in _new_conn
self, "Failed to establish a new connection: %s" % e
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x0000029D278CD848>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed

The batch is stopped after some time due to the above error.

@KartheekL
Copy link
Author

Traceback (most recent call last):
File "C:\Users\lingampet.kartheek\AppData\Local\Programs\Python\Python37\lib\site-packages\urllib3\contrib\pyopenssl.py", line 340, in _send_until_done
return self.connection.send(data)
File "C:\Users\lingampet.kartheek\AppData\Local\Programs\Python\Python37\lib\site-packages\OpenSSL\SSL.py", line 1757, in send
self._raise_ssl_error(self._ssl, result)
File "C:\Users\lingampet.kartheek\AppData\Local\Programs\Python\Python37\lib\site-packages\OpenSSL\SSL.py", line 1663, in _raise_ssl_error
raise SysCallError(errno, errorcode.get(errno))
OpenSSL.SSL.SysCallError: (10054, 'WSAECONNRESET')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\lingampet.kartheek\AppData\Local\Programs\Python\Python37\lib\site-packages\requests\adapters.py", line 470, in send
low_conn.send(hex(len(i))[2:].encode('utf-8'))
File "C:\Users\lingampet.kartheek\AppData\Local\Programs\Python\Python37\lib\http\client.py", line 987, in send
self.sock.sendall(data)
File "C:\Users\lingampet.kartheek\AppData\Local\Programs\Python\Python37\lib\site-packages\urllib3\contrib\pyopenssl.py", line 352, in sendall
data[total_sent : total_sent + SSL_WRITE_BLOCKSIZE]
File "C:\Users\lingampet.kartheek\AppData\Local\Programs\Python\Python37\lib\site-packages\urllib3\contrib\pyopenssl.py", line 346, in _send_until_done
raise SocketError(str(e))
OSError: (10054, 'WSAECONNRESET')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "d:/DataDeletion/datacreatorusingbulk.py", line 30, in
batch= bulk.post_batch(job,csv_itr)
File "C:\Users\lingampet.kartheek\AppData\Local\Programs\Python\Python37\lib\site-packages\salesforce_bulk\salesforce_bulk.py", line 334, in post_batch
resp = requests.post(uri, data=data_generator, headers=headers)
File "C:\Users\lingampet.kartheek\AppData\Local\Programs\Python\Python37\lib\site-packages\requests\api.py", line 119, in post
return request('post', url, data=data, json=json, **kwargs)
File "C:\Users\lingampet.kartheek\AppData\Local\Programs\Python\Python37\lib\site-packages\requests\api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "C:\Users\lingampet.kartheek\AppData\Local\Programs\Python\Python37\lib\site-packages\requests\sessions.py", line 530, in request
resp = self.send(prep, **send_kwargs)
File "C:\Users\lingampet.kartheek\AppData\Local\Programs\Python\Python37\lib\site-packages\requests\sessions.py", line 643, in send
r = adapter.send(request, **kwargs)
File "C:\Users\lingampet.kartheek\AppData\Local\Programs\Python\Python37\lib\site-packages\requests\adapters.py", line 498, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: (10054, 'WSAECONNRESET')

Facing this issue as well

@lambacck
Copy link
Contributor

lambacck commented Jun 9, 2022

Did you exceed one of the batch size limits? See https://developer.salesforce.com/docs/atlas.en-us.216.0.api_asynch.meta/api_asynch/asynch_api_concepts_limits.htm for details.

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

2 participants