Skip to content

Increase stdout buffer limit to prevent errors#472

Open
armanridho wants to merge 1 commit into
GreyDGL:mainfrom
armanridho:main
Open

Increase stdout buffer limit to prevent errors#472
armanridho wants to merge 1 commit into
GreyDGL:mainfrom
armanridho:main

Conversation

@armanridho

Copy link
Copy Markdown

Increase stdout StreamReader's line-buffer limit to 16 MiB to prevent LimitOverrunError during large JSON/context payload streams.

Related Error :

[STATE] error: Separator is found, but chunk is longer than limit
Stage 'Asset Identification' failed: Separator is found, but chunk is longer than limit
[WARNING] Stage 'Asset Identification' had an error: Separator is found, but chunk is longer than limit

Increase stdout StreamReader's line-buffer limit to 16 MiB to prevent LimitOverrunError during large JSON/context payload streams.

bug fixed :

[STATE] error: Separator is found, but chunk is longer than limit
Stage 'Asset Identification' failed: Separator is found, but chunk is longer than limit
[WARNING] Stage 'Asset Identification' had an error: Separator is found, but chunk is longer than limit

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request attempts to increase the stdout StreamReader's line-buffer limit to 16 MiB to prevent LimitOverrunError during large payload streams. However, the implementation introduces a critical syntax error by placing an if statement inside a function call's argument list, and references self._process before it is defined. The reviewer provided a code suggestion to resolve this by moving the logic after the function call.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +195 to 199
# Raise the stdout StreamReader's line-buffer limit to 16 MiB
# This prevents LimitOverrunError during large JSON/context payload streams
if self._process.stdout is not None:
self._process.stdout._limit = 16 * 1024 * 1024
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

critical

This code introduces a syntax error because an if statement is placed inside the argument list of the asyncio.create_subprocess_exec function call. Additionally, self._process is not yet defined/assigned at this point, which would result in a NameError or AttributeError at runtime.

To fix this, close the asyncio.create_subprocess_exec call first, and then configure the _limit on self._process.stdout.

Suggested change
# Raise the stdout StreamReader's line-buffer limit to 16 MiB
# This prevents LimitOverrunError during large JSON/context payload streams
if self._process.stdout is not None:
self._process.stdout._limit = 16 * 1024 * 1024
)
)
# Raise the stdout StreamReader's line-buffer limit to 16 MiB
# This prevents LimitOverrunError during large JSON/context payload streams
if self._process.stdout is not None:
self._process.stdout._limit = 16 * 1024 * 1024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant