A computer glitch sparked an agricultural crisis early this summer. The perennial migration of guest workers from Mexico and Latin America was abruptly stopped because digital verification systems were unable to issue millions of temporary visas. Crops went untended as the season's harvest began, and more than $1 million a day vanished as the human-fueled agricultural harvest machine of migrant labor in the United States stalled.

With immigration reform dominating the 2016 presidential campaign, the importance of temporary guest worker visas was thrust into the spotlight Wednesday night during a candidate debate when retired neurosurgeon Ben Carson said Mexicans should be able to work on U.S. farms. He was instantly criticized on Twitter by users who felt that the remarks were an insult to the working capacity of undocumented immigrants, but his comments also drew attention to a complex and overladen visa system that is struggling to fill major labor shortcomings for American agriculture.

"After we seal the borders, after we turn off the spigot that dispenses all the goodies ... people who had a pristine record, we should consider allowing them to become guest workers, primarily in the agricultural sphere," Carson said Wednesday night during the CNN Republican debate. "If they don't do it within that time period, then they become illegal, and as illegals they will be treated as such."

RTR1E6LK A migrant laborer weeds a melon field during the early morning in Somerton, Arizona. Photo: Reuters

Each year, tens of thousands of primarily Mexican workers come to the United States to fill a labor gap and provide for their families back home through the H2a visa program, which provides temporary agriculture-related working permits. The workers are employed throughout the nation, and in the West, they slowly move northward during the harvest season. Workers bend to cut lettuce in Yuma, Arizona, in the more temperate month of January, surrounded by forbidding, jagged desert mountains. By October, they can make it as far north as Washington state, where they snatch apples from tree branches before sending them on the way to American supermarkets.

To make up for a lack of domestic workers seeking to join the agricultural workforce, farmers are forced to go through the arduous process of applying for the visas. Each worker's visa can cost as much as $500, then the farmer is required to provide room for the workers and guarantee that at least three-fourths of the total expected wages will be paid. That complicated and stressful system leads many farmers to turn to undocumented workers who are cheaper, easier to get onto the farm, and find their own apartments to live in.

There are more H2a visas granted every year, but the supply doesn't keep up with demand. There were just under 90,000 visas issued in 2014, according to State Department data. There is no limit to the number of such visas that can be granted each year, but the process is weighed down by slow bureaucracy.

"Unfortunately, American workers aren’t coming out to do the job. We’re doing everything we can to attract American workers, but the reality is it’s very hard work. It’s seasonal, " said Kristie Boswell, the director of congressional relations for the American Farm Bureau Federation (AFB), an association of agriculture industry interests, in Washington, D.C. "There are certain commodities -- fruits and vegetables for example -- [that] are very, very labor intensive. They are hand labor. There are individuals out picking."

But the work still needs to get done. The value of American agriculture in 2014 totaled $420.1 billion, according to figures provided by AFB. Labor-intensive agriculture in the country was valued at $97.9 billion. The backbone of the massive industry is mostly foreign workers: H2a visa workers make up about 5 percent of the workforce in the fields, and another 60 to 70 percent of workers are undocumented, Boswell said.

When a farmer can't fill rosters, the effects can be devastating, as it was during last summer's technology glitch. But, even without unforeseen events, the status quo isn't working for farmers, who often need a large amount of workers for a relatively short period of time. Boswell cited two examples she had recently encountered. One blackberry grower in Georgia needs an average of 150 workers each June, and, nine months beforehand, that grower is already struggling with the visa process. Another farmer, this one in California, needed workers on Sept. 15 but was told he wouldn't be able to get the visas until Nov. 1 , she said.

"To a fruit, that's an unworkable time frame," Boswell said. "So now he has produce to harvest and he has no workforce."

Recent attempts to reform the visa system have gone nowhere. Presidential aspirant and U.S. Sen. Marco Rubio was a strong supporter of reforms during the failed 2012 "gang of eight" effort in Congress to overhaul the immigration system. Some states, like California, have tried to think up their own solutions to the problem, but they've also failed.

On the 2016 campaign trail, discussions about fixing the temporary visa system have been scant, aside from Carson's brief mention on Wednesday, while other contestants have scrambled to align themselves more closely with whatever has been working for front-runner Donald Trump. The leading GOP candidate burst into the election season with vitriol, calling Mexicans rapists and criminals in June. He then pushed for a border wall to be built along the U.S.-Mexico border to enforce immigration laws and said that all of the estimated 11 million undocumented immigrants in the country should be sent home.

Jason Resnick, vice president and general counsel for the Western Growers Association, an farm association based in Irvine, California, said a working migrant visa program would likely result in fewer people sticking around when their papers expire. Historically, agricultural migrant workers spent seasons working legally and headed home to their families. Now, migrants have to choose between paying expensive "coyote" smugglers to sneak them home and back at the end and beginning of each season, or staying in the U.S. illegally.

RTR45NFY A U.S. Border Patrol vehicle drives by the 18-foot-high rusty steel barrier along the U.S.-Mexico border at Brownsville, Texas, on Sept. 2, 2014. Photo: Reuters

"You can’t talk about this debate without thinking about the human costs and the toll that’s being paid for good hard working people who are just trying to better their lives and the lives of their families. And to see so many of them separated from their families for so long is truly heartbreaking, and it’s entirely avoidable," Resnick said. "So the H2a program fills in a critical gap. It’s not adequate, and it’s not adequate because of the cost of using the program. The bureaucracy that's systemic in the program ... makes it extremely unwieldy and difficult to use."

Follow me on Twitter: @ClarkMindock