Huge MySQL slave replication lag (days) at almost idle servers. Slave is mostly 'Waiting for dependent transaction to commit'
Check these two server parameters (my.cnf):


slave_pending_jobs_size_max should be same or more than the value of max_allowed_packet
https://dev.mysql.com/doc/refman/8.0/en/replication-options-slave.html#sysvar_slave_pending_jobs_size_max
slave_transaction_retries value should be twice of slave_parallel_workers.