During the reign of David, there was a famine for three successive years; so David sought the face of the Lord (2 Samuel 21:1).
There was a famine in the land and David equated that famine to the blessing or lack of blessing from God. He sought God to know why there was a famine. The Lord did not take long to answer: "It is on account of Saul and his blood-stained house; it is because he put the Gibeonites to death." It was many years before when Joshua entered the Promised Land when they were tricked by the Gibeonites into believing they were travelers when they were really enemies of Israel. The Gibeonites tricked them into making a peace treaty with them. It was one of the first major mistakes Israel made after entering the Promised Land. It resulted in Israel making a peace treaty that kept the Gibeonites in slavery to Israel. This was never God's intention for Israel. He had wanted Israel to destroy all their enemies, but they made an error in judgment that required that they honor a covenant with the Gibeonites.
Saul made a decision to disregard this covenant with the Gibeonites and sought to annihilate them. David sensed there was something preventing the blessing of God on Israel. As a nation they had violated a covenant made before God. Now they were reaping the consequences.
There are two things we can learn from this story. First, when we make a covenant, God expects us to fulfill it. God is a covenant maker. He made one with Abraham, Isaac, and Jacob. He made one with each of us through Jesus Christ. The scriptures are numerous regarding the importance of honoring our commitments.
Second, God is a very long-suffering God. He gave Israel many years of grace before He exercised judgment for their sin. However, there always comes a day when God must uphold His standard of righteousness.
Are you failing to walk in the blessing of God due to some failed commitment? Calamities can befall us for many reasons; sin can be one of them. In the case of Israel, David had to make things right with the Gibeonites. When he did this, God removed the famine and Israel again was prosperous. When you feel you lack the blessing of God on your life, ask the Lord if there are any past generation sins that you may need to repent of. He may be waiting on us before He can release His blessing on our lives.