What are the penalties for being over the vassal limit?
I have 29 landed vassals when my limit is 22, but there doesn't seem to be an opinion or tax penalty like there is for too many duchies or too big of a demense. I've also noticed that the HRE Kaiser is always way over his vassal limit.
Note: this answer is current for game version 2.4.2.
The vassal limit tooltip from the top-right of the screen says the following:
Your vassal limit indicates how many direct vassals you can have at count tier or higher, excluding nomad clans. Having too many direct vassals will negatively affect the amount of taxes and levies you get from vassas, and you might lose the grip of your vassals upon death.
The over vassal limit warning – the notification that pops up in the center, if you haven't disabled it – says the following:
You have M/N vassals, give you less taxes and levies from your vassals. You risk losing vassals if your character dies.
You can see the impact of the penalty in the summary screen for levies or taxes by hovering over the per-vassal contribution. On the military tab, this is the green and red bar on the right hand side.
As you can see, my vassal duke has his troop contribution penalized by 5% for being over my vassal limit by 1. All of my count tier and higher vassals have this penalty applied, but I didn't think to look for a sub-county level vassal. I also didn't look at the taxes, but I assume it's also 5% per vassal. If you don't have a feudal tax law enacted, this might not matter as 0 less 5% is still 0. If it does apply to sub-county vassals this is much more of a problem, as city taxes typically provide the bulk of an income.
If you go over your vassal limit by 20, you're down to zero taxes and levies from vassals, left to finance and defend your entire realm with only your direct demesne. I've seen this happen to AI's when they win a holy war (rather, all of Christendom wins a holy war for them) and wind up with a spare kingdom, which is why the game gives you a little bit of leeway before applying opinion and tax penalties.
It's also worth reiterating that only Count-level and above vassals count towards the vassal limit. That means mayors, bishops and barons from your personally held demesne counties don't count towards the limit itself. However, if you grant any counties to a mayor or a bishop, you wind up with count-level vassals who you are depending upon for taxes, so the penalty may be more severe.
EDIT by asker: I'm not sure if being over the vassal limit caused it, but when one of my vassals died, his heir was no longer my vassal. That is, it seems like you lose the extra vassals when they die, not when you die – so whichever vassals die first are the ones you lose probably.