The stack overflow might be a problem of too deep recursion, you might have a problem with a function calling itself recursively too many times, e.g. missing exit condition. In that case there's no point in increasing stack size, it will run out sooner or later anyway.