For past few month we are facing this below issue.
Allowed memory size of 3145728000 bytes exhausted (tried to allocate 4096 bytes)
WordPress core
File: /wp-admin/class-wp-term.php
Line: 184
Allowed memory size of 3145728000 bytes exhausted (tried to allocate 20480 bytes)
WordPress core
File: /wp-admin/class-wp-term-query.php
Line: 1133
We are large database we do have more terms but we repair/optimized the table constantly and removed unwanted things. But still we are facing this issue.
Hello. Thank you for contacting the Toolset support.
I'm not sure if Toolset involved here as it seems you have too many terms available and due to that you see the error you shared.
Where do you see the error you shared - is it in the backend or on frontend?
Can you please share problem URL and admin access details.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.
I checked and I found that with the Grant post type you almost have twenty-four to twentry-six taxonomies assigned and that is a lot of content and if you may test without Toolset you may experince the same.
Regarding the screenshot you shared for the slow query, the first slow query is from WordPress code and that is becuase you have too many taxonnomies and second slow query belongs to "Plugin: wordpress-seo" we can not do much here due to the structure you have.
I've seen with few taxonomies you have only three or four terms added. There is a change to improve there but that will result is change of structure. Converthing such taxonomies where you have few terms to custom field.