You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After another 10 minutes, the following error log is generated
{"level":50,"time":1714684803087,"pid":28,"hostname":"9e4d1f5243de","err":{"type":"GraphQLError","message":"Maximum call stack size exceeded","stack":"""RangeError: Maximum call stack size exceeded\n at validatePayload (file:///directus/node_modules/.pnpm/file+packages+utils_vue@3.4.23/node_modules/@directus/utils/dist/shared/index.js:1271:25)\n at file:///directus/node_modules/.pnpm/file+packages+utils_vue@3.4.23/node_modules/@directus/utils/dist/shared/index.js:1277:16\n at Array.map (<anonymous>)\n at validatePayload (file:///directus/node_modules/.pnpm/file+packages+utils_vue@3.4.23/node_modules/@directus/utils/dist/shared/index.js:1276:21)\n at file:///directus/node_modules/.pnpm/file+packages+utils_vue@3.4.23/node_modules/@directus/utils/dist/shared/index.js:1277:16\n at Array.map (<anonymous>)\n at validatePayload (file:///directus/node_modules/.pnpm/file+packages+utils_vue@3.4.23/node_modules/@directus/utils/dist/shared/index.js:1276:21)\n at file:///directus/node_modules/.pnpm/file+packages+utils_vue@3.4.23/node_modules/@directus/utils/dist/shared/index.js:1277:16\n at Array.map (<anonymous>)\n at validatePayload (file:///directus/node_modules/.pnpm/file+packages+utils_vue@3.4.23/node_modules/@directus/utils/dist/shared/index.js:1276:21)""","path":["update_Single_Answer_Task_item"],"locations":[{"line":24,"column":5}],"extensions":{}},"msg":"Maximum call stack size exceeded"}
Workaround
Setting GRAPHQL_SCHEMA_CACHE_CAPACITY: 1 resolves the timeouts and errors. CPU and memory usage remain relatively unchanged. (Initially, 'GRAPHQL_SCHEMA_CACHE_CAPACITY' has not been set)
The following chart illustrates changes after setting this flag:
I tried various settings, and you can see that none of my previous attempts had any effect. However, after setting GRAPHQL_SCHEMA_CACHE_CAPACITY: 1, the system became more stable, and the errors were resolved.
Attempts to disable caches and flows showed no significant effects
Enabling flows at 3:54 caused an increase in latencies
To Reproduce
Load type
I am running a script for initial data loading without any other load.
I send requests sequentially (no parallelism).
There are approximately 10,000 entities. For each, I attempt to find it first; if not found, I then create or update the entity.
Currently, I am not using batch operations.
The error has been reproduced with update requests. I have not attempted to reproduce it with create operations.
My data
The data structure is nested with a reference to a parent object. The script user has access to the parent object, which is visible to GraphQL. I do not update the relation in update requests.
It includes nested JSON objects.
Most fields are not included in the update requests.
My requests
I use GraphQL to send requests, with only one query or mutation per HTTP request.
I use Rust and the graphql-client library for making requests.
{
"variables": {
"id": "aca441bc-3e76-4409-9f96-fa112d37f506",
"data": {
"status": "published",
"description": "I want to ${...} a professional football player in the future.",
"solution": "be",
"test_options": [
{
"value": "be"
},
{
"value": "bee"
},
...
],
"source": "..."
}
},
"query": """ mutation UpdateSingleAnswerTask($id: ID!, $data: update_Single_Answer_Task_input!) { update_Single_Answer_Task_item(id: $id, data: $data) { id status user_created date_created user_updated date_updated task_type description solution test_options suggestions source description_variants priority unit_id } }""",
"operationName": "UpdateSingleAnswerTask"
}
Directus Version
10.10.7
Hosting Strategy
Self-Hosted (Docker Image)
The text was updated successfully, but these errors were encountered:
a14e
changed the title
Cache related service degradation. (Flows stop working, updates start fails with "Maximum call stack size exceeded")
Cache related service degradation. (Flows stop working, updates start failing with "Maximum call stack size exceeded")
May 4, 2024
Describe the Bug
What is happening?
Under a specific small load (described in the "To Reproduce" section), the following symptoms are observed:
Workaround
GRAPHQL_SCHEMA_CACHE_CAPACITY: 1
resolves the timeouts and errors. CPU and memory usage remain relatively unchanged. (Initially, 'GRAPHQL_SCHEMA_CACHE_CAPACITY' has not been set)To Reproduce
Load type
My data
My requests
3.1 for search
3.2 for update
Directus Version
10.10.7
Hosting Strategy
Self-Hosted (Docker Image)
The text was updated successfully, but these errors were encountered: