Hello k6 team!
Thanks for always assisting on my inquiries.
I have encountered a new problem with my load test - where I’m getting this error:
WARN[3548] The test has generated metrics with 200007 unique time series, which is higher than the suggested limit of 100000 and could cause high memory usage. Consider not using high-cardinality values like unique IDs as metric tags or, if you need them in the URL, use the name metric tag or URL grouping. See https://k6.io/docs/using-k6/tags-and-groups for details. component=metrics-engine-ingester
My test is solely k6 browser driven but has heavy polling behind the scenes, usually forming a unique URL, and a lot of marketing / analytics going on in the network as well. I reckon this is the reason why I’m hitting this error.
My test also is simple - it logs in via the browser and sits in the homepage for 3hrs to generate significant load (due to very heavy polling behind the scenes).
My question is, how do I avoid this error from happening? It uses up so much memory that my ECS tasks are peaking memory, and as a result, my k6 browser is crashing (a lot of Target Closed and Abnormal Closure). This has very quickly became an expensive trial and error in ECS.
I’m using scenarios in my options
, and i formed it like this:
export const myLoadScenario = {
tags: {
name: 'myDashboard'
},
discardResponseBodies: true,
systemTags: ['proto', 'method', 'status', 'name', 'group', 'check'],
scenarios: {
myLoadScenario: {
startTime: `${randomStartTime}s`,
executor: rampingVUs,
stages: [
{ duration: `5m`, target: 5 },
{ duration: `10m`, target: 10 },
{ duration: `30m`, target: 10 }
],
gracefulStop: '4h', // this ensures that the VU script gets executed and is not interrupted
tags: { name: 'myDashboard' },
exec: 'myDashboard'
}
},
thresholds: myCustomThreshold
};
I have observed this error around the 30-40 minute mark, perhaps because at that point it’s where I’ve accumulated so many time series data - but this also means, failing in my experimental solution is slow and painful.
Thanks in advance!