A possible fix ...
I have also recently experienced these intermittent relay response timeouts. Sometimes it works fine and other times the customer receives the script timed out message. I also checked our server access logs and found that there is no record of any attempt by the authorize.net server to retrieve the response page. The web server error log does not show any errors. When I put the URL of the response page in a browser, the page is displayed quickly and correctly, and there is an entry in the server access log that indicates that the page was retrieved. I also have the correct URL in the list of relay response URL's on the authorize.net settings page. Since the relay response works fine some of the time, I believe I have all the correct settings in place.
I have also observed that the script timeout error occurs when there has been no online payment for an extended period of time (approximately 1 hour). If online payments occur fairly often, then they all seem to work fine.
I may have found a fix for this issue. Since it appears that the authorize.net server does not even try to access the response URL in all of the cases where the script timeout occurs, I thought maybe it is a DNS lookup timeout on the authorize.net end that is causing the problem. The time-to-live setting for the response URL domain was set at 1 hour. Yesterday, I changed this to 1 week, and have not been able to generate a script timeout error since then. That's not a very long test period, but I was always able to generate the timeout error if I waited one or two hours between tests previously . I'll keep checking on it for a few days and see if it continues to work properly. If this is in fact the solution, I don't know why the authorize.net server seems to have trouble doing a DNS lookup on our site. I've never noticed any delay when I do a lookup.