Upvote:5
The passport expiring is not a problem in itself. The 3 month validity rule applies only at point of entry, so you can stay freely as long as the passport remains valid. Even if the passport expires, your wife can get a new one or possibly even fly back to your home country with an expired one (although this can be a hassle, so I don't recommend it).
What is a problem, though, is that Schengen has a 90-day rule: as a visitor you're not allowed to spend more than 90 days in any given 180-day period within Schengen. Your wife would exceed that if she stays there for longer than 3 months, and visa extensions are generally impossible without very strong reasons (eg. being hospitalized).