Why does my Inverter overload?
John D has answered the inverter overload issue. I'll answer another part.


  With 40 amp hours shouldn't it be able to provide 40 amps of current at any moment (more than needed for surge)?


To understand the maximum current from the battery you need to consult the datasheet. 40 Ah is an energy rating (sort of - a better energy measure would be Wh, watt-hours which is V x Ah = 12 x 40 = 480 Wh in your case). The Ah rating is usually measured on a 10-hour discharge so a 40 Ah battery will typically supply 4 A for 10 h. At lower discharge rates the time will be higher than the rating would suggest while at high discharge rates it will be lower. i.e., at 40 A discharge, if the battery can handle it, the discharge time will be considerably less than the 1 h the calculation might suggest.

The 40 Ah rating does not tell you that the battery can actually supply 40 A. It might not or might be able to supply 400 A. Again, the datasheet is your reference.


  I also noted that the voltage dropped a little too (from 13.5 to 12.9 V).


Try measuring at the compressor. If it drops more there then your cable is inadequate.



Notes: SI units named after a person have their symbols capitalised but are lowercase when spelled out. 'V' for volt, 'A' for ampere, 'K' for kelvin, 'Ω' (capital omega) for ohm, etc. Meanwhile 'k' is for kilo.