Depends on the yeast and quantity of lees, as well as the recipe. A few yeasts are known for creating bad flavors if the wine is left on them, while others it's good to leave the wine on for a few months. Lavin 1122 is known for producing off flavors, while d47 adds a 'tropical' flavor.
Generally a skim of lees at the bottom is fine, but more than a 1/4 inch and you want to rack.