Database disk image is malformed error

Whenever i try to create a subdomain, i get the following error:

Cpanel::Exception::Database::Error/(XID 7yezck) Database /var/cpanel/bandwidth/XXXX.sqlite Error: database disk image is malformed at /usr/local/cpanel/Cpanel/Exception/CORE.pm line 77. Cpanel::Exception::create("Database::Error", Cpanel::ExceptionMessage::Raw=SCALAR(0x3b887d0), HASH(0x3b87d80)) called at /usr/local/cpanel/Cpanel/Exception/CORE.pm line 94 Cpanel::Exception::create_raw("Database::Error", "Database /var/cpanel/bandwidth/XXXX.sqlite Error: da"..., HASH(0x3b87d80)) called at /usr/local/cpanel/Cpanel/Exception.pm line 30 Cpanel::Exception::__ANON__(__CPANEL_HIDDEN__, __CPANEL_HIDDEN__..., HASH(0x3b87d80)) called at /usr/local/cpanel/Cpanel/DBI.pm line 193 Cpanel::DBI::_create_exception(Cpanel::DBI::SQLite::db=HASH(0x3b708d0), "DBD::SQLite::db selectrow_array failed: database disk image i"..., undef) called at /usr/local/cpanel/Cpanel/DBI.pm line 178 Cpanel::DBI::_error_handler("DBD::SQLite::db selectrow_array failed: database disk image i"..., Cpanel::DBI::SQLite::db=HASH(0x3b708d0), undef) called at /usr/local/cpanel/Cpanel/BandwidthDB/Base.pm line 110 Cpanel::BandwidthDB::Base::_get_schema_version(Cpanel::BandwidthDB::Write=HASH(0x3af0e90)) called at /usr/local/cpanel/Cpanel/BandwidthDB/Read.pm line 99 Cpanel::BandwidthDB::Read::_check_for_outdated_schema(Cpanel::BandwidthDB::Write=HASH(0x3af0e90)) called at /usr/local/cpanel/Cpanel/BandwidthDB/Read.pm line 88 Cpanel::BandwidthDB::Read::new("Cpanel::BandwidthDB::Write", "XXXX") called at /usr/local/cpanel/Cpanel/BandwidthDB/Write.pm line 43 Cpanel::BandwidthDB::Write::new("Cpanel::BandwidthDB::Write", "XXXX") called at /usr/local/cpanel/Cpanel/BandwidthDB.pm line 197 Cpanel::BandwidthDB::__ANON__() called at /usr/local/cpanel/3rdparty/perl/524/lib64/perl5/cpanel_lib/Try/Tiny.pm line 101 eval {...} called at /usr/local/cpanel/3rdparty/perl/524/lib64/perl5/cpanel_lib/Try/Tiny.pm line 92 Try::Tiny::try(CODE(0x3af39d0), Try::Tiny::Catch=REF(0x3aeece8)) called at /usr/local/cpanel/Cpanel/BandwidthDB.pm line 210 Cpanel::BandwidthDB::_try_to_create_instance("Cpanel::BandwidthDB::Write", "XXXX") called at /usr/local/cpanel/Cpanel/BandwidthDB.pm line 221 Cpanel::BandwidthDB::__ANON__() called at /usr/local/cpanel/3rdparty/perl/524/lib64/perl5/cpanel_lib/Try/Tiny.pm line 101 eval {...} called at /usr/local/cpanel/3rdparty/perl/524/lib64/perl5/cpanel_lib/Try/Tiny.pm line 92 Try::Tiny::try(CODE(0x3af33d0), Try::Tiny::Catch=REF(0x3ae9240)) called at /usr/local/cpanel/Cpanel/BandwidthDB.pm line 234 Cpanel::BandwidthDB::_try_to_create_instance_with_schema_update("Cpanel::BandwidthDB::Write", "XXXX") called at /usr/local/cpanel/Cpanel/BandwidthDB.pm line 181 Cpanel::BandwidthDB::_instantiate_for_root(__CPANEL_HIDDEN__, __CPANEL_HIDDEN__) called at /usr/local/cpanel/Cpanel/BandwidthDB.pm line 104 Cpanel::BandwidthDB::get_writer("XXXX") called at /usr/local/cpanel/Cpanel/Sub.pm line 233 Cpanel::Sub::addsubdomain(__CPANEL_HIDDEN__, 0, __CPANEL_HIDDEN__, 0, __CPANEL_HIDDEN__, __CPANEL_HIDDEN__, __CPANEL_HIDDEN__, __CPANEL_HIDDEN__, ...) called at bin/admin/Cpanel/domain.pl line 198 main::__ANON__() called at /usr/local/cpanel/3rdparty/perl/524/lib64/perl5/cpanel_lib/Try/Tiny.pm line 97 eval {...} called at /usr/local/cpanel/3rdparty/perl/524/lib64/perl5/cpanel_lib/Try/Tiny.pm line 92 Try::Tiny::try(CODE(0x3a7bf68), Try::Tiny::Catch=REF(0x1aa6010)) called at bin/admin/Cpanel/domain.pl line 211

Move the corrupted SQLlite database:

mv /var/cpanel/bandwidth/zadmin.sqlite{,.OFF}

Run the cPanel bandwidthdb regenerate scripts in background:

/scripts/build_bandwidthdb_root_cache_in_background

Then, the scripts is finished, run again:

/scripts/build_bandwidthdb_root_cache