Cacti uses for its web interface persistent mysql connections to the mysql server. Normally this is fine and you would not care about it, but if you want to disable this and make cacti use regular mysql connections (and properly close each of its open mysql calls) here is what you need to do:
edit: lib/database.php and replace PConnect with Connect
Again, this is just for the web interface and if you don’t have any problems or particular reasons to change this, it is better to leave it as it is. For example I had to do this on a server where mysql had problems with persistent connections as those were affecting the proper functionality of the site.