Skip to content

sqlx-pool-guard: allocate more memory on windows #5896

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 22, 2025

Conversation

pronebird
Copy link
Contributor

@pronebird pronebird commented Jul 16, 2025

Sentry picked up the following error on Windows:

imp::check_files_closed() failure: The specified information record length does not match the length required for the specified information class. (os error -805306364)

I have concluded that It's possible for the open file handles table to grow between calls to NtQuerySystemInformation resulting in the buffer being too small two times in a row.

In order to alleviate this, we should take a system returned length as a hint and allocate a bit larger buffer to avoid stumbling upon the same error on the next call.

Changes in this PR:

  • Allocate 1.5x more memory than reported by the system to provide a safety margin
  • Increase number of retry attempts to 5

JIRA-VPN-3688


This change is Reviewable

@pronebird pronebird merged commit 8f6f696 into develop Jul 22, 2025
7 of 15 checks passed
@pronebird pronebird deleted the am/handle-table-allocate-more-memory branch July 22, 2025 09:09
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.

3 participants