Memory spikes on AWS EC2 #2292
Replies: 1 comment 8 replies
-
Hello, Satvik!
Ocelot has ceased targeting the .NET 7 SDK as of version 24.0. The current target frameworks for Ocelot v24 are net8.0 and net9.0 ❗
Since version 24.0 you can reuse Ocelot/samples/Basic/Program.cs Line 9 in e78fe42 Ocelot/src/Ocelot/DependencyInjection/ConfigurationBuilderExtensions.cs Lines 218 to 219 in e78fe42 which is explained in the Getting Started doc. So, you can write simply this 👇 builder.Configuration.AddOcelot($"Ocelot/ocelot.{builder.Environment.EnvironmentName}.json", false, true);
builder.Services.AddOcelot(builder.Configuration);
await app.UseOcelot();
I do not believe this constitutes a spike; rather, it appears to be a typical memory increase resulting from the processing of demanding requests, such as handling large bodies or managing intensive loads a specific route.
Some frontend applications can establish long-lasting WebSocket connections. If you lack a WebSocket
Understood! This indicates that Ocelot previously handled extensive requests, resulting in the allocation of large memory blocks, specifically ArrayPool objects. So, we don't manage TTL of those objects, and that's totally handled by .NET framework and garbage collector. (FYI @ggnaegi ) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am using ocelot Version="24.0.0" in .net 7 microservices to route request from front end applications , but sometime i am running into sudden memory spikes on aws ec2 , initially memory was near 8% that went to 16% somehow on ec2 and it not getting down during off business working hours , below is my ocelot configuration in program.cs
"ocelot.production.json" file:
Beta Was this translation helpful? Give feedback.
All reactions