Im using a 3rd party api service for a text sending job.
When I send around 5000 numbers as payload to the API, it works fine. I have noticed that sometimes when the payload count exceeds to 7000 or above. I receive the following error code in response from the api.
'Connection aborted.', RemoteDisconnected('Remote end closed connection without response',)
msg_dict['test'] = test
msg_dict_json = json.dumps(msg_dict)
data = {
'apikey': apikey,
'data': msg_dict_json,
}
res = requests.post('https://api.txtlocal.com/bulk_json/', data=data)
return res
sample data obj:
data={
"api_key": api_key,
"data": '{"sender": "abc", "messages": [{"number": "+0000000000", "text": "some text"}], "test": true}'
}
data['data'] can be over 7000 objects (which is causing the issue)
I know there's a limit of 10000 users per api call for this api: https://api.txtlocal.com/bulk_json/ so my payload count always stays less than 10000.
PS: The request doesnt rollback, sms are sent to the user even when I get a response as mentioned above. Just I dont receive a positive response and it throws exception.
Also i want to mention that I have successfully been able to send 7 to 8000 sms with successful response but now its sending this issue.
Any help would be appreciated, thanks.