Skip to content

Buffer Size Constraints / Large Data Hang (Critical Blocking Issue) #2

@LukasGPC

Description

@LukasGPC

The buffer appears to only allow about 50K of data to be returned in a large query causing hangs and connection pooling polution:

From my internal document

From my API Code:

  1. Buffer Size Constants:
    • SQL Chunk Size: 31,904 bytes (message.go:101) - NOT the issue
    • Max Rows Per Fetch: 200 (sql.go:401) - PRIMARY BOTTLENECK
    • Query Timeout: 10 seconds (sql.go:400) - doesn't protect data fetching
    • List Item Boundary: 253 bytes (listitem.go:82) - already fixed

Working on returning a result set on my project table:

  1. Root Cause of Issue SQL Functions (UPPER/LOWER) + JOINs Cause Hang **Severity:** ⚠️ CRITICAL #6 (Large data hang):
    • Product table: 8× VARCHAR(1024) = ~8KB per row
    • 200 rows × 8KB = 1.6MB theoretical
    • With 2 JOINs: 2-3MB actual
    • Server can't send oversized batch → hangs at row 9-15
    • Driver waits forever (no timeout) → infinite hang

Recommendations:

  • sql.go:401 - Make maxRows configurable
  • sql.go:129-143 - Add timeout to fetchMoreData()
  • mod.go - Add maxRowsPerFetch field to Connection struct
  • url.go - Parse maxRows from DSN

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions