I believe the question is related to the ruby implementation of AM (correct me, if I'm wrong, please).
ActiveMerchant ActiveMerchant::ConnectionError, ( ). . :.
begin
rescue ActiveMerchant::ConnectionError => e
end
, open_timeout read_timeout ( ), SagePay:
ActiveMerchant::SagePay.open_timeout = 5 # timeout for opening the connection is set to 5 seconds
ActiveMerchant::SagePay.read_timeout = 10 # timeout for reading from opened connection is set to 10