• Resolved chrisathook

    (@chrisathook)


    Hi, I am attempting to diagnosis some WP site performance issues for a non-profit client of mine. in examining the site and AWS set up i noticed the AWS RDS SQL cluster they have set up for their WP site is just getting slammed with sessions and is running like 100% CPU time constantly. In the performance tools in AWS it mentions this query below that is causing problems with long waits to the write portion of the cluster.

    this query seems to be related to the events calendar plugin. I did verify that plugin and their WP instance are up to date. I am not a WP expert but am trying to lend a hand in figuring out what the problem could be. I also noticed the queries are operating on millions of rows which seems odd for a small site.

    Does anyone have any ideas of how i might troubleshoot this?

    SELECT SQL_CALC_FOUND_ROWS ( npfo_tec_occurrences . occurrence_id + ? ) AS occurrence_id FROM npfo_posts INNER JOIN npfo_postmeta ON ( npfo_posts . ID = npfo_postmeta . post_id ) JOIN npfo_tec_occurrences ON npfo_posts . ID = npfo_tec_occurrences . post_id WHERE ? = ? AND ( CAST ( npfo_tec_occurrences . end_date_utc AS DATETIME ) < ? AND ( npfo_postmeta . meta_key = ? AND npfo_postmeta . meta_value IN (?) ) ) AND npfo_posts . post_type = ? AND ( ( npf

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Support Darian

    (@d0153)

    Hi @chrisathook

    Thanks for reaching out.

    To assist you better, could you provide the full query that is causing the issue? This will help us review it and identify any potential issues on our end.

    Additionally, does the issue persist if you only activate our plugins while using a default theme like Twenty Twenty-One?

    If the issue still occurs, please provide the versions of the following so we can investigate further:

    • PHP
    • The Events Calendar
    • The Events Calendar PRO (if applicable)
    Thread Starter chrisathook

    (@chrisathook)

    Hi,

    but here is the info i was able to gather so far and some screenshots from the AWS tenant. I am not sure how to retrieve the entire SQL query from the amazon RDS UI it seems to truncate it.

    I don’t have access to make admin changes yet so i can’t test your hypothesis WP Memory Limit: 52.71 of 256MB (21%) | PHP Memory Limit: 52.71 of 256MB (21%) | IP-Address (www.foodgatherers.org): 172.31.15.27 | PHP: 8.3.14Version 6.7.2

    events calender Version 6.10.1.1

    Pro version

    Version 7.4.1?

    https://app.screencast.com/HnJHvGoje4Sjz

    https://app.screencast.com/8qecDlUlrah6O

    https://app.screencast.com/uCO93B0xejkoB

    @chrisathook commenting here to follow this thread. For the first time ever I’m having server load issues because of MySQL queries from TEC.

    Thanks.

    Plugin Support Darian

    (@d0153)

    Hi @chrisathook

    Thank you for providing additional details about this issue. I think you can collapse this part of the report so you can see the queries individually. Maybe you can get the full query from there.

    Just curious—does the issue persist even after deactivating The Events Calendar PRO? That would help us narrow down whether the problem is related to the PRO version or something else.

    If you have one of our premium plugins, we’d love to assist you further! To ensure we follow WordPress Forum Guidelines for premium users and provide you with the best support, please open a Support Ticket on our Help Desk.

    Once you’ve done that, please share the ticket number here, and I’ll coordinate with the team to investigate the issue further.

    @walkingpaper If you also have one of our premium plugins, please kindly open a Support Ticket on our Help Desk for further assistance.

    Thread Starter chrisathook

    (@chrisathook)

    hi, I Don’t have access yet to their account for the PRO plugin since I am currently volunteering consulting services for them. Once I do I will move into that area. as requested here are some of the queries

    SELECT SQL_CALC_FOUND_ROWS (npfo_tec_occurrences.occurrence_id + 10000000) as occurrence_id
    FROM npfo_posts INNER JOIN npfo_postmeta ON ( npfo_posts.ID = npfo_postmeta.post_id )
    JOIN npfo_tec_occurrences ON npfo_posts.ID = npfo_tec_occurrences.post_id
    WHERE 1=1 AND (
    CAST(npfo_tec_occurrences.end_date_utc AS DATETIME) < '2025-02-28 13:35:13'
    AND
    ( npfo_postmeta.meta_key = '_EventVenueID' AND npfo_postmeta.meta_value IN ('15137') )
    ) AND npfo_posts.post_type = 'tribe_events' AND ((npfo_posts.post_status = 'publish')) AND (npfo_posts.ID NOT IN (901,2314,18356,44753,45064,46621,47301,48353,48354,48355,48356,48357,48358,48360,48361,48362,48365,48465,48473,48559,48655,48994,49369,49414,49562,50880,51364,51563,51940,52823,53238,53630,53988,54526,54547,54718,54867,55023,55480,55553,55676,55917,56015,56138,69691,69744,69800,69863,69898,69940,69980,70911,71014,71059,71106,71171))
    GROUP BY npfo_tec_occurrences.occurrence_id
    ORDER BY npfo_tec_occurrences.start_date_utc DESC, npfo_tec_occurrences.duration DESC, npfo_posts.post_date DESC
    LIMIT 0, 51




    SELECT SQL_CALC_FOUND_ROWS (npfo_tec_occurrences.occurrence_id + 10000000) as occurrence_id
    FROM npfo_posts INNER JOIN npfo_postmeta ON ( npfo_posts.ID = npfo_postmeta.post_id )
    JOIN npfo_tec_occurrences ON npfo_posts.ID = npfo_tec_occurrences.post_id
    WHERE 1=1 AND (
    CAST(npfo_tec_occurrences.end_date_utc AS DATETIME) < '2025-02-28 13:35:33'
    AND
    ( npfo_postmeta.meta_key = '_EventVenueID' AND npfo_postmeta.meta_value IN ('1627') )
    ) AND npfo_posts.post_type = 'tribe_events' AND ((npfo_posts.post_status = 'publish')) AND (npfo_posts.ID NOT IN (901,2314,18356,44753,45064,46621,47301,48353,48354,48355,48356,48357,48358,48360,48361,48362,48365,48465,48473,48559,48655,48994,49369,49414,49562,50880,51364,51563,51940,52823,53238,53630,53988,54526,54547,54718,54867,55023,55480,55553,55676,55917,56015,56138,69691,69744,69800,69863,69898,69940,69980,70911,71014,71059,71106,71171))
    GROUP BY npfo_tec_occurrences.occurrence_id
    ORDER BY npfo_tec_occurrences.start_date_utc DESC, npfo_tec_occurrences.duration DESC, npfo_posts.post_date DESC
    LIMIT 0, 51

    SELECT SQL_CALC_FOUND_ROWS (npfo_tec_occurrences.occurrence_id + 10000000) as occurrence_id
    FROM npfo_posts INNER JOIN npfo_postmeta ON ( npfo_posts.ID = npfo_postmeta.post_id )
    JOIN npfo_tec_occurrences ON npfo_posts.ID = npfo_tec_occurrences.post_id
    WHERE 1=1 AND (
    CAST(npfo_tec_occurrences.end_date_utc AS DATETIME) < '2025-02-28 13:37:43'
    AND
    ( npfo_postmeta.meta_key = '_EventVenueID' AND npfo_postmeta.meta_value IN ('15637') )
    ) AND npfo_posts.post_type = 'tribe_events' AND ((npfo_posts.post_status = 'publish')) AND (npfo_posts.ID NOT IN (901,2314,18356,44753,45064,46621,47301,48353,48354,48355,48356,48357,48358,48360,48361,48362,48365,48465,48473,48559,48655,48994,49369,49414,49562,50880,51364,51563,51940,52823,53238,53630,53988,54526,54547,54718,54867,55023,55480,55553,55676,55917,56015,56138,69691,69744,69800,69863,69898,69940,69980,70911,71014,71059,71106,71171))
    GROUP BY npfo_tec_occurrences.occurrence_id
    ORDER BY npfo_tec_occurrences.start_date_utc DESC, npfo_tec_occurrences.duration DESC, npfo_posts.post_date DESC
    LIMIT 0, 51


    SELECT SQL_CALC_FOUND_ROWS (npfo_tec_occurrences.occurrence_id + 10000000) as occurrence_id
    FROM npfo_posts LEFT JOIN npfo_postmeta ON ( npfo_posts.ID = npfo_postmeta.post_id AND npfo_postmeta.meta_key = '_EventHideFromUpcoming' )
    JOIN npfo_tec_occurrences ON npfo_posts.ID = npfo_tec_occurrences.post_id
    WHERE 1=1 AND (
    CAST(npfo_tec_occurrences.start_date AS DATETIME) > '2021-11-26 11:00:00'
    AND
    npfo_postmeta.post_id IS NULL
    ) AND npfo_posts.post_type = 'tribe_events' AND ((npfo_posts.post_status = 'publish')) AND (npfo_tec_occurrences.occurrence_id NOT IN (89969))
    GROUP BY npfo_tec_occurrences.occurrence_id
    ORDER BY npfo_tec_occurrences.start_date_utc ASC, npfo_posts.post_date ASC
    LIMIT 0, 1
    Plugin Support tristan083

    (@tristan083)

    Hi @chrisathook ,

    Thank you for your message and the information.

    It looks like the tables relating to the queries in question are as follows: tec_occurrences, posts, and postmeta. Would you be able to provide the indexes (or index structure) of each of these tables?

    Plugin Support Darian

    (@d0153)

    Hi @chrisathook

    To confirm, do you have The Events Calendar PRO active on your WordPress site? If so, I recommend that you submit a Support Ticket?on our?Help Desk and mention the license key in your ticket so we can validate your client’s account. You can find the license key from WP-Admin > Events > Settings > Licenses page.

    If you don’t have one of our premium plugins, please check the Tristan’s response above.

    Looking forward to your reply.

    Plugin Support Darian

    (@d0153)

    Hi there,

    It appears that we haven’t heard back from you in a while, so I’ll assume that the matter has been resolved. If you need any more help, feel free to start a new thread and we’ll be happy to assist you.

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.