tries to get env variables from the db first