Really, you don't need much RAM on a properly configured server. On the other hand, if it's not properly configured, you will need a lot just because apache/php will be using crazy RAM.
The RAM needed to make a thumbnail is very minimal. If your server has a lot of free RAM, it's probably something to do with the way your server is set up. Is this a clean Debian install?