what would make a pear tree look healthy but stop producing fruit
Do you have a second pollinator tree planted?
Lack of cold chilling hours can also be a reason for lack of fruit.
Trees that are stressed or diseased will also not produce.
Here are some articles that will help you pinpoint the issues.