No matter if I buy my ricotta by weight or by package it goes bad (funky smell, the puddle of cheese water gets grainy, some yellow tint on the sides of the cheese, losing its mellow sweet taste) within 2-3 days. I know it could have a fridge life of 1 to 2 weeks - why is it not the case with me?
Pasteurized ricotta should last 2-4 weeks in the fridge, unpastuerized 1-2 weeks.
So, A Few Possibilities:
Your fridge is way too warm, like close to room temperature. Ricotta will spoil if left out at room temperature or warmer in a few days. Have you checked fridge temp? Where in the fridge are you storing the ricotta?
You have a lot of spoiled milk bacteria in your fridge. If you've had dairy products go "off" many times in your fridge (or only once, but you spilled it), and not cleaned it, then you may have cultures of dairy-eating bacteria living in your fridge. Do other dairy products spoil quickly for you?
Your ricotta vendor is contaminated. If you've been getting all of this ricotta from the same store or the same maker, it's possible that their equipment/storage is contaminated. Try a different source/store.
You are buying ricotta which is already old. When was this ricotta made? How close is it to the expiration date when you buy it?
In fact, the brand I buy says on the container: for maximum freshness, use entire contents with 3-5 days of opening.
Strain/drain it when you bring it home, and leave it in an airtight sealed clean container.