If it's an intermittent issue it could be an issue with the contacts between the lens and the camera body, it happened to me once a while ago with my old 28-135 and still does occasionally with the 24-70mm.

Try giving the contacts a clean with a soft cloth to remove any grime or corrosion and see if that helps.

Ben