I am deploying contract to the Rinkeby (or Ropsten, it does not matter) using Remix and constantly receive error "gas limit exceeded" even when rising it to 10,000,000.
Then I commented out most part of contract, only minimum kept and it deployed successfully. After that I uncommented couple of lines and received "gas limit" error again.
Ok, finally comment uncommented lines back and... Got error "gas limit exceeded" despite that this version of contract was just deployed, 2 minutes ago!
As I see it is unrelated to the contract code, but what?