apollographql / apollo-server

🌍  Spec-compliant and production ready JavaScript GraphQL server that lets you develop in a schema-first way. Built for Express, Connect, Hapi, Koa, and more.
https://www.apollographql.com/docs/apollo-server/
MIT License
13.76k stars 2.03k forks source link

'Records ejected from the Engine Reporting signature cache' error #4568

Open dmahely opened 4 years ago

dmahely commented 4 years ago

Description

The following error shows up on the production server a lot. Reloading the server seems to make it stop but it always comes back after some time.

This server is processing a high number of unique operations. A total of n records have been ejected from the Engine Reporting signature cache in the past interval. If you see this warning frequently, please open an issue on the Apollo Server repository.

Expected behavior:

No errors.

Actual behavior:

A lot of errors.

Screen Shot 2020-08-24 at 5 40 36 PM

Versions

Apollo server: 2.9.11 Node: 12.13.0 Ubuntu: 16.04.6

Runnable reproduction

Unfortunately I can't provide that since this error only shows up on our production server. Understanding what causes this error and whether any action is required would be greatly appreciated.

abernix commented 4 years ago

This tends to happen when clients are sending unique operations on nearly every request at a relatively high rate. This makes it difficult for a variety of in-memory caches that Apollo Server uses.

Is it possible that you're dynamically generating GraphQL queries that are each unique?

For example:

Do any of these sound possible? It sounds like you have Apollo Studio, so your dashboard may have some insight into the answers to these questions. In that case, you could also consider contacting our customer support for additional assistance!

stuartmclean commented 2 years ago

Setting cache: 'bounded' when initializing our ApolloServer made this error occur less frequently for us. See docs here.

glasser commented 2 years ago

@stuartmclean Really? It's a completely unrelated cache.

glasser commented 1 year ago

This is a warning that any Apollo Server can be induced to print if a random client on the internet sends it enough distinct queries. I've never been particularly excited about it and it probably should be removed.