First, the database connection should only be opened long enough to perform a query, and then shut down immediately afterwards. Second, a sql connection should not close itself after a certain amount of inactivity (the calling app should always be in control). If it DOES shut itself down, and as a result causes your app to crash, it's your app's fault. Second, "I suppose" is not acceptable. Run it through a debugger and find out why it's happening. If you have to, make it write a log file and just let it run until it freezes. At that point, you'll probably be able to at least narrow the problem down. Not using the tools you have before asking that question is inappropriate.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001