I'm particularly interested in large capital cities and trade ports/hubs in 11th and 12th century Europe, but references and comparisons to other pre-industrial regions and time periods would be great to hear about as well. I know for example that Ancient Rome and some Chinese cities neared or even passed 1 million citizens.
Any information on the problems (and solutions to those problems) cities growing to large sizes presented would also be great. I'm thinking sewage, drinking water, food supply etc.
I'm aware that there's probably a great deal of variety!
In my answer I'm gonna be mainly focusing on England, for which we have by far the best records for socio-economic of anywhere in Europe in the Central Middle Ages. In terms of area according to Alan Dyer's calculations in "The Cambridge Urban History of Britain: Volume One" (2000), there were 10 cities in England in 1066 with more than 60 acres (an acre is roughly the size of a modern football pitch) inside the walls, by far the biggest of which being London (Winchester was still officially the capital, but London was already setting national weights and measures and possessed its own special privileges and collective self-governing institutions like the cnihtas or city guild). The other 28 fortified towns significant enough to be worthy of royal burh status had less than 60 acres inside the walls. Population-wise, unfortunately the Domesday Book is less helpful than we might think since certain towns, such as London and Winchester, were exempted from the surveys that William the Conqueror commissioned in 1086, and Domesday demographic estimates always have to allow quite a significant margin for error given that Domesday only records heads of household and not their dependent family members. Still, according to David Carpenter, the Domesday Book seems to indicate to us that, London and Winchester exempted, only four other English towns had populations of 5,000 or more in 1086. On the basis of other data, London's population in 1086 has been estimated at 25,000. The next concrete data we get on its population is from the poll tax register of 1377 (every lay person over the age of 14 had to pay the tax), which suggests that London at that time had a population of 23,314, though this figure may well be excluding its suburbs and out parishes and obviously it has to account to for the terrible devastation wrought by famine and plague earlier in the century, which reduced its population by at least two thirds. Plenty of reliable estimates seem to place London's population as being 40,000 in 1200 and 100,000 in 1300 - see David Carpenter "The Struggle for Mastery, 1066 - 1284" which though mainly a politically focused survey history (reflecting the author's specialism) still gives a good overview of the development of the English economy in the first chapter. London was thus by far the biggest city in England at any point in the Middle Ages - in 1300, the second tier cities (Norwich, Bristol, York and Winchester) had over 10,000 inhabitants and another 20 cities had more than 5,000 inhabitants. At European level, London would have been placed slightly above the great Flemish (Bruges, Ghent, Ypres) and German cities (such as Cologne) and at roughly the same level as about 35 Italian cities North of Rome, including Florence, but below the biggest cities in Europe at that time, Paris at 225,000 persons and Milan at 200,000. The evidence is fragmentary and estimates always contain a significant margin for error, but its safe to say that the urban populations of England and Europe at large at least doubled between 1000 and 1300, with a huge degree of variation between different regions and individual cities. From a global perspective, any city in 11th - 13th century Latin Christendom would have been dwarfed by Constantinople (pre-1204 population is estimated to have been at 300,000), Cairo (about the same level as Constantinople), Merv (prior to the massacring of the inhabitants by Genghis Khan, this Khwarezmian city may have had as many as 500,000 inhabitants) or Hangzhou (the capital of the Song Dynasty and the largest city in the world in 1200 at 800,000), but since those cities were capitals of vast centralised empires they don't serve as easy points for comparison.