Today, I had to kill this script in mwmaint:
ladsgroup@mwmaint1002:~$ ps aux | grep -i commonswiki ladsgro+ redacted 0.0 0.0 6048 888 pts/0 S+ 06:23 0:00 grep -i commonswiki cparle redacted 0.0 0.0 6776 3416 pts/10 S+ Nov24 0:00 /bin/bash /usr/local/bin/mwscript extensions/MachineVision/maintenance/fetchSuggestions.php --wiki=commonswiki --filelist=/home/cparle/mvlist.2M.txt --priority=0 root redacted 0.0 0.0 10196 3968 pts/10 S+ Nov24 0:00 sudo -u www-data php /srv/mediawiki-staging/multiversion/MWScript.php extensions/MachineVision/maintenance/fetchSuggestions.php --wiki=commonswiki --filelist=/home/cparle/mvlist.2M.txt --priority=0 www-data redacted 1.9 0.1 277824 126012 pts/10 S+ Nov24 50:40 php /srv/mediawiki-staging/multiversion/MWScript.php extensions/MachineVision/maintenance/fetchSuggestions.php --wiki=commonswiki --filelist=/home/cparle/mvlist.2M.txt --priority=0
because it was making connection to db1160 which got depooled nine hours earlier (and it was the only script doing this). Usually killing the connection works and the script makes connection to the another db but in here it kept creating new connection to the depooled db.
This basically blocks us from doing maintenance (sometimes urgent maintenance) on databases. Please fix this.