Comments (10)
Are you opening a file and not closing it properly anywhere?
from sneakpeek.
Nope. I suspect it ran out of memory or something, because this's happened before, and it's always after a few days.
@yleong suggested running it as a system service I think, so this might be low priority if we're able to rewrite how the program is run.
from sneakpeek.
If you are planning to do a refactor, I strongly suggest that the files be regrouped, minimally, into an src/ drive and tests/ drive respectively for source code and test files.
from sneakpeek.
The Reddit API was returning a HTTP response status of 503 Service Unavailable
when praw
is trying to call response = self._authenticator._post(url, **data)
to get new submissions.
The relevant line is prawcore.exceptions.ResponseException: received 503 HTTP response
. (source here) The rest of it looks to be this exception being thrown up the stack until it hits some sort of stdin handler.
I think we can catch this response here and retry the request after waiting for a bit, since 503 sometimes indicates an overloaded server. This can be done in addition to running it under pm2
or systemd to ensure higher uptime.
Regarding the code refactor, I am not familiar with Python project structure, but what @xlanor suggested makes sense.
from sneakpeek.
Are there more crash logs available?
from sneakpeek.
Yup!
from sneakpeek.
Ricemedia handler also threw exception. I have opened #19 to track that separately.
from sneakpeek.
@yleong I checked the PRs and I saw you merged one which fixes this. Can I close this issue and prepare to create a new release?
from sneakpeek.
Sure. If the program still crashes maybe we can reopen.
from sneakpeek.
Okay, closing this for now. @yleong @xlanor I'm pushing v0.5.0-beta into production, I've run manual tests and it looks good.
from sneakpeek.
Related Issues (17)
- Handle articles with comment.body longer than 10000 characters HOT 2
- cnalifestyle.channelnewsasia.com has title only (no body) HOT 2
- I have tried to simply some of the code, have a look. HOT 16
- Ricemedia handler unable to handle links with tracking query HOT 2
- Incorrect article.text parsing (ricemedia.co) HOT 2
- Implement proper logging HOT 8
- Program still crashes HOT 12
- Program stops running after a while without error/exception
- Program does not resume running if scan() method throws
- Remove unused files and dependencies
- Warn when env var `SUBREDDIT` is not set
- Set up automated code review in deployment pipeline
- Refactor config options to environment variables
- Detect and handle premium Straitstimes articles HOT 5
- Special characters not escaped
- Today article has title only (no body) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sneakpeek.