In recent years, inexpensive memory has resulted in large router buffers installed in the Internet, leading to high queueing delay and delay variation. This phenomenon is recently termed “bufferbloat.” Active queue management (AQM) algorithms play an important role in combating bufferbloat, but none of them has been widely deployed due to complicated parameter tuning. Moreover, the parameters of AQM algorithms are usually fixed, making them difficult to adapt to changing network environments. In this paper, we propose a framework to adaptively and stably control queueing delay based on network conditions, so as to combat bufferbloat. Specifically, we use controlled delay (CoDel), a recently proposed AQM, in our framework. To the best of our knowledge, this is the first work that develops an analytical model for the CoDel system and derives necessary and sufficient conditions for its stability. Based on the stability analysis, we propose adaptive CoDel with interval tuning (ACoDel-IT) and adaptive CoDel with target and interval tuning (ACoDel-TIT) algorithms, to improve the system stability and performance by automatic parameter tuning. Extensive simulation results demonstrate that ACoDel-IT and ACoDel-TIT effectively stabilize queueing delay, whereas ACoDel-TIT further improves link utilization and reduces packet drops, compared to other representative AQM algorithms.