I would check and make sure you have enough oil in the compressor. Too little oil can lead to premature failure, and might explain why your compressor randomly shuts off (i.e. it is getting too hot). If it is low, flush out the old oil and put in the right amount of new oil, since there is no way you would really be able to determine how much has been lost and you don't want to overfill the oil as it can puddle in the compressor and decrease cooling efficiency.
does your fan in front on your radiator turn on, cause the pressure in the a/c system is getting to high for the clutch driven radiator fan to move air.
Any of the following can cause spark knock:
^ Too Much Compression: An accumulation of carbon deposits in the combustion chambers, on piston tops and valves can increase compression to the point where it exceeds fuel octane rating. If a top cleaner fuel additive fails to remove deposits, a new alternative is to blast the deposits loose by blowing crushed walnut shells through the spark plug hole. Otherwise, the head will have to be removed so the deposits can be scraped off.
^ Overadvanced Ignition Timing: Too much spark advance causes cylinder pressure to rise too rapidly. If resetting the timing to stock specifications does not help, retarding timing a couple of degrees may be necessary to eliminate knock.
^ Engine Overheating: A hot engine is more likely to suffer spark knock than one which runs at normal temperature. Overheating can be caused by low coolant, a defective fan clutch, too hot a thermostat, a bad water pump, etc. A buildup of lime and rust deposits in the head and block can also reduce heat transfer.
^ Overheated Air: The thermostatically controlled air cleaner provides the carburetor with hot air to aid fuel vaporization during engine warm-up. If the air control door sticks shut so that the carburetor continues to receive heated air after the engine is warm, detonation may occur, especially during hot weather. Check the operation of the air flow control door in the air cleaner to see that it opens as the engine warms up. No movement may mean a loose vacuum hose or a defective vacuum motor or thermostat.
^ Lean Fuel Mixture: Rich fuel mixtures resist detonation while lean ones do not. Air leaks in vacuum lines, intake manifold gaskets, carburetor gaskets or fuel injection intake plumbing downstream of the throttle can all admit extra air into the engine and lean out the fuel mixture. Lean mixtures can also be caused by dirty fuel injectors, carburetor jets clogged with fuel deposits or dirt, a restricted fuel filter, or a weak fuel pump.
The air/fuel ratio can also be affected by changes in altitude. A carburetor calibrated for high altitude driving will run too lean if driven at a lower elevation. Altitude changes are generally compensated for on computer cars by the barometric pressure sensor.
A lean fuel condition can be diagnosed by watching for lean misfire on an ignition scope, or by using a four-gas infrared analyzer and watching exhaust oxygen levels. A reading over about 3% to 4% oxygen would indicate a lean fuel condition.
^ Spark Plug Too Hot: The wrong heat range plug can cause detonation as well as pre-ignition. Copper core plugs are less likely to cause detonation than standard spark plugs.
^ Loss of Exhaust Gas Recirculation (EGR): EGR keeps combustion temperatures down, reducing the tendency to detonate. If the EGR valve is inoperative or someone has disconnected or plugged its vacuum hose, higher combustion temperatures can cause pinging.
^ Low Octane Fuel: Burning cheap gas may be one way to save pennies, but switching to a higher grade of fuel may be necessary to eliminate a persistent knock problem.
^ Defective Knock Sensor: The knock sensor responds to frequency vibrations produced by detonation (typically 6 - 8 kHz), and signals the computer to momentarily retard ignition timing until detonation stops. A knock sensor can usually be tested by rapping a wrench on the manifold near the sensor (never hit the sensor itself). If there is no timing retard, the sensor may be defective.
It is behind the alternator. If you disconnect the top alternator bolt and then the lead to the alternator, and loosen the bottom bolt, you can swing the alternator towards the passenger side and see the sensor. You obviously have to remove the serpentine belt to move the alternator.