It is probably the session in general and not the cart. What is your server language? If you are losing your session, the cart is cleared as a result... it would not work the other way around... the cart would not cause the clearing of the session.
I would write the session id on top of the page and see if that is updating. If so it is a problem with the way the server is maintaining sessions in general.