Connection aborted., error(104, 'Connection reset by peer')

I have created a api in Django and inside that calling a third party api which accepts xml data. With 30 rows of XML it is working fine, for more rows throwing the error "Connection aborted.', error(104, 'Connection reset by peer')". The third party also provided a UI so I can test that upto 5000 rows they are accepting and returning proper result.

## Expected Result
The post request should work properly for more data in the request as it is working fine for less data.

## Actual Result

```
ConnectionError at /v1/send-sms/
('Connection aborted.', error(104, 'Connection reset by peer'))
Request Method:	POST
Request URL:	http://example.com/v1/send-sms/
Django Version:	1.11
Exception Type:	ConnectionError
Exception Value:	
('Connection aborted.', error(104, 'Connection reset by peer'))
Exception Location:	/home/user-135/sandbox/venv/local/lib/python2.7/site-packages/requests/adapters.py in send, line 490
Python Executable:	/home/user-135/sandbox/venv/bin/python
Python Version:	2.7.12
Python Path:	
['/home/user-135/public_html/MyProject',
 '/home/user-135/sandbox/venv/lib/python2.7',
 '/home/user-135/sandbox/venv/lib/python2.7/plat-x86_64-linux-gnu',
 '/home/user-135/sandbox/venv/lib/python2.7/lib-tk',
 '/home/user-135/sandbox/venv/lib/python2.7/lib-old',
 '/home/user-135/sandbox/venv/lib/python2.7/lib-dynload',
 '/usr/lib/python2.7',
 '/usr/lib/python2.7/plat-x86_64-linux-gnu',
 '/usr/lib/python2.7/lib-tk',
 '/home/user-135/sandbox/venv/local/lib/python2.7/site-packages',
 '/home/user-135/public_html/MyProject',
 '/home/user-135/public_html/MyProject']
Server time:	Wed, 7 Mar 2018 10:55:19 +0530
```

## Reproduction Steps

```python
import requests

recievers = ''
url = 'https://example.com/sms/'
for x in xrange(0, len(users)):
    y = x + 1
    body_content = body
    phone = mobile_no
    recievers = recievers + "<SMS>.......</SMS>"

xml = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n<!DOCTYPE MESSAGE SYSTEM \"http://127.0.0.1:80/sms/ttr/sms.ptp\">\n<MESSAGE VER=\"1.2\">\n<USER USERNAME=\""+username+"\" PASSWORD=\""+password+"\" />"+recievers+"\n</MESSAGE>"

querystring = {"data": xml,"action":"send"}
headers = {'content-type': "application/xml"}
response = requests.request("POST", url, headers=headers, params=querystring)
```

## System Information

    $ python -m requests.help

```
{
  "chardet": {
    "version": "2.3.0"
  }, 
  "cryptography": {
    "version": ""
  }, 
  "idna": {
    "version": ""
  }, 
  "implementation": {
    "name": "CPython", 
    "version": "2.7.12"
  }, 
  "platform": {
    "release": "4.4.0-112-generic", 
    "system": "Linux"
  }, 
  "pyOpenSSL": {
    "openssl_version": "", 
    "version": null
  }, 
  "requests": {
    "version": "2.18.4"
  }, 
  "system_ssl": {
    "version": "1000207f"
  }, 
  "urllib3": {
    "version": "1.21.1"
  }, 
  "using_pyopenssl": false
}
```

This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c).

Hi @aavrug, thanks for opening this issue. Unfortunately, it seems this is a request for help instead of a report of a defect in the project. Please use [StackOverflow](https://stackoverflow.com) for general usage questions instead and only report defects here.

From a brief look, this is the server choosing to close the connection for some reason. Likely either the request is taking too long, or you're hitting some predetermined threshold they have set.

But as I explained from my application the server is not closing the request. Also the third party api request I also checked it is working fine If I am directly calling it.