Skip to content
This repository was archived by the owner on Feb 7, 2026. It is now read-only.
This repository was archived by the owner on Feb 7, 2026. It is now read-only.

createQueryStream is not truly streaming; seems to be pooling #120

@jimkang

Description

@jimkang

Environment details

  • OS: Ubuntu, OS X
  • Node.js version: 8
  • npm version: 6.0.1
  • @google-cloud/bigquery version: 1.3.0

Steps to reproduce

  1. Use createQueryStream to run a query with a very large payload, in the GB range of results.
  2. Put a log in the data event handler for the stream.
  3. Watch the memory usage of that Node process swell before even a single data event. (If you have a big enough query, you'll get an OOM error. e.g.:
OOM in node_modules/@google-cloud/common/src/util.js:185
 183   if (is.string(body)) {
 184     try {
>185       parsedHttpRespBody.body = JSON.parse(body);
 186     } catch (err) {
 187       parsedHttpRespBody.err = new util.ApiError('Cannot parse JSON response');
debug>

Can we get it to stream data as it gets it and NOT pool it up in memory?

Metadata

Metadata

Labels

🚨This issue needs some love.api: bigqueryIssues related to the googleapis/nodejs-bigquery API.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions