Print

Print


I appreciate your help. To replicate the persistent connection issue, either telnet or the short python script below should work.

```python
import requests
import logging

logging.basicConfig()
logging.getLogger().setLevel(logging.DEBUG)

s = requests.Session()

url = 'http://hcc-stash.unl.edu:8000/user/bbockelm/public/testfile'

for i in range(0, 3):
    print "Request #%d" % i
    r = s.get(url)
    print "Status = %d\n" % r.status_code
```

In the sample output below, we see "Resetting dropped connection", showing where the server disconnected. The requests are still successful due to error handling in the HTTP client.

```
Request #0
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): hcc-stash.unl.edu
DEBUG:requests.packages.urllib3.connectionpool:"GET /user/bbockelm/public/testfile HTTP/1.1" 200 1048576
Status = 200

Request #1
INFO:requests.packages.urllib3.connectionpool:Resetting dropped connection: hcc-stash.unl.edu
DEBUG:requests.packages.urllib3.connectionpool:"GET /user/bbockelm/public/testfile HTTP/1.1" 200 1048576
Status = 200

Request #2
INFO:requests.packages.urllib3.connectionpool:Resetting dropped connection: hcc-stash.unl.edu
DEBUG:requests.packages.urllib3.connectionpool:"GET /user/bbockelm/public/testfile HTTP/1.1" 200 1048576
Status = 200
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/xrootd/xrootd/issues/596#issuecomment-334178513

########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1