A LOT of thought has gone into the question of how to build space stations and use rotation to provide simulated gravity.
Space Station built from Shuttle External Tanks

I don't see anything wrong with prior answers but thought I'd add my $0.02.
Minimum size constraint
It turns out that any rotation speeds >= 3 rpm makes people motion sick. For design purposes, designers felt a maximum rotation speed of 2 rpm would ensure very few people would suffer motion sickness. Scientists felt that most people could acclimate to a rotation of 10 rpm but I think I'd reserve such a design to mission specific applications (e.g. a small military ship crew).
So the minimum size of your cylinder is constrained by human physiology.
Maximum size constraint
As many others have pointed out, the maximum size of the station is constrained by the tensile strength of the construction materials.
I don't feel like doing the math and others have commented on it so just use their numbers.
More information
The most excellent Atomic Rockets web site has a vast store of useful information for world builders. Even better, it has a whole (& very large) page devoted to Space Stations.
For people looking for math, numbers, and other reference materials - including actual design studies for rotating stations (as well as other issues that might arise), run to the web site and be prepared to spend a couple of weeks reading.