>Doing star trails set for 30 second exposure with 20 second gap in between exposures and >set for 450 exposures. tried this twice and the camera stopped at 179 exposures the first time and 129 the second. snipped > Could it have something to do with the sensor given the continuous long exposures? It could be the sensor temperature - I would ask Nikon. A 30 second exposure generates a lot of sensor heat. Liveview and video recording is limited to about 20 minutes to prevent overheating. If the overheating is temperature rather than time controlled a temperature cut out could be operating. You could experiment with 15 second exposures and 40 second gaps. If you get a lot more shots shooting this way the issue is likely connected to sensor temperature. Digressing the reason for suggesting asking Nikon is what you are doing is very unusual - and may be something Nikon did not think to try when testing the camera.
Photography is a bit like archery. A technically better camera, lens or arrow may not hit the target as often as it could if the photographer or archer does not practice enough.