We develop a theory of ergodicity for unbounded functions : J -*• X, where J is a subsemigroup of a locally compact abelian group G and X is a Banach space. It is assumed that is continuous and dominated by a weight w denned on G. In particular, we establish total ergodicity for the orbits of an (unbounded) strongly continuous representation T : G ->• L(X) whose dual representation has no unitary point spectrum. Under additional conditions stability of the orbits follows. To study spectra of functions, we use Beurling algebras L^ (G) and obtain new characterizations of their maximal primary ideals, when w is non-quasianalytic, and of their minimal primary ideals, when w has polynomial growth. It follows that, relative to certain translation invariant function classes &', the reduced Beurling spectrum of is empty if and only if # € &. For the zero class, this is Wiener's tauberian theorem.2000 Mathematics subject classification: primary 46J20,43A60; secondary 47A35, 34K25, 28B05.