MPU6050 Arduino Hang after a while

I have a Arduino Nano(bootloader-UNO) with MPU6050/GY271/GPS that will continuously output(Serial.Print) data to the monitor. After 10 to 30 minutes, the Arduino stop responding/stop Serial.Print data.
For this issue, I also tried using WatchDog Timer to restart/reset but it doesn't help.

#include "TinyGPS++.h"
#include "SoftwareSerial.h"
#include "I2Cdev.h"
#if I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE
#include "Wire.h"
#endif
#include <avr/wdt.h>
#include "MPU6050_6Axis_MotionApps20.h"
#include <Adafruit_HMC5883_U.h>
#define OUTPUT_READABLE_YAWPITCHROLL
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#define OLED_RESET LED_BUILTIN
Adafruit_HMC5883_Unified mag = Adafruit_HMC5883_Unified(12345);
SoftwareSerial serial_connection(10, 11); //RX=pin 10, TX=pin 11
TinyGPSPlus gps;
#if I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE
#include "Wire.h"
#endif

MPU6050 mpu;
#define OUTPUT_READABLE_YAWPITCHROLL
bool blinkState = false;
bool dmpReady = false; // set true if DMP init was successful
uint8_t mpuIntStatus; // holds actual interrupt status byte from MPU
uint8_t devStatus; // return status after each device operation (0 =
success, !0 = error)
uint16_t packetSize; // expected DMP packet size (default is 42 bytes)
uint16_t fifoCount; // count of all bytes currently in FIFO
uint8_t fifoBuffer[64]; // FIFO storage buffer

// orientation/motion vars
Quaternion q; // [w, x, y, z] quaternion container
VectorInt16 aa; // [x, y, z] accel sensor measurements
VectorInt16 aaReal; // [x, y, z] gravity-free accel sensor
measurements
VectorInt16 aaWorld; // [x, y, z] world-frame accel sensor
measurements
VectorFloat gravity; // [x, y, z] gravity vector
float euler[3]; // [psi, theta, phi] Euler angle container
float ypr[3]; // [yaw, pitch, roll] yaw/pitch/roll container
and gravity vector
float headingDegrees;
// packet structure for InvenSense teapot demo
uint8_t teapotPacket[14] = { '$', 0x02, 0,0, 0,0, 0,0, 0,0, 0x00, 0x00,
'\r', '\n' };
double b,c;
int j, Done, COM0, COM1, COM2,com99;
byte i,first=0x4A, last=0xCA;
byte Readbytes [10];
byte byte0, byte1,byte2,byte3,byte4,byte5,byte6,byte7;
String repository = "/fridge/";

const int buttonPin = 2; // the number of the pushbutton pin
const int ledPin = 13; // the number of the LED pin
int buttonState = 0; // variable for reading the pushbutton
status

volatile bool mpuInterrupt = false; // indicates whether MPU
interrupt pin has gone high
void dmpDataReady() {
mpuInterrupt = true;
}

The Setup() Part

void setup() {
wdt_disable();

if(!mag.begin())

#if I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE
Wire.begin();
TWBR = 24; // 400kHz I2C clock (200kHz if CPU is 8MHz)
#elif I2CDEV_IMPLEMENTATION == I2CDEV_BUILTIN_FASTWIRE
Fastwire::setup(400, true);
#endif

Serial.begin(9600);

mpu.initialize();
devStatus = mpu.dmpInitialize();
mpu.setXGyroOffset(220);
mpu.setYGyroOffset(76);
mpu.setZGyroOffset(-85);
mpu.setZAccelOffset(1788);
if (devStatus == 0) {
mpu.setDMPEnabled(true);
attachInterrupt(0, dmpDataReady, RISING);
mpuIntStatus = mpu.getIntStatus();
dmpReady = true;
} else {
}
pinMode(ledPin, OUTPUT);
pinMode(buttonPin, INPUT);
wdt_enable(WDTO_1S);
}

The LOOP() Part

void loop() {

b= 1.310685; c =103.7785478;

COM1=1;

if (COM1==1) {
sensors_event_t event;
mag.getEvent(&event);
float heading = atan2(event.magnetic.y, event.magnetic.x);
float declinationAngle = 1.55;//0.22
heading += declinationAngle;
// Correct for when signs are reversed.
if(heading < 0)
heading += 2*PI;
//delay(100);

// Check for wrap due to addition of declination.
if(heading > 2PI)
heading -= 2
PI;
// Convert radians to degrees for readability.
headingDegrees = heading * 180/M_PI;

// join I2C bus (I2Cdev library doesn't do this automatically)

if (!dmpReady) return;

// wait for MPU interrupt or extra packet(s) available
while (!mpuInterrupt && fifoCount < packetSize ) {

// other program behavior stuff here
// .

// Serial.print(100);
// .
// .
// if you are really paranoid you can frequently test in between other
// stuff to see if mpuInterrupt is true, and if so, "break;" from the
// while() loop to immediately process the MPU data
// .
// .
// .
}

// reset interrupt flag and get INT_STATUS byte
mpuInterrupt = false;
mpuIntStatus = mpu.getIntStatus();

// get current FIFO count
fifoCount = mpu.getFIFOCount();

// check for overflow (this should never happen unless our code is too
inefficient)
if ((mpuIntStatus & 0x10) || fifoCount == 1024) {
// reset so we can continue cleanly
mpu.resetFIFO();
//delay(10);
//Serial.print("/1000000/");
//delay(10);
// Serial.println(F("FIFO overflow!"));

// otherwise, check for DMP data ready interrupt (this should happen
frequently)
}else if (mpuIntStatus & 0x02) {
// wait for correct available data length, should be a VERY short wait
while (fifoCount < packetSize) fifoCount = mpu.getFIFOCount();

// read a packet from FIFO
mpu.getFIFOBytes(fifoBuffer, packetSize);

// track FIFO count here in case there is > 1 packet available
// (this lets us immediately read more without waiting for an interrupt)
fifoCount -= packetSize;

// display Euler angles in degrees
mpu.dmpGetQuaternion(&q, fifoBuffer);
mpu.dmpGetGravity(&gravity, &q);
mpu.dmpGetYawPitchRoll(ypr, &q, &gravity);
mpu.resetFIFO();

Serial.print("&Sen1=");
ypr[1]=(ypr[1] * 180/M_PI)+90;
Serial.print(ypr[1]); //Pitch
Serial.print("&Sen2=");
ypr[2]=(ypr[2] * 180/M_PI)+90;
Serial.print(ypr[2]); //Pitch
Serial.print("&Sen3=");
Serial.print(ypr[0] * 180/M_PI);//yaw
Serial.print("&Sen4=");

Serial.print(headingDegrees);

Serial.print("&Sen5=");
Serial.print(b,6);
Serial.print("&Sen6=");
Serial.print(c,6);

wdt_reset();

delay(300); // a short delay
}}}

        COM1=1;

        if (COM1==1) {

That's dumb. About as dumb as not reading the stickies at the top of the forum, to learn how to post code properly. Snippets are NOT the way to post code.

    }}}

More dumb stuff. ONE curly brace per line.