I tried several setups for the memory requirements. I understand that I have a very limited resources which might keep the application to run for so long (hours), yet the application fails at the same point mentioned earlier.
I made the tilesize 5 and sometimes smaller with no luck.