Clear the heap?

The code contains only one static "String", contains no mallocs(), and looks like pretty straighforward stuff (I didn't look hard for recursion, but there's no comments that mention "recur", and it seems unlikely based on the rest of the code.)

I can't speak for the libraries.

After 24-48 hours, it seems to hang.

Haven't there been other reports of the Ethernet Shield hanging after heavy use? "Seems to hang" is too ambigous a failure to immediately blame on "stack overflow", IMO. Start by adding some code to help track down exactly WHERE it is hanging...