The U.S. House of Representatives is to vote Thursday on a plan by Republican House Speaker John Boehner to raise the debt ceiling and cut spending.

Boehner's plan has attracted criticism from the ultra-conservative Tea Party faction of the Republican party, and opposition from Democrats. Conservatives say it cuts too little spending, Democrats complain Boehner's plan would bring the issue back again before the next election.

Even if Boehner's plan passes the Republican-controlled House of Representatives, it faces obstacles in the Democratic-controlled Senate.

Without an agreement to raise the $14.3 trillion legal limit on borrowing by August 2, the U.S. Treasury Department says it will not have enough money to pay all its bills. That could bring a default, that would likely prompt rating agencies to cut the credit rating of the United States, bringing higher interest rates and hurting economic growth.

The current impasse worries investors, and many stock markets have fallen in recent days.

White House spokesman Jay Carney says President Barack Obama is optimistic that a compromise can be reached before the deadline. He says White House officials have been having conversations every day for months with key congressional figures as they seek a deal. Carney says a successful compromise would significantly cut spending, set up a way to reform taxes and control spending on social programs, and lift the debt ceiling.

A compromise might emerge as congressional leaders discuss Boehner's plan and a rival Democratic version by Senate Majority Leader Harry Reid. Unlike previous Democratic plans, Reid does not call for a tax increase on the wealthy, which is strongly opposed by Republicans.