SAN DIEGO — Dozens of people formed a line outside Dewey Elementary School on a recent Monday, awaiting the arrival of a Feeding San Diego truck that gives out free groceries every other week.

The vast majority weren't homeless or even newly unemployed. They're the husbands and wives of U.S. military service members.

"I knew we wouldn't be wealthy, but I thought it would be a lot more manageable," said Desiree Mieir, a mother of four whose Navy husband's most recent deployment lasted almost eight months.

Mieir can't afford cable and often leaves her home's air conditioning shut off to keep her utility bill down. "I didn't know I'd have to try this hard," she said.

To make ends meet, Mieir and thousands of other military families around the country routinely rely on federal food assistance, charities or loans from family. Their struggles are caused by a variety of factors: the high cost of living in cities like San Diego, difficulty qualifying for federal food assistance, and a transient life that makes it challenging for spouses to build careers.

It's difficult to quantify the full scope of the problem. The Department of Defense doesn't collect data on how many service members are seeking food assistance. But interviews with dozens of military family members, as well as visits to makeshift food pantries like the one at Dewey Elementary, indicate that the number of military families struggling to put food on the table is substantial.

Desiree Mieir's husband Dan returns home, surprising his kids after an almost eight-month deployment. NBC News

Pentagon records obtained by NBC News through a Freedom of Information Act request give just a hint of the problem. The data shows that during the 2018-19 school year, a third of children at DOD-run schools on military bases in the United States — more than 6,500 children — were eligible for free or reduced lunches. At one base — Georgia's Fort Stewart — 65 percent were eligible.

"I think it is a national outrage," Sen. Tammy Duckworth, D-Ill., a former army helicopter pilot, said. "Can you imagine being deployed and you're in the Persian Gulf, or you're in Iraq right now, and you're worried whether or not your kids are able to have a meal?"

"We should say if you come to the military, your kids are going to get a good education, you're going to get good housing, and your kids are going to be fed," she added.

Duckworth and Rep. Susan Davis, D-Calif., have been working on a provision to the National Defense Authorization Act that would help raise the income of some service members whose basic pay is close to or below the poverty line.

On a recent visit to the makeshift food pantry at Dewey Elementary, Melissa Carlisle, a mother of two whose husband serves in the military, picked up a bag of potatoes that she plans to spread out over three different meals and freeze the rest for later.

"They have this military illusion that we're just rolling in dough, but we're not," Carlisle said. "...We're just really good with the little bit of money that we get."

Almost everyone who gets groceries at the Feeding San Diego pantry at Dewey Elementary is military, and everything is free, so Carlisle and other military spouses start lining up early to fill their bags with fresh produce, snacks for the kids, and basic staples such as flour and bread.

Jillian Ozuna, a mom of five and a Navy spouse, helps distribute food from Feeding San Diego at Dewey Elementary School. NBC News

At a school where almost 80 percent of students are the children of active-duty military personnel and more than 70 percent are eligible for free and reduced lunches, the biweekly free groceries often make the difference between struggling to pay the bills or simply going hungry.

When she's not getting free food from Feeding San Diego, Carlisle normally shops at the military commissary, which is tax-free, or at Ralph's, a grocery store in San Diego where purchases of food accrue points she can use on gas. "You don't need to decide, 'Do I need gas, or do I need food?'"

But Carlisle said that even with help, just getting by is a constant worry.

"I wouldn't say check to check, but pretty darn close. If you sneeze hard, a flat tire goes out, that's it," she said.

The lower-ranked enlisted service members in all branches, those with pay grades from E-1 to E-5, make somewhere between $18,648 and $40,759 in basic pay, depending on their rank and years of service. This doesn't include their allowances for housing and food or special compensation like combat pay.

But the housing allowance, which can range widely depending on where a service member lives, is often enough to push a family out of the eligibility bracket for federal food assistance.

Even so, 2017 data from an annual Census Bureau survey showed that more than 16,000 active-duty service members received food stamps, known as the Supplemental Nutrition Assistance Program, or SNAP.

In 2016, the Government Accountability Office published a report recommending that the Defense Department start tracking data on service members' and their families' use of food assistance programs such as SNAP and the Special Supplemental Nutrition Program for Women, Infants, and Children, or WIC, but aid groups and lawmakers question whether the department is collecting meaningful data.

For more on this story, tune in to NBC Nightly News Saturday at 6:30 p.m. ET/5:30 p.m. CT or check your local listings.

"They don't even have adequate data about how many people are impacted," Josh Protas, the vice president of public policy at Mazon: A Jewish Response to Hunger, said. That's a problem, said Protas, whose group has been a leader in researching military hunger, because without accurate data on how many families are affected, it's hard for policymakers to address the issue.

The USDA’s Food and Nutrition Service, which operates federal food assistance programs, told NBC News it is collaborating with the Department of Defense "to provide national estimates of the percent of military families eligible" for SNAP, but declined to provide further details on that collaboration.

Mazon has been working with lawmakers to draft legislation that would ease the burden on service members in the lower enlisted ranks.

"We've identified that there are food pantries on or near almost every military base in this country. And there's nothing wrong with going to a food pantry when you need emergency help," Protas said, "but there's no reason that those who are serving in the armed forces should have to do that on a routine basis."

A Feeding San Diego truck arrives every two weeks with free groceries at Dewey Elementary School in San Diego. NBC News

"I think for DOD this is a public relations issue," he said. "They would rather it just went away or was dealt with quietly. Unfortunately for the families that are struggling, ignoring the issue won't help their circumstances."

The undersecretary for personnel and readiness at the Pentagon is the Defense Department's key policy adviser on pay, benefits, recruitment and morale, and also oversees the agency that runs schools on military bases. But the role has been vacant since former Undersecretary Robert Wilkie left to lead the Department of Veterans Affairs a year ago. President Donald Trump has not nominated a successor.

NBC News made multiple requests for an interview with acting Undersecretary for Personnel and Readiness James Stewart but was told he was unavailable. Instead, a Defense Department spokesperson sent an email saying the issue of food insecurity in the military is "minimal," that "military members are very well paid," that there is a subsidized grocery store on each base, and that service members can avail themselves of "financial literacy training" the military provides.

Mieir told NBC that it's hard to imagine how she could possibly plan and save anymore than she is already doing. "My husband and I have taken advantage of resources available to us. We have met with financial counselors provided by Fleet and Family services," she explained. "We have done that work, and we do communicate."

Desiree Mieir sits down to dinner with her four kids. NBC News

Duckworth said it's unfair to compare military families, which are usually single income, to the average U.S. family, which is dual income. Often, one spouse is following the other from base to base, she said, "and that spouse who's following around can't actually grow a career… They're at a disadvantage, and to say, 'Yeah, well, she's staying home, she should just do better with her budget,' you know, that's really insulting."

The Defense Department points to the fact that in addition to their basic salary, service members receive an allowance for housing, and a food allowance, called a basic allowance for subsistence (BAS), as part of their compensation. But according to a 2018 survey by Blue Star Families, a group that supports military families, the majority of respondents spent hundreds out of pocket to obtain housing that actually worked for them.

Mieir is a stay-at-home mother. With four kids under age 10 and one not in school yet, like many young military families, the Mieirs estimated they would pay more in child care than they'd make by having Desiree join the workforce.

Dan Mieir, her husband, works in Naval communications and makes $34,279 in basic pay before taxes. That's just under the federal poverty line for a family of six in most of the country. To qualify for SNAP nationally, your pay cannot exceed 130 percent of the poverty line, though some states are more generous, like California, where the Mieirs live. The Mieirs would qualify based on California's threshold — but their housing allowance, which counts as income on SNAP applications, pushes them above the limit and makes them ineligible.

Rep. Davis and Sen. Duckworth have sponsored legislation in the House and Senate that would keep the basic allowance for housing from being counted toward total income on food assistance applications, but their bills have stalled in both chambers.

The food allowance, called the BAS, that enlisted service members receive is about $360 per month, but that sum is intended for the member alone, not his or her family, so unlike the allowance for housing, it does not increase if one has dependents. The money is also taken away when a service member is deployed.

The BAS is supposed to increase marginally each year to keep up with inflation and changes in food costs, but for the fourth year in a row, the food allowance has gone up by less than 1 percent.

Former Navy fire controlman Crystal Ellison said her family used her BAS to pay the bills.

Former Navy fire controlman Crystal Ellison. Courtesy Crystal Ellison

For most of the 13 years Ellison spent in the Navy, managing complex weapons systems and high-powered radars, she had to rely on loans from her in-laws to feed her family. "I found it embarrassing. I felt like, you should be able to provide for your family and not lean on anybody else. That is what you are supposed to do as an adult," she said.

Ellison grew up in a military family and dreamed of joining the Navy, but for years, as she worked her way through the lower enlisted ranks, she quietly struggled to feed her family.

"It was hard … especially being a junior sailor, you don't make a lot of money," Ellison said, "So if you didn't have enough money saved up, you were definitely in the hurt locker."

The Defense Department said that service members make more than civilians with comparable education and experience, but Ellison said leaving the Navy was the first time she was financially secure. "The job I had [in the Navy] made me very marketable. I work for a big semiconductor company here in Arizona. That definitely pays a lot more."

Ellison is now in the private sector and no longer struggling financially, but she said she wishes more Americans knew food insecurity among the lower enlisted ranks of the military was a problem. "We're giving 100 percent to the country, and the country doesn't give it back."

"We're willing to spend hundreds and hundreds of millions of dollars on a fighter jet — which I want our troops to have — to carry them into battle," Duckworth said. "But if the people that are working on them can't focus on turning the wrenches and maintaining the equipment because they're worried whether or not their kids are hungry, what's the point of having that fighter jet?"