Comment stream dropping comments?
See original GitHub issueIssue Description
A simple consumer like the below seems to not be processing all comments.
I observed a drop in total comment throughput with the praw stream sometime around december 2018 and it has never really recovered.
I have tested by manually making a number of comments and observing that some of them don’t get captured by the praw stream.
IO on the client side is not a limiting factor.
for comment in reddit.subreddit('all').stream.comments():
do_something(comment)
System Information
- PRAW Version: 6.0.0
- Python Version: 3.7
- Operating System:
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:33 (21 by maintainers)
Top Results From Across the Web
Twitch comment lag when posting a comment. : r/Twitch - Reddit
Whenever I post a comment in any chat it takes a while for my comment to show up. This thread is archived. New...
Read more >3 Ways to Put Comments on Screen in a Livestream on ...
How to put comments on screen during your live stream … Whether you're using YouTube, Facebook or Twitch, here are 3 ways to...
Read more >How to display comments in a Live Stream? 👀
View and manage comments from your YouTube, Facebook and Twitch streams in one place, and selectively display them on screen. Tutorial.
Read more >How to Turn Off Student Comments in the Stream - Iorad
1. The first step is to open Google Classroom and click on Name of the Google Class to be altered. 2. Click on...
Read more >SubredditStream — PRAW 7.6.1 documentation
for comment in reddit.subreddit("test").stream.comments(): print(comment) ... some high-volume streams, especially the r/all stream, may drop some ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think removing the before adjusting would be an acceptable fix for now, although know that everyone who’s not streaming from r/all is going to be slightly worse off, which makes me a little bit uncomfortable.
But it’s not like any other reddit api library does any sort of fancy
before
param adjusting either.I’ll reintroduce before adjusting with a more optimal algorithm by the time I’m though with #1025. (My new streaming implementation already tries to detect the target listing’s activity and adjusts
before
accordingly, and in a future edit I’ll get it choose to keep using aNone
value for active listings like r/all.)I tried this script
And here is the result log. As we can see, there are many dropped comments as @bicubic pointed out, and some of them can be retrieved later via api/info:
I too am guessing it’s a cache problem (rather than private subreddit or unapproved comment). As the second GET /comments request in the log suggests (it returns only 9 comments and too many holes), PRAW is requesting too fast?