Q:

Op Amp peak detector not working

I'm using the following circuit for a half wave rectifier. I have the following values:
R1 and R2 = 1K,
Vin: 400mv peak to peak, 60 Hz (it's a sine plus noise)
D1 and D2: 1N4007
Op amp: LM 741. Positive supply for op-amp is 5V and ground for negative voltage. 
The circuit works as expected with these values (it preserves the positive parts of the input). However, when I add a capacitor or an RC circuit as the load to the Vout node, the output goes to zero, rather than detecting the peaks. I have no idea why this is happening. 
I know that it's not a good idea to have the op-amp negative supply connected to ground, but trying it with -12v didn't make any difference. Any comment on how I can detect the peaks is highly appreciated!    

A:

First of all an LM741 is like a dinosaur. It is ancient technology which means odd behaviour at times. R2 at 1 K is much to low for the op-amp to drive. As suggested in comments make it at least 10 K. Use a quality op-amp like a TL071 JFET. It will not load down feedback and input resistors and has very low distortion.
Use of the TL071 is best if you have a +/- 12 volt rails, so the (+) input is common ground in the center of the power rails. You can use an OP220EZ for single ended supply up to 30 volts, but it cost a bit more. If you use a single ended supply you should have a DC blocking capacitor on the input, so any DC offset is blocked.
No matter which op-amp you use keep R2 at least 10 K, as most op-amps can supply only 5 mA at most. Keep the capacitor at 10 uF or less so you get close to true peaks.
If you want a faster decay time put a 10 K (minimum) resistor in parallel with the capacitor. A 0.1 uF capacitor will give a fast response to peaks but not hold the value for long, unless your decay resistor is upped to 100 K or so.
With extra diodes and a two potentiometers you can control both attack and decay times.
This would be a better version of what you posted:

simulate this circuit – Schematic created using CircuitLab

A:

Op amp: LM 741. Positive supply for op-amp is 5V and ground for
  negative voltage

An LM741 requires a minimum of 10 volts on the power rails for it to work properly. It you don't meet the minimum requirements for power rails, all bets are off.
Read this regarding reasons not to use a 741 (it also covers the power rail problem mentioned above). Likely you have output peak amplitude problems and input common mode range problems if not run at the specified power rails.

