PhaserBait: The problem is with GOODS, not commodities. I think I got terms confused between CNW and Colonization.
The last couple posters are on the right track, but the specific formulas posted are incorrect and one important detail is missing.
"Mysterious" failures to produce goods are almost always caused by crops shortages. People will eat the crops before they use them to produce goods, and people eat
before the crops are harvested, so if you have 150 crops on hand and a population of 15000 people, there will be
zero crops left for goods production. When currently on-hand crops are near the level required to feed a colony, goods production will sporadically start and stop as food becomes available. You may be suffering from minor starvation too, make sure that each colony has crops = (population/100) + (commerce building levels) + 1. (The +1 is because food consumption is rounded up: 101 people eat 2 crops.)
Commerce buildings consume 1 each of wood, metal, and crops
per level of the commerce building. The output of the commerce buildings are 1, 3, 7, and 12 goods, which results in a cost of goods that varies from 3 basic resources to one good to 12 basic resources for 12 goods.
In my experience, commerce buildings are the last buildings to suffer from population shortages. I don't know if this is because they are excepted from that limitation or because they employ fewer workers (the largest employers are the first hit by personnel shortages) -- the only way to tell for sure would be to build a colony that was almost entirely commerce buildings, import a large surplus of wood, metal, & crops, then destroy most of the houses or build lots of settlers to decrease the population and see what happens to goods production.