Mega and Mac avrdue: stk500v2_ReceiveMessage(): timeout error

I am using Arduino 1.6.7 on Mac OS X. Each day, I get requests to update the board and libraries many times. For the past few days, I have been getting avrdude sometimes. However, by unplugging and plugging the usb cable, I could fix the problem. Today, I keep getting the same problem over and over again. Know how to fix it?

ketch uses 26,186 bytes (10%) of program storage space. Maximum is 253,952 bytes.
Global variables use 2,185 bytes (26%) of dynamic memory, leaving 6,007 bytes for local variables. Maximum is 8,192 bytes.
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer

newto_arduino:
Each day, I get requests to update the board and libraries many times.

This is unrelated to your issue. You can avoid future notifications by updating all updatable libraries and boards or disable notifications by unchecking File > Preferences > Check for updates on startup.

newto_arduino:
by unplugging and plugging the usb cable, I could fix the problem.

Maybe it's a bad connection. Try using a different USB cable. It also could be a bad USB jack or connection on the Arduino.

Thanks. Today, I plugged in a new shield physically. Haven't done anything in regard to the software. This problem happened over and over. I removed this new shield and the avrdue problem is gone. Don't know if the new shield is the real cause. Any explanation on this? Including the new shield, I only have two shields. I use the 5V and 3V on the arduino to provide power to sensors. Do plugging in too many things cause such avrdue error?

If the shield uses the serial lines then that could interfere with the serial upload of sketches using avrdude. If so you would need to remove the shield whenever you upload a sketch and then reattach the shield.

Good idea. Thanks.