Clogging is one of the main risks when slurry shield tunneling in the mixed ground condition containing clayey soils. Severe consequences, such as instability in the excavation face and high cutter wear, may occur if the shield machine operators don't take specific measures to eliminate clogging. Therefore, early warning of clogging during one ring excavation becomes essential for the safety of tunneling. The currently available methods to judge the clogging risks focus mainly on field engineer experience, which seems arbitrary sometimes. In this paper, an automatic self-updating machine learning approach is proposed to realize the real-time early warning of clogging. More specifically, the random forest is employed with several minutes (e.g. 2 min at the beginning of one ring excavation) of tunneling parameters as input. When one ring has been finished, it will become a new training sample to update the model via randomized parameter optimization. With the case study of Nanning metro line 1, it's found that the self-updating mechanism is beneficial for better judgment of clogging, and 4 minutes tunneling parameters (24 samples) are suitable for early warning. The model can achieve an accuracy of 95% in the mixed ground condition. Meanwhile, in comparison with the other machine learning approaches is also discussed. With the training data set updating mechanism, the RF model can use less tunneling data to realized the clogging prediction. According to the feature importance result, the variation of cutterhead torque is essential for clogging prediction.