Apollo Server V4 Memory Increase (or leak)?

Hi developers,

Recently, I migrated the apollo server v3 to v4 on around 17 August and experience there are spikes on load balancer average response time.

Screenshot 2023-08-21 at 1.45.55 PM

Then I checked the server memory and it is not stable as well.

So, I am assuming whether it is related to apollo server v4 migration.

I was trying to use k6 load testing to conduct the pressure testing to simulate the high concurrency requests to hit my local server (Apollo server v4), and I have some logging that shows the memory heap usage increase rapidly.

Then I switched back to Apollo server v3, and conducted the high concurrency requests to hit my local server, and the logging shows the memory heap usage increase smoothly comparing to apollo server v4.

I also trying to switch the node version between 14, 16 and 18, the result was still the same.

I have no idea what the issue will be. Can anyone give me help?

Dependencies

"graphql": "^15.7.2", // also tried to upgrade to 16, still get the same result
"@apollo/server": "^4.9.1"

node version: 14.16

Hey @dsy401, thanks for reporting. Can you tell me if the issue still exists when you add the ApolloServerPluginUsageReportingDisabled() plugin to your plugins configuration? This might be related to an issue that’s already open:

If it seems unrelated, would you please open another issue on the apollo-server repo with as much detail as you have available and a reproduction? Without more details I’m not sure I can reproduce this, so please be as thorough as possible.

Thanks, I will add the ApolloServerPluginUsageReportingDisabled() to see whether it works or not

@trevor.scheer Looks like there were still memory leak and performance issue. I will create issue in apollo-server repo

Sounds good, thank you!

@dsy401 did you create the issue? We are also having a memory leak but we cannot find it yet.