There are no general rules regarding how long a short sale can last before being closed out.
A short sale is a transaction in which shares of a company are borrowed by an investor and sold on the market. The investor is required to return these shares to the lender at some point in the future. The lender of the shares has the ability to request that the shares be returned at any time, with minimal notice. In this event, the short sale investor is required to return the shares to the lender regardless of whether it causes the investor to book a gain or take a loss on his or her trade.
However, requests to return shares are rare, as the lender of the shares is a brokerage firm that has a large inventory of stock. The brokerage firm is providing a service to investors; if it were to call shares to be returned often, investors would be less likely to use that firm. Furthermore, brokerage firms benefit greatly from short sales through interest and commissions on the trades. And there is a limited risk for the brokerage firms due to the restrictive margin rules on short sales.
Brokerage firms lend shares out of their inventory or out of their clients' margin accounts, or they borrow them from another brokerage firm. If a firm lends out shares from one of its clients' margin accounts and that client, in turn, wanted to sell his or her position, the brokerage firm will just have to replace the shares lent out from that client's account with other shares from one of the three main sources we listed. This would have no effect on the short seller.
There are some cases in which the lender will force the position to be closed. This is usually done when the position is moving in the opposite direction of the short and creating heavy losses, threatening the likelihood of the shares being returned. Either a request will be made to return the shares or the brokerage firm will complete the closing of the transaction for the investor. The terms of margin account contracts allow brokerage firms to do this.
While the power to force the return of the shares is in the hands of the lender, this power usually goes unused. Generally speaking, it will be the short seller, not the lender, who closes out the position.