Before starting any upgrade on ANY building, be sure to have 3x the required resources in your warehouse.