Record heatwave endangers millions