Skip to content

Increase AbpMemoryPoolHttpResponseStreamWriterFactory buffer size to 256KB#25253

Merged
EngincanV merged 1 commit into
rel-10.3from
fix/increase-response-stream-buffer-size
Apr 14, 2026
Merged

Increase AbpMemoryPoolHttpResponseStreamWriterFactory buffer size to 256KB#25253
EngincanV merged 1 commit into
rel-10.3from
fix/increase-response-stream-buffer-size

Conversation

@maliming

@maliming maliming commented Apr 14, 2026

Copy link
Copy Markdown
Member

Increase the default buffer size of AbpMemoryPoolHttpResponseStreamWriterFactory from 32KB to 256KB.

When rendering large MVC views (e.g. Account settings page with multiple tabs in non-English locales), the 32KB buffer overflows during ViewBuffer.WriteToAsync, triggering a synchronous flush to HttpResponseStream.Write which throws InvalidOperationException: Synchronous operations are disallowed.

Since the buffer is backed by ArrayPool, the increased size has negligible memory impact.

…m 32KB to 256KB

Prevents 'Synchronous operations are disallowed' error when rendering
large MVC views (e.g. Account settings page with multiple tabs in
non-English locales).
Copilot AI review requested due to automatic review settings April 14, 2026 06:34
@maliming maliming added this to the 10.3-final milestone Apr 14, 2026
@maliming maliming requested a review from EngincanV April 14, 2026 06:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR increases the default buffer size used by ABP’s custom IHttpResponseStreamWriterFactory implementation to reduce the likelihood of MVC view rendering triggering a synchronous flush (and the associated InvalidOperationException when synchronous I/O is disallowed).

Changes:

  • Increase AbpMemoryPoolHttpResponseStreamWriterFactory.DefaultBufferSize from 32KB to 256KB.

@EngincanV EngincanV merged commit 6367a14 into rel-10.3 Apr 14, 2026
7 checks passed
@EngincanV EngincanV deleted the fix/increase-response-stream-buffer-size branch April 14, 2026 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants