	public static function getSubcategories( $categoryName, $depth = 1 ) {
		$DB = wfGetDB( DB_REPLICA, 'dpl' );

		if ( $depth > 2 ) {
			//Hard constrain depth because lots of recursion is bad.
			$depth = 2;
		}
		$categories = [];
		$result = $DB->select(
			[ 'page', 'categorylinks' ],
			[ 'page_title' ],
			[
				'page_namespace'		=> intval( NS_CATEGORY ),
				'categorylinks.cl_to'	=> str_replace( ' ', '_', $categoryName )
			],
			__METHOD__,
			[ 'DISTINCT' ],
			[
				'categorylinks' => [
					'INNER JOIN',
					'page.page_id = categorylinks.cl_from'
				]
			]
		);
		while ( $row = $result->fetchRow() ) {
			$categories[] = $row['page_title'];
			if ( $depth > 1 ) {
				$categories = array_merge( $categories, self::getSubcategories( $row['page_title'], $depth - 1 ) );
			}
		}
		$categories = array_unique( $categories );
		$DB->freeResult( $result );
		return $categories;
	}
The software does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources.