Sometimes I've had industries go away - notably oil rigs but sometimes forests or coal mines. I thought it had something to do with proximity to a city but I have some urban forests (ha!) that are still holding up pretty well in 2240. I also thought it might have to do with the transportation percentage, but I always had a decent percentage (>~50%) on the oil rigs and that seemed to make no difference.
This isn't a complete answer, but if you don't mess with an industry it will go away. If you don't carry over 50% of an industries cargo, it will close, oil rigs and wells will randomly run out (oil running out maybe?) even if you are carrying 50%+ of their cargo, and oil wells (the oil pumps that are on land) can only appear in certain spots, and due to a glitch from the original TTT-TTD that is still in OpenTTD, even if you work with them, the game still considers them unused, so they will still disapear in a few years. In a recession, however, industries produce half as much, and are twice as likely to shut down.