question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Handle Connection Errors

See original GitHub issue

Issue Description

If running collection for a historical period, often the connection is dropped with timeout errors for me. I’ve tried on my local machine and a server which is always on. Some simple error handling and requesting the same item (comment/post) again would be good.

Paste of code since GitHub formatted it poorly: https://pastebin.com/pNUpgJXL

Errors raised:

raise ReadTimeoutError(self, url, "Read timed out. (read timeout=%s)" % timeout_value) urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='www.reddit.com', port=443): Read timed out. (read timeout=16.0)

Followed by

raise ReadTimeout(e, request=request) requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='www.reddit.com', port=443): Read timed out. (read timeout=16.0)

followed by

raise RequestException(exc, args, kwargs) prawcore.exceptions.RequestException: error with request HTTPSConnectionPool(host='www.reddit.com', port=443): Read timed out. (read timeout=16.0)

System Information

PRAW Version: 5.3.0

Python Version: 3.6.3 Operating System: OS X 10.13 || Ubuntu 16.04

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
jarhill0commented, Feb 11, 2018
2reactions
bboecommented, Feb 6, 2018

For future reference you can triple quote the block like:

```
data
```
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to handle a connection error gracefully in requests?
Check out Python requests exception handling for an example of catching your specific exception.
Read more >
4.3 Handling Connection Errors
Because connecting to an external server is unpredictable, it is important to add error handling to your .NET application. When there is an...
Read more >
How to handle connection Errors in Qlik - 1482113
Hi folks, as obvious with its title, we'll discuss in this article a simple method to handle some errors in Qlik. To explain...
Read more >
Handle transient database connection errors
In a cloud environment, such as Azure, database connections can drop periodically. You can recognize such transient errors and automatically ...
Read more >
Unable to catch connection error in order to handle ... - GitHub
I'm trying to gracefully handle redis errors, in order to bypass the error and do something else instead, instead of crashing my app....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found