I am connecting through a Python script to capture Bitcoin transactions to display them on a web page. I start Bitcoind and then the Python script. The script grabs the transactions and put them in a database. It all seems to work for a time but Bitcoind keeps disconnecting the connection started by the python script. If I stop everything and delete addr.dat (or peers.dat for version 0.7.2) then it all starts working again for a short time until the disconnects start again.
In that case, your python script isn't right. The client will disconnect a node once it realizes it isn't working right. It can take a few minutes for your script to trigger the bogus node detection. Out of curiosity, is your script generating a random nonce for the address message, or is it repeating what it sees?