ZhuLinsen/daily_stock_analysis · error · IntelligenceServiceError
feed response is too large
Error message
feed response is too large
What it means
Error "feed response is too large" thrown in ZhuLinsen/daily_stock_analysis.
Source
Thrown at src/services/intelligence_service.py:484
request_url = urljoin(request_url, location)
self._validate_url(request_url)
continue
response.raise_for_status()
break
else:
raise IntelligenceServiceError(f"feed redirect chain exceeds {_MAX_FEED_REDIRECTS}")
self._validate_url(response.url or request_url)
if hasattr(response, "iter_content") and callable(response.iter_content):
chunks = []
total = 0
for chunk in response.iter_content(chunk_size=8192):
if not chunk:
continue
total += len(chunk)
if total > _MAX_FEED_BYTES:
raise IntelligenceServiceError("feed response is too large")
chunks.append(chunk)
content = b"".join(chunks)
else:
content = response.content[: _MAX_FEED_BYTES + 1]
if len(content) > _MAX_FEED_BYTES:
raise IntelligenceServiceError("feed response is too large")
return self._parse_feed(content, source_name=fields["name"], limit=limit)
except IntelligenceServiceError:
raise
except Exception as exc:
raise IntelligenceServiceError(_UPSTREAM_FETCH_FAILURE_MESSAGE) from exc
finally:
if response is not None:
response.close()
def _fetch_newsnow_entries(self, fields: Dict[str, Any], *, limit: int) -> List[FeedEntry]:
timeout = max(1, min(float(self.config.news_intel_fetch_timeout_sec), 30.0))
headers = {View on GitHub (pinned to 5159bd72e8)
Solutions
- Use a feed URL that returns a reasonably sized response.
- If the feed is legitimate, paginate or filter at the source rather than fetching a huge document.
- Check the endpoint is really an RSS/Atom feed and not a large HTML page or file download.
When it happens
Trigger: Thrown at src/services/intelligence_service.py:484 when the library encounters an invalid state.
Common situations: Raised when a feed response body exceeds the size cap; occurs with abnormally large feeds, truncated to protect memory.
AI-assisted analysis of ZhuLinsen/daily_stock_analysis@5159bd72e8 (2026-08-15).
Data as JSON: /api/errors/f870aa7acfabfb82.
Report an issue: GitHub.