As long as you can sell the stock, I would buy as much as I can.
That being said, I'm sure there are limits.
I contribute 10% of my pay every two weeks. Twice a year I get the shares at a 15% discount.
So my rate of return is 15% each time, and since the funds are accumulated over a 6-month period, on average they are only held 3 months.
That would make the return 1.15 ^ 4 - 1 = 74.9%
However it's not quite that lucrative. State and federal taxes are about 23%, reducing the return to 74.9 x 0.77 = 57.6%
It's also a bit worse than that because (1) a tiny amount sits dormant since I can't purchase fractional shares, (2) they charge a small fee for the stock sale, and (3) my money spends about a week in transit as the stock is sold and the check is mailed and deposited. Still, who wouldn't max out what is basically the easiest 50% rate of return ever? And if you sell immediately there is virtually zero risk.