Alright...I have been lurking on this messageboard for about a year trying to figure out an issue my car has been having so I finally signed up. Any help would be much appreciated! So my 99 legacy outback (with 175k miles) has been stalling every time I approach a light or have to idle. When I first start it the idles fine, but the more I come to a stop the idle lowers each time until it dies and the CEL comes on. It pulls the p1507 code for the idle air control valve and a code related to the knock sensor. Now following what I can see other people have done, I pulled the IAC off twice and cleaned it replacing the gasket the first time. I also sea foamed it...no help. Next, I replaced all of the filters and checked for vacuum leaks no luck. After that, I cleaned the MAF sensor really well with MAF cleaner still no luck. Replaced the spark plugs to no avail...any ideas? Originally this problem was intermittent but now it happens every time I drive it.