Closed alek-p closed 4 years ago
The library hasn't changed how it's retrieving data, so you may want to check your node version...
If you could give us the URL that is giving you an error, we can add it to our integration suite and figure out what's up, as a 524 is a connection timeout and not likely to be on the caller's end.
Could you provide the following:
Node.js version:
Feed url:
Any other custom config you're providing:
I noticed the error handling has changed so perhaps the timeouts were just getting ignored before instead of throwing the error?
Node.js version: v0.10.25
Feed url: I have ~10 feeds connected, I'll find which one is giving the error and will update this ticket.
Any other custom config you're providing: No custom configs
Here is the partial URL of the feed I'm using: http://api.prnewswire.com/releases/version01/getRSS?query=language:en&pageSize=100&getRecent=true&timeInterval=60&apikey=xxxxxxxx unfortionatley I can't provide the full URL without revealing my API key. You could sign up for your own API key here: http://api.prnewswire.com/user/jsp/register.jsp
yeah, we don't support node v0.10 anymore. Please upgrade to a minimum of node 8.
You'll get a lot of improved performance and syntax upgrades to be on par with modern javascript.
I am experiencing the same since upgrade. node: v12.16.1
example URL: https://www.oedp-dachau.de/service/rss/feeds/oedp-blog-rss-feed/
The same what? Precisely the same error?
Have you tried moving where you're running it, as, again, 524 is a timeout, not a client end failure
@alek-p look at your feed url, is it possible your page size is just too large? 🤔
@midzer i tested your url and i'm getting nothing from it because there's no items in it....
const FeedEmitter = require('rss-feed-emitter');
const feeder = new FeedEmitter();
const testUrls = ['https://www.oedp-dachau.de/service/rss/feeds/oedp-blog-rss-feed/'];
const feeds = feeder.add({
url: testUrls,
timeout: 10000,
skipFirstLoad: false,
});
feeder.on(`initial-load:${testUrls[0]}`, console.log);
console.log('starting....');
feeder.on('new-item', (i) => {
console.log(i);
console.log(feeds.length);
console.log(feeds[0].items.length);
});
feeder.on('error', console.error);
λ node test.js
starting....
{
url: 'https://www.oedp-dachau.de/service/rss/feeds/oedp-blog-rss-feed/',
items: []
}
<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0">
<channel>
<title>ÖDP Dachau: Blog</title>
<link>https://www.oedp-dachau.de/</link>
<description>Unsere Kolumne zu aktuellen politischen Themen - jeden Freitag neu.</description>
<language>en</language>
<image>
<title>ÖDP Dachau: Blog</title>
<url>https://www.oedp-dachau.de/fileadmin/templates/images/rss-icon.gif</url>
<link>https://www.oedp-dachau.de/</link>
<width>15</width>
<height>15</height>
<description>Unsere Kolumne zu aktuellen politischen Themen - jeden Freitag neu.</description>
</image>
<generator>TYPO3 - get.content.right</generator>
<docs>http://blogs.law.harvard.edu/tech/rss</docs>
<lastBuildDate>Thu, 01 Jan 1970 01:00:00 +0100</lastBuildDate>
</channel>
</rss>
100 entries is not all that big and going smaller but more frequent risks me missing items as they update in bulk. That would probably be worse than fetching all items but later. Also 100 entries is currently working without throwing up an uncaught exception with the older version of the library. That might mean it just silently fails when there is a feed timeout but that's ok for me right now.
@TobiTenno Thanks for investigating!
Strangly, rss-feed-emitter v3 crashed because of this url after a while of running. Same with 2 or 3 other RSS feeds which I have disabled currently. This did not happen with v2. Meanwhile I have downgraded back to v2 on my production site.
@alek-p okiedoke. i'm not familiar with how entries are sized in rss.
@midzer i'll keep my little local one running and if you have any others you want me to test, i'll happily test them all locally. i'd love to see what we can do to figure out the crash.
@midzer are you, by chance, not creating an 'error' handler for the feeder? I realized I have one which may be why my process isn't crashing. I did end up getting an error when I hibernated my computer and re-awoke it, but those were due to actual disconnections from the internet.
Not that I know of (same as v2)
Here's my current v3 code https://github.com/midzer/feed-websocket/blob/push/index.js (for v2 is one commit earlier)
yeah, so in general, i'd recommend adding a feeder.on('error', () => {})
handler at minimum
This is pretty much standard with any emitter (so far as i've seen), since it can cause unhandled exception exceptions if you don't handle potential errors from the error event
Like even if it is a specific issue to v3 that we're exposing the errors like this, it's better to code defensively like this
:tada: This issue has been resolved in version 3.2.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Thanks for the great library, I've been using it for years and after upgrading to v3.1.0 I'm running into problems so I had to revert to using v2.0.1
This is the trace that I keep seeing: