The above cap seems fine and measures within spec but the appliance it's set into does not function correctly. In this case it was an RF socket from Aldi operating on 433Mhz. The LED would turn on but the load wouldn't. There was only a small click from the relay. From a set of 4 pieces, 3 have failed in the same way.
Sometimes, switching to a lighter (LED bulb) or heavier (washing machine) load would make the problem go away for a few weeks or even months.
A [Philips] Senseo Coffee machine failed to turn on - the red light would turn on for less than a second and then switch itself off.
A Philips drip coffee maker would turn on initially but turn itself off when starting to heat the water.
The common issue in all these cases was the X2 cap, replacing it cured the problem. So if you have the above symptoms just try swapping the capacitor with a new one and see if it fixes the issue. If you would like to understand why, read on.
The X2 caps are designed with fail-to-safety in mind. That is, the capacitor becomes open and loses its capacity. The Wikipedia article has some other interesting information:
Capacitors, including film types, designed for continuous operation at low-frequency (50 or 60 Hz) mains voltage, typically between live and neutral or live and ground for interference suppression, are required to meet standard safety ratings; e.g., X2 is designed to operate between line and neutral at 200-240 VAC, and Y2 between live and ground. These types are designed for reliability, and, in case of failure, to fail safely (open-, rather than short-circuit). A non-catastrophic failure mode in this application is due to the corona effect: the air enclosed in the winding element becomes ionized and consequently more conductive, allowing partial discharges on the metallized surface of the film, which causes local vaporization of the metallization. This occurs repeatedly, and can cause significant loss of capacitance (C-decay) over one or two years. International standard IEC60384-14 specifies a limit of 10% C-decay per 1,000 test hours (41 days of permanent connection).
Using the datasheet for the MPX275-X2 part above the manufacturer quotes <5% C-decay over 21 days while also referencing the aforementioned IEC384-14 standard.
First issue: we don't know how much "<5%" means. Is it 0.1% or 4.9%?
Second issue is that this failure mode might be self-accelerating as the small holes punctured in the film would make coronal discharges through the same film easier. See also this video from bigclivedotcom.
The third issue is that we don't know if the manufacturer of the device has taken into account that the discharges that are going through the capacitor, caused by disconnecting inductive loads (relays, heating coils) can shorten the life of the part.
Live with it.
Such is the nature of stuff that everything is consumable at this point and replacing a part (10-30 minutes) would cost more than the device itself. The X2 capacitors sold on Amazon and eBay cost from 1USD to 5EUR, delivered, while from an electronics store they might cost 20-50c when buying <100 parts. Then you have to factor also your time and the risks.
Given that you have enough time to spare and [free/cheap] parts at hand that's the most ecological way of doing it. Keep a device away from the landfill for another year or two.
Most devices have a footprint for a larger capacitor, but they choose to install a smaller one at the factory, for cost reasons.
Analyze what loads might cause discharge through the capacitor and install snubbers or protection diodes on them, if possible.
Since this article was supposed to be about an RF socket, here's the bottom side of the board inside the Aldi-branded one:
...and I almost forgot about the coffee maker: