It looks like the problem is completely due to a E36 M3ty weld from the factory to me. The bottom (closest in the picture) shows some evidence of metal loss due to rust, but not any metal loss near the weld. The top has a rectangular chunk missing which looks to be the only place the weld actually took so that 1"x1/4" section that was trying to hold the entire end cap on "failed".
Ingersoll rand had a recall for pressure vessel issues like this.
oldopelguy wrote:
I bought a cheap 220v solenoid valve for my air compressor. It's installed in the drain fitting between an elbow and a barely cracked open ball valve and wired in parallel with the motor. Every time the motor runs the solenoid valve opens and the tank drains. I'm pretty sure it was a $10 project.
I was thinking about something like this, but wiring it to the on switch. If the compressor is turned on and is plugged in the valve closes and the receiver can fill. If you turn off the compressor the valve opens.