The senate and the house of representatives have embarked on an eight-week recess.
The leadership of the two chambers announced the break after their respective plenaries on Wednesday.
The legislators are expected to resume sitting on September 20.
The lawmakers have gone on various breaks since the start of the year, but this will be the longest by virtue of it being their annual break.
After the plenary on Wednesday, Ado Doguwa, the majority leader, moved a motion for the house to adjourn sitting till September.
Ndudi Elumelu, the minority leader, seconded the motion but added: “However, I want to beg members, Abuja is no longer safe, please, if possible, go back to your constituency. The place is so insecure.”
He was however interrupted by Doguwa, who said he is “derailing” from the motion he was asked to second.
In his remarks, Idris Wase, deputy speaker of the house, said such a “joke” shouldn’t have been made.
“Security is everybody’s business and we should not play politics with security,” he said.
“Colleagues, I want to beg of us that we all need to come together, work together and think in a manner that we can work together to sort our issues.
“I believe the minority leader, maybe, was putting some jokes but I do not believe that it was a joke on the security in the lives and property of the people. By the grace of God, Abuja is going to be secured.
“I do not think we should scare investors who are coming into the country; I do not believe that we should scare people who could come to add value to us. It has not gotten to the level to say that is not safe.”
Attacks and kidnappings have spiralled in the nation’s capital in recent weeks.
On Sunday, three soldiers from Guards Brigade, Nigerian Army, were killed in an ambush by gunmen in Abuja.
On Monday, the ministry of education ordered the immediate closure of the Federal Government College, Kwali, in the federal capital territory (FCT) over security threats.
Earlier in July, the correctional facility in the Kuje area council was attacked by gunmen, and hundreds of inmates, including suspected Boko Haram members, escaped.