The internal error that rendered LivingSocial’s Web site and mobile app inaccessible for nearly 48 hours was caused by a database that went down and had to be manually rebuilt by the firm’s engineers.

LivingSocial spokeswoman Sara Parker declined to say what the database contained, but it was critical enough to take out all of the company’s systems, she said. It did not contain customer credit card numbers or other financial data, she added.

The outage extended far beyond just the United States. Some of LivingSocial’s largest foreign markets, including Canada, the United Kingdom, Ireland, Australia, New Zealand and Malaysia were also out of order. Those countries are back online as of Thursday morning.

“There are still some issues and there are still some country specific issues and we’re on it,” Parker said, adding that the main cause of the outage has been resolved.

“The issue that happened will never happen again,” she said. “We’re working with a third party to audit all of our systems.”

The length of the outage, which officially began around 2 p.m. Tuesday and ended at 9 a.m. Thursday, is an eternity for a consumer Internet company. Most major consumer Internet firms, including Amazon, Google or eBay, have gone down at some point, but the issues are typically resolved within a few hours at most.

That’s because consumer Internet companies can’t make money if people can’t get to their Web sites. LivingSocial is no exception. During the technical snafu, customers were unable to purchase deals and the firm temporarily halted its marketing e-mails.

That will undoubtedly mean lost revenue and Web traffic for a company that has struggled to maintain both. Parker said the financial impact of the outage was still being determined.

“Suffice to say, we are ashamed and embarrassed,” LivingSocial posted on its blog around 8 p.m. wednesday. The same post said the site would be live again sometime overnight.

The firm announced its return in a blog post this morning, adding “We are here to help every LivingSocial customer and merchant resolve outstanding issues. We will make this up to you.”

Parker said the company would announce later Thursday the details of a marketing promotion for customers set to take place Friday. Meanwhile, the company is working with merchants to amend or reschedule promotions set to go live when the site was down.

Follow Steven Overly on Twitter: @StevenOverly