-
Notifications
You must be signed in to change notification settings - Fork 70
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
panic: heap memory exhausted #1033
Comments
Hi @ianchanning, Thank you for using our client, and I appreciate you reaching out to us with this issue. The error message you encountered, To help us better understand and resolve the issue, could you provide the following details?
This information will greatly assist in diagnosing the problem more accurately. If possible, a snippet of the relevant part of your code where you integrate our client and execute queries would also be helpful. Looking forward to your response so we can work together to solve this issue. Best Regards |
Thank's for your reply... hopefully this is close to what you need. Although I don't really see how this can lead to a memory problem - it could be that we have a memory leak somewhere else and this is just the small query that hit the limit.
Here are the basic methods where we call the query private constructor() {
this.influx = new InfluxDB({
url: getEnvProperty('INFLUX_URL'),
token: process.env.INFLUX_TOKEN,
});
this.buckets = new BucketsAPI(this.influx);
this.query = this.influx.getQueryApi(getEnvProperty('INFLUX_ORGANIZATION_ID'));
}
async getLastSensorValue({
devEui,
metric,
start = new Date(1000),
stop = new Date(),
calibrationSensors = [],
}: {
devEui: string;
metric: string;
start?: Date;
stop?: Date;
calibrationSensors?: CalibrationSensorWithCalibration[];
}): Promise<Data | undefined> {
return new Promise<Data | undefined>((resolve, reject) => {
const fluxQuery = `
from(bucket: "${getBucketName()}")
|> range(start: ${start.toISOString()}, stop: ${stop.toISOString()})
|> filter(fn: (r) => r._measurement == "sensor")
|> filter(fn: (r) => r["devEUI"] == "${devEui}")
|> filter(fn: (r) => r["metric"] == "${metric}")
|> ${group(['devEUI'])}
${calibrationMap(calibrationSensors)}
|> last()
`;
let result: Data | undefined = undefined;
this.query.queryRows(fluxQuery, {
next(row, tableMeta) {
const point = tableMeta.toObject(row);
result = {
value: point._value,
time: new Date(point._time),
};
},
error(error: Error) {
reject(error);
},
complete() {
resolve(result);
},
});
});
} |
Do you have a detailed log or stack trace for a specific GCP function run that ended with panic: heap memory exhausted? |
This is all I have for the stack trace, not sure if you can tell anything from it:
|
Specifications
Code sample to reproduce problem
I don't know how I can reproduce this
Expected behavior
No heap memory error
Actual behavior
NodeHttpTransport.ts
generates this error:panic: heap memory exhausted
Additional info
Frankly I expect you will close this bug report. I have no good way of reproducing it. But currently there are zero hits for this on the internet, so I'm adding one. This could be because we're using Alpine Linux, but no idea.
The text was updated successfully, but these errors were encountered: