The population was 27,000 people in 1841 . This was because the docks were becoming much more used . With the coming of the railway in 1839 and the development of the docks , Southampton grew from a population of 27,000 in 1841 to 42,000 in 1861 .