apollo-server icon indicating copy to clipboard operation
apollo-server copied to clipboard

'Records ejected from the Engine Reporting signature cache' error

Open dmahely opened this issue 3 years ago • 4 comments

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.

dmahely avatar Sep 17 '20 07:09 dmahely

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:

  • Each has a randomly generated aliased name for the field.
  • Each has any number of randomly added fields.
  • Each has a randomly generated operation name.
  • Not using variables but instead interpolating variables as string literals.

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!

abernix avatar Sep 22 '20 09:09 abernix

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

stuartmclean avatar Jun 27 '22 12:06 stuartmclean

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

glasser avatar Jul 08 '22 05:07 glasser

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.

glasser avatar Oct 21 '22 05:10 glasser