Millions of Americans are not getting the second doses of their Covid-19 vaccines, and their ranks are growing.

More than five million people, or nearly 8 percent of those who got a first shot of the Pfizer or Moderna vaccines, have missed their second doses, according to the most recent data from the Centers for Disease Control and Prevention. That is more than double the rate among people who got inoculated in the first several weeks of the nationwide vaccine campaign.

Even as the country wrestles with the problem of millions of people who are wary about getting vaccinated at all, local health authorities are confronting an emerging challenge of ensuring that those who do get inoculated are doing so fully.

The reasons vary for why people are missing their second shots. In interviews, some said they feared the side effects, which can include flulike symptoms. Others said they felt that they were sufficiently protected with a single shot.

Those attitudes were expected, but another hurdle has been surprisingly prevalent. A number of vaccine providers have canceled second-dose appointments because they ran out of supply or didn’t have the right brand in stock.

Walgreens, one of the biggest vaccine providers, sent some people who got a first shot of the Pfizer or Moderna vaccine to get their second doses at pharmacies that only had the other vaccine on hand.Several Walgreens customers said in interviews that they scrambled, in some cases with help from pharmacy staff, to find somewhere to get the correct second dose. Others, presumably, simply gave up.

From the outset, public health experts worried that it would be difficult to get everyone to return for a second shot three or four weeks after the first dose. It is no surprise that, as vaccines are rolled out more broadly, the numbers of those skipping their second dose have gone up.But the trend is nonetheless troubling some state officials, who are rushing to keep the numbers of only partly vaccinated people from swelling.Mounting evidence collected in trials and from real-world immunization campaigns points to the peril of people skipping their second doses. Compared with the two-dose regimen, a single shot triggers a weaker immune response and may leave recipients more susceptible to dangerous virus variants. And even though a single dose provides partial protection against Covid, it’s not clear how long that protection will last.

“I’m very worried, because you need that second dose,” said Dr. Paul Offit, a professor at the University of Pennsylvania and a member of the Food and Drug Administration’s vaccine advisory panel.The stakes are high because there is only one vaccine authorized in the United States that is given as a single shot. The use of that vaccine, made by Johnson & Johnson, was paused this month after it was linked to a very rare but serious side effect involving blood clotting. Federal health officials on Friday recommended restarting use of the vaccine, but the combination of the safety scare and ongoing production problems is likely to make that vaccine a viable option for fewer people.While millions of people have missed their second shots, the overall rates of follow-through, with some 92 percent getting fully vaccinated, are strong by historical standards. Roughly three-quarters of adults come back for their second dose of the vaccine that protects against shingles.

In some cases, problems with shipments or scheduling may be playing a role in people missing their second doses. Some vaccine providers have had to cancel appointments because they did not receive expected vaccine deliveries. People have also reported having their second-dose appointments canceled or showing up only to find out that there were no doses available of the brand they needed.The C.D.C. says there is limited data on the vaccine’s effectiveness when shots are separated by more than six weeks, although some countries, including Britain and Canada, are giving shots with a gap of up to three or four months.