Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Angular error NG02825 means a response body fetched by Angular’s server-side rendering (SSR) path exceeded the configured size limit. The default is 1 MB per buffered response. Find the failing request first; then either raise the limit only if SSR needs that data, or disable transfer caching for that request if the browser alone needs it.

What NG02825 means

NG02825 is a runtime error titled “Fetch response body exceeds the configured limit.” It occurs when HttpClient uses Angular’s fetch backend during server-side rendering and buffers a response body larger than the configured maxResponseBodySize. Angular’s current documentation sets the default at 1 MB per buffered response body. Angular’s NG02825 documentation

This is a limit on response buffering in Angular’s SSR fetch path—not a general browser download-size limit. The request that triggers it depends on your application; the error alone does not identify a particular endpoint.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Find the request that exceeded the limit

  1. Read the error message for the configured limit, which is expressed in bytes.

  2. Check your network logs or the SSR server console for the failing request URL. Identify which response is being fetched during server rendering and whether SSR actually needs its body.

Choose the remedy based on where the data is needed

Need for the response Remedy Scope and trade-off
Server rendering needs the data. Set maxResponseBodySize in the options passed to provideServerRendering. The setting is in bytes and applies globally to server-side HttpClient requests using the fetch backend. A higher limit can increase memory use and denial-of-service risk.
Only the browser needs the large response. Set transferCache: false on that request. This opts that request out of transfer caching; it is a per-request option. Consider moving large downloads outside SSR.

Raise the limit only when SSR requires the response

Pass a deliberately chosen byte limit to provideServerRendering. Angular’s example sets the limit to 5 MB; that is an illustration, not a universal safe value or recommendation:

provideServerRendering(
  {
    maxResponseBodySize: 5 * 1024 * 1024, // 5 MB
  },
  withRoutes(serverRoutes),
)

Choose a limit that accommodates the legitimate SSR response without being larger than necessary. Angular advises keeping the limit as small as the application allows because buffering larger bodies can consume more memory and increase denial-of-service risk. Angular’s NG02825 guidance

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Opt a client-only response out of transfer cache

If server rendering does not need the large response and the browser can fetch it after the page loads, disable transfer cache for that request:

httpClient.get('/api/large-data', { transferCache: false });

This setting applies to the individual request rather than changing the global SSR response-body limit. Angular also recommends moving large downloads outside server rendering. Angular’s NG02825 guidance

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.