Help! Can't publish

When I go to publish my page I get an error message-

Couldn’t complete the operation because there was not enough stack space.

I know this has to do with ram.
But the thing is I can preview my page in flash.
The size of the file is 2.9 M- really not that big.
I’m running OSX with 768 ram

Can anyone help me with this one.
There has to be a work around or maybe I’m just doing something wrong

Thanks for your time and help in advance