Hi,
 
   If you can provide your code it would be more helpful.  But i can tell some cases where you will get that error.
 
1. Check if you are using any infinity  loop where you are trying to increment or assign some values inside for loop.
2. It may also occur when you are incorrectly using recurresive functions. 
3. If you try to maintain huge volume of data in terms of objects.