"So, let me get this straight. It is DH's script that causing problems."
Well that is probably not correct, at least not the way you say it. If you are going to get a conversation with DH going about this, please try to be as accurate as you can. DH's script is probably not itself causing problems. It is, apparently, detecting excessive memory usage by your application.
What is causing the problem is whatever is making your application apparently consume excessive memory.
It may well not be a problem with your application (but it may be). There could be something seriously wrong in the server which makes it seem as though your application is consuming excessive memory. The situation with several Dreamhost servers is so fragile and confused that anything seems possible at this point. I currently have two websites running slow (by which I mean more than 30 secs to respond to a simple php call 'hello world') on two different IP numbers. One of those websites has been consistently slow since June 26th (and I'm letting it stay like that because it's not an important website). The other one sporadically goes slow and then apparently spontaneously recovers after a few hours, only to relapse again a few days later. Occasionally a third website (on yet another IP number) goes slow, but less frequently.
To get a sense of proportion, that is 3 websites out of 25. It used to be 3 out of 50, until I started gradually moving websites away from Dreamhost. I'm wondering whether Dreamhost will get a handle on these problems before or after my number of websites here goes down to 0.
I would still like to be a Dreamhost customer. The forum here is quite lively. The forum at my other host is very workmanlike, questions are answered quickly and accurately (even on weekends), but it is frankly a bit boring.