Open flipperbw opened 7 years ago
What version of prawtools, praw, and prawcore are you running? Sounds like maybe the tokens aren't be updated properly.
version praw-4.0.0b21-py2.py3-none-any.whl. It only happens after a while of running.
Would you say about after an hour of running?
It's hard to tell, but yes probably. Usually I just check back in on the server and it's dead the next day, but it could well be an hour.
Just another update, last night produced this error:
Traceback (most recent call last): File "/usr/local/bin/reddit_alert", line 11, in
sys.exit(main()) File "/usr/local/lib/python2.7/site-packages/prawtools/alert.py", line 77, in main for comment in session.subreddit(subreddit).stream.comments(): File "/usr/local/lib/python2.7/site-packages/praw/models/util.py", line 40, in stream_generator limit=limit, params={'before': before_fullname}))): File "/usr/local/lib/python2.7/site-packages/praw/models/listing/generator.py", line 72, in next return self.next() File "/usr/local/lib/python2.7/site-packages/praw/models/listing/generator.py", line 45, in next self._next_batch() File "/usr/local/lib/python2.7/site-packages/praw/models/listing/generator.py", line 55, in _next_batch self._listing = self._reddit.get(self.url, params=self.params) File "/usr/local/lib/python2.7/site-packages/praw/reddit.py", line 210, in get data = self.request('GET', path, params=params) File "/usr/local/lib/python2.7/site-packages/praw/reddit.py", line 261, in request return self._core.request(method, path, params=params, data=data) File "/usr/local/lib/python2.7/site-packages/prawcore/sessions.py", line 119, in request params) File "/usr/local/lib/python2.7/site-packages/prawcore/sessions.py", line 62, in _request_with_retries json=json, params=params) File "/usr/local/lib/python2.7/site-packages/prawcore/rate_limit.py", line 28, in call response = request_function(_args, *_kwargs) File "/usr/local/lib/python2.7/site-packages/prawcore/requestor.py", line 48, in request raise RequestException(exc, args, kwargs) prawcore.exceptions.RequestException: error with request ('Connection aborted.', error("(104, 'ECONNRESET')",))
So I guess this one is different, but my rate limit is 180 seconds, which should be more than enough.
Looks like better exception handling is needed. Cannot do much about connection reset errors, other than log and retry. That should be a separate issue, however.
When I leave reddit_alert running, it keeps eventually crashing with this traceback:
Any ideas?