Rt command-line generating "Internal Server Error (500)

When I try to use the rt command-line tool I get the above error. Here’s an example:

rt> ls
Query:Status!='resolved' and Status!='rejected'
   Password will be sent to rt.kotui.org.nz over SSL
   Press CTRL-C now if you do not want to continue
rt: Server error: Internal Server Error (500)

When I check ssl_access_log, the following line corresponds:

[16/Aug/2017:12:21:47 +1200] [my IP address] TLSv1.2 ECDHE-RSA-AES256-SHA "POST /REST/1.0/search/ticket HTTP/1.1" 527

Error Code 527 implies a timeout error; I know I can reach the server (since there’s an entry in the access_log).

The only other clue I have is ssl_error_log:

[Wed Aug 16 13:31:08.635298 2017] [fcgid:warn] [pid 27859] [client myip:47268] mod_fcgid: read data timeout in 40 seconds
[Wed Aug 16 13:31:08.635361 2017] [core:error] [pid 27859] [client myip:47268] End of script output before headers: rt-server.fcgi

Does anyone have any suggestions for what to look for/fix here?

I hate to bump my own thread but I’m still stumped at this stage. Any pointers at what I might next do to troubleshoot this would be appreciated.

[INDENT]IPCCommTimeout 900[/INDENT]

worked for me.
I know the ticket is old but for others this may be usefull.