We are using domain.select() method, that boto provides, to query SimpleDB. For smaller queries(queries involving couple of hours of data), this method works fine. But when I start using multiple threads and longer queries(24 hours of data), it starts timing out, giving following error on stdout:
-------------------------
4 0 8
...
<?xml version="1.0"?>
<Response><Errors><Error><Code>QueryTimeout</Code><Message>A timeout occurred when attempting to query domain 'd110824' with query expression 'select * from `d110824` where `timestamp` >= '2011-08-24T10:45:56' and `timestamp` < '2011-08-25T10:45:56' and `identifier` = '00063F052C49' order by `timestamp` asc </Message><BoxUsage>0.0055590278</BoxUsage></Error></Errors><RequestID>....</RequestID></Response>
I want to implement a retry mechanism (exponential backoff), when this error is encountered. Boto doesn't throw any exception for this error and simply prints it. To implement a retry mechanism, I need some kind of error code or exception to know that the error has occurred.
Any thoughts on how to achieve this in boto?