Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 20th, 2004, 12:24 AM
Registered User
 
Join Date: Sep 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Is there any way to close all existing connections

Hello,
I am in big problem. I have a site which has extensive database activity. What I do is for each procedure I open a connection to the database and close it as and when I leave the procedure. However, in long run I find that some connection to the database is not properly closed causing the site to hang. This has become a big headache for me. Trying to find what is going wrong I logged opening /closing of connections to the database and found that at some points the connections are not closed resulting in large no. of active connections to the database. But if I go through the script I cannot really understand why that connection was not closed since the script ensure that the connection is closed before exiting the procedure.

Is there any way where I can check the database may be during night time and close all existing connections to the database. I repeat all my connections to the database are done at the procedure level.

Jojy
 
Old October 20th, 2004, 09:28 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Not sure if you can make out which process is responsible for the connection to the database. What is your DB server? Is that SQL server or MS Access?

If using SQL server, you can use SP_WHO in your query analyser to see the processes that are AWAITING COMMAND for a long time and kill those processes using KILL <Process_Id>. And then you can debug the code to close the connection on all occasions, wherever it is opened.

Hope that helps.
Cheers!

_________________________
- Vijay G
Strive for Perfection





Similar Threads
Thread Thread Starter Forum Replies Last Post
Browser close when screen saver close Rehanrana Pro VB 6 1 April 7th, 2008 03:09 AM
Help with connections dotnetfreak ASP.NET 1.0 and 1.1 Basics 21 January 18th, 2007 02:07 PM
window.close() failing to...well...close! mheathcote Javascript How-To 2 October 31st, 2005 03:02 PM
Adding existing and non-existing attributes spencer.clark XSLT 5 July 27th, 2005 04:02 PM
Connections saulodet ADO.NET 2 January 2nd, 2004 04:55 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.