CPU spike goes upto 90% (JSONAPI + paragraphs)

Created on 3 October 2023, about 1 year ago
Updated 4 October 2023, about 1 year ago

Problem/Motivation

We are getting CPU spike upto 90%, when someone tries to edit basic page which has lots of paragraphs and taxanomies referenced.
We are using JSONAPI for exposing the API/data.

Below is the sample query which is shown while analysis

SELECT "base_table"."vid" AS "vid", "base_table"."nid" AS "nid", max(node_field_data_7.created) AS "expression"
FROM
"node" "base_table"
INNER JOIN "node_field_data" "node_field_data" ON "node_field_data"."nid" = "base_table"."nid"
INNER JOIN "node__field_XXXXX" "node__field_XXXXX" ON "node__field_XXXX"."entity_id" = "base_table"."nid"
LEFT OUTER JOIN "taxonomy_term_data" "taxonomy_term_data" ON "taxonomy_term_data"."tid" = "node__field_XXXX"."field_XXXXX_target_id"
INNER JOIN "taxonomy_term_field_data" "taxonomy_term_field_data" ON "taxonomy_term_field_data"."tid" = "taxonomy_term_data"."tid"
LEFT JOIN "node__field_region" "node__field_region" ON "node__field_region"."entity_id" = "base_table"."nid"
LEFT OUTER JOIN "taxonomy_term_data" "taxonomy_term_data_2" ON "taxonomy_term_data_2"."tid" = "node__field_region"."field_region_target_id"
LEFT JOIN "taxonomy_term_field_data" "taxonomy_term_field_data_2" ON "taxonomy_term_field_data_2"."tid" = "taxonomy_term_data_2"."tid"

Our tech aspect are
Drupal 9.5.7
PHP 8.1
MYSQL - 5.7
Apache - 2.4

Hosted on
Amazon Elastic Beanstalk

Any help is hugely appreciated
Thanks in Advance

💬 Support request
Status

Active

Version

9.5

Component
Other 

Last updated about 15 hours ago

Created by

🇮🇳India ajay547

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024