  The temperature dependence of the phonon spectrum in the superconducting
transition metal dichalcogenide 2H-NbS$_2$ is measured by diffuse and inelastic
x-ray scattering. A deep, wide and strongly temperature dependent softening, of
the two lowest energy longitudinal phonons bands, appears along the
$\mathrm{\Gamma M}$ symmetry line in reciprocal space. In sharp contrast to the
iso-electronic compounds 2H-NbSe$_2$, the soft phonons energies are finite,
even at very low temperature, and no charge density wave instability occurs, in
disagreement with harmonic ab-initio calculations. We show that 2H-NbS$_2$ is
at the verge of the charge density wave transition and its occurrence is only
suppressed by the large anharmonic effects. Moreover, the anharmonicity and the
electron phonon coupling both show a strong in-plane anisotropy.
