Ethernet app stopping after about 30mins ish

My app just seems to stop responding after half an hour or so.

I put in a few writes of what it was doing to the serial connection and ran it for about an hour and it didn't crash! As soon as I run it again standalone it starts crashing.

I've got a single socket connection that receives an occasional string back from the server to control either a blinkm led or move a motor back and forth.

I'm using the official wiznet ethernet shield and Duemilanove board. I suspect that there's some hiccup in the connection and it's not managing to reconnect again, or it could be a memory issue, or perhaps a power issue? (I'm using the supplied starter kit power adaptor)

As this is my first post the forum won't let me link to my code, will try in a reply...

My code.

http://www.ts0.com/orbexample.txt