Microbial populations often rely on the cooperative production of extracellular ‘public goods’ molecules. The cooperative nature of public good production may lead to minimum viable population sizes, below which populations collapse. In addition, ‘cooperator’ public goods producing individuals face evolutionary competition from non-producing mutants, or ‘freeloaders’. Thus, public goods cooperators should be resilient not only to the invasion of freeloaders, but also to ecological perturbations that may push their populations below a sustainable threshold. Through a mathematical analysis of the Ecological Public Goods Game, we show that game parameters that improve the cooperating population's stability to freeloader invasion also lead to a low ecological resilience. Complex regulatory strategies mimicking those used by microbes in nature may allow cooperators to beat this trade-off and become evolutionarily stable to invading freeloaders while at the same time maximizing their ecological resilience. Our results thus identify the coupling between resilience to evolutionary and ecological challenges as a key factor for the long-term viability of public goods cooperators.