I’m having an odd issue since we upgraded to RT 4.4.2 (which we only recently discovered).
We tend to use the Articles feature in 2 ways:
- For the drop down list with default e-mails.
- As a knowledge base with simple q&a.
When I go into Articles everything works as expected. I can see all topics, can browse all articles and searching works as expected. No delays, no weird behavior.
The issues we have however are coming from the comment/reply feature for Articles, where you can search for an Article when working on a comment/reply. The Articles feature allows you to do 3 things:
- Search for Articles matching the search criteria.
- Enter the Article ID.
- Select an Article from the drop down list
When using options 2 and 3 (enter ID or select from list) everything works. So far so good.
However, searching for an article results in extremely slow database queries which in turn result in timeout issues with mod_fcgid (default 40 seconds) and status 500 errors for that users current session. The odd thing is, the queries eventually give good results (it just takes extremely long).
This is an example of a query that will eventually time-out:
# Thread_id: 10 Schema: rt QC_hit: No
# Query_time: 110.475090 Lock_time: 0.000137 Rows_sent: 1 Rows_examined: 43
SELECT DISTINCT main.* FROM Articles main JOIN ObjectClasses ObjectClasses_2 ON ( ObjectClasses_2.Class = main.Class ) JOIN ObjectCustomFieldValues ObjectCustomFieldValues_1 ON ( ObjectCustomFieldValues_1.Disabled = '0' ) AND ( ObjectCustomFieldValues_1.ObjectId = main.id ) WHERE (ObjectCustomFieldValues_1.LargeContent LIKE '%agenda%' OR ObjectCustomFieldValues_1.Content LIKE '%agenda%') AND (main.Disabled = '0') AND ( ( ObjectClasses_2.ObjectId = '3' AND ObjectClasses_2.ObjectType = 'RT::Queue' ) OR ( ObjectClasses_2.ObjectId = '0' AND ObjectClasses_2.ObjectType = 'RT::System' ) ) ORDER BY main.SortOrder ASC, main.Name ASC;
The queries eventuelly give good results, but to receive those on the user end I need to increase the time-out of mod_fcgid. The fcgid timeout results in an error on the apache end of the spectrum, resulting in a status 500 error for the user.
However, waiting 120 seconds (or even longer sometimes) is unacceptable. Especially since the same query for a word / sentence from the Articles menu is nearly instant.
So either the query is wrong, or the feature in comment/reply is broken, or my database does something weird, or my settings are wrong, or ???
I’m at a loss to where to look for a solution for this issue. I’ve ran the rt-validator, it finds a bunch of references to articles that don’t exist anymore. I’m trying to resolve these atm, though I doubt that’s the issue (these non-existing articles are just old / deleted articles).
Has anyone seen this issue on their own installation? (might be a bug?) If not, I’m all open for ideas on how to troubleshoot this issue.
Thanks in advance!