For the second time in less than a month, one of the largest U.S. airlines has canceled thousands of flights due to a critical IT failure. Last month, Southwest Airlines (LUV 0.97%) was the victim. This past week, it was Delta Air Lines (DAL -0.06%).

Both system outages caused huge headaches for customers. Meanwhile, both Southwest and Delta have incurred significant costs related to their IT meltdowns. Is this a sign that airlines aren't investing enough money in their IT infrastructure?

Chaos at Southwest Airlines

On July 20, Southwest Airlines experienced a router failure, which caused a massive nationwide technology outage. Southwest's backup and recovery systems didn't work as planned, and it ultimately took 12 hours to get everything up and running again.

Southwest Airlines canceled 2,300 flights in the span of four days in July. Image source: The Motley Fool.

In addition to taking down the company's website, the technology outage caused Southwest to cancel about 2,300 flights over the span of four days. (In addition to flight cancellations on the day of the outage, Southwest was forced to cancel additional flights in the next few days, largely due to planes and flight crews being out of position.)

These cancellations will have a significant negative impact on Southwest Airlines' Q3 financial performance. Southwest recently estimated that the outage will have a 0.5 percentage point negative impact on Q3 unit revenue. It also expects an incremental increase of 1 to 2 percentage points in its Q3 unit costs, excluding fuel, profit sharing, and special items.

This probably puts the total cost of the outage at $40 million-$50 million after tax. That doesn't include any potential reputational damage that might hurt Southwest's future revenue.

Delta Air Lines melts down, too

In the past week, Delta Air Lines has faced a similar nightmare. On Monday morning, a power control module failed at Delta's Technology Command Center.

As was the case at Southwest, some systems successfully switched over to backups as they should have, but others did not. The result was a similar multiday spiral of delays and cancellations.

Delta canceled roughly 1,000 flights on Monday and another 775 on Tuesday as it worked to get its systems fully operational again. It also canceled more than 300 flights on Wednesday and a handful on Thursday.

Delta's recent IT outage also caused more than 2,000 flight cancellations. Image source: The Motley Fool.

It's too early to get a sense of how much this technology snafu will cost Delta, but it's likely to be substantial. Aside from the lost revenue from flights that were canceled and the additional costs created by all the disruption, Delta has offered $200 vouchers to every customer who suffered a flight cancellation or a delay of more than three hours between Monday and Wednesday.

Another series of payouts could be triggered if Delta falls behind the other legacy carriers in terms of delays and flight cancellations for the full year. As part of its corporate contracts, Delta offers travel credits ranging from $1,000 to $250,000 for any year where it falls behind both American Airlines and United Continental on those metrics.

Fortunately, Delta probably won't have to pay up on that on-time guarantee. That's because it is usually far more reliable than either of its rivals. As CEO Ed Bastian noted earlier this week, Delta canceled more than three times as many mainline flights on Monday as it had canceled in all of 2016 up until that point.

More redundancy needed?

With two big technology outages in the span of three weeks at major airlines, it's not surprising to see lots of people playing the blame game. Most of Southwest's big unions blamed CEO Gary Kelly and COO Mike Van de Ven, alleging that they are too busy spending money on stock buybacks to invest in better technology. Meanwhile, the head of the Airline Passenger Experience Association blamed the problems on an overreliance on automation.

In both cases, the blame seems misplaced. Just a month before its IT outage, Southwest had described for investors a multiyear IT overhaul that is in the early stages of deployment. Southwest expects to spend about $500 million over three years on these upgrades, so it's hardly fair to say that the company is skimping.

Furthermore, while in theory airlines could maintain the capability to seamlessly switch to fully manual operations, it would be extremely wasteful. To do everything by hand without delaying or canceling flights, airlines would need to carry far more staff than are ever needed for normal operations. That would drive up costs -- and by extension, ticket prices.

If anything, the incidents at Southwest and Delta over the past month demonstrate just how complex airline technology systems are. Since they are needed on a 24/7 basis, 365 days a year, it's hard to fully test every potential scenario that could cause problems.

As a result, it may be impossible to fully eliminate large-scale IT outages across the airline industry. Nevertheless, airlines should consider investing more capital to build even more redundancy into their systems. Two major IT failures and two backup system failures in the span of a month would suggest that the current precautions aren't sufficient.