We consider a one-dimensional integral inequality of Moser type: set Jc(v)=∫01ec(s)v2(s)dsand considersup{∫01|v′|2=1,v(0)=0}Jc(v)We show that the supremum remains finite up to the optimal coefficient c1(s)=1s(loges+logloges). Indeed, for cγ=1s(loges+γlogloges), with γ> 1 , the supremum is infinite. For c1 the inequality is critical with loss of compactness: the functional Jc1 fails to be weakly continuous along the infinitesimal Moser sequence wn(t):=tn(0≤t≤1n)wn(t)=1n(1n≤t≤1). Since w′(t)=n(0≤t≤1n), one may say that wn develops an infinitesimal shock at the origin.