DoorDash is eliminating about 1,250 corporate jobs, or about 6% of its workforce, saying it hired too many people when delivery demand surged during the COVID-19 pandemic.

CEO Tony Xu said in a message to employees Wednesday that DoorDash was undersized before the pandemic and sped up hiring to catch up with its growth.

“Most of our investments are paying off, and while we’ve always been disciplined in how we have managed our business and operational metrics, we were not as rigorous as we should have been in managing our team growth,” Xu wrote. “That’s on me. As a result, operating expenses grew quickly.”

The company is seeking to lower its operating costs, Xu said, but it was unable to bring spending in line without job cuts.

“This hard reality ultimately led me to make this painful decision to reduce our team size,” Xu said.

DoorDash and other start-up delivery services posted record revenue during the pandemic with millions sheltering at home. Profits are another story, however.

DoorDash said early this month that revenue rose 33% to $1.7 billion in the third quarter, but costs also ballooned and it almost tripled its losses from $101 million during the same period last year, to $296 million in 2022.

“Put in simple terms, the business is now losing around 70 cents for each order it fulfills. This is a sharp increase in the 41 cents it was losing at the start of this fiscal year,” said Neil Saunders, managing director of GlobalData. “All the metrics are pointing in the wrong direction.”

Impacted employees will receive 17 weeks of compensation and their February 2023 stock vest. All health benefits will continue through March 31, 2023.

DoorDash is among several companies to announce job cuts recently. Others include Twitter, Amazon, Facebook parent company Meta and H&M.

Shares of DoorDash Inc. rose almost 5% Wednesday.