The sync error is a common issue that doesn't have one simple solution (as shown herehere)
It means that the computer can't communicate with the processor, but it recognizes that it's there (out of sync). This is probably due to something (a peripheral, stray wire) interfering with the transmission from computer to device.
Solutions that have worked in the past:
- Unplugging the Arduino for 30 seconds, then plugging it back in.
- Removing any wires connected to Rx and Tx pins during upload.
- Soldering components connected to Rx or Tx to the board (in this case, I was using a shield that allowed me to do this)
There are lots of solutions available from different sources on the internet, but I have not come across one that names program size as the reason.