It depends on the pressure supplied by the compressor, which at times is insufficient, being it unable to get over the minimum required operating pressure threshold.
As the air consumption by the gun is quite high, it may happen that, although gun operation was regular when the compressor was at full load, after just a few turns the gun doesn’t function anymore due to pressure drop in the compressor (it has gone under such threshold). This situation is typical when the compressor is of limited capacity.
The only way for restoring gun operation is recharging the compressor.
Obviously, a new compressor with adequate capacity would be the appropriate solution.