The debug flag should be set to false in web.config, unless you actually need to debug the application.
Running in debug mode can increase the memory usage somewhat, but it's not likely case as severe problems as you are talking about. However, you should set it to false to elliminate the effect that it has, and see if you can notice any improvement.
When run in debug mode, the garbage collection works differently. The life time of variables is expanded from it's actual usage to the scope of the variable (to be able to show the value in the debugger). This makes some objects live longer before they are garbage collected.
The compiler doesn't optimize the code when compiling in debug mode, and also some extra nop
instructions are added so that each code line has at least one instruction where a break point can be placed.
Throwing an exception takes considerably longer in debug mode. (However, normally the code should not throw exceptions that often.)