Sleeping Connections

  • I have a web based application from which I issue a

    stored procedure xp_cmdshell command to copy a file from

    our Image server to web server(Does not make sense but

    due to firewall issues I have to do it this way)I pass

    the parameter in the stored proc for the file name and

    then in my asp page I closed the Recordset and

    connection. But this connection stays as sleeping in SQL

    Server 7.00 SP3 for hours and after a while I have 100's

    of sleeping connection through this App.

    I have been struggling with this for weeks now but can't

    figure out whats going on. Any help will be greatly

    appriciated. Please Please Try to Help if anyone know the

    answer.

    Thanks a Lot

    Ann

  • This was removed by the editor as SPAM

  • I'm guessing that it isn't completing correctly. Does the stored procedure work and complete if you run it in query analyzer?

    Steve Jones

    sjones@sqlservercentral.com

    http://www.sqlservercentral.com/columnists/sjones

    http://www.dkranch.net

  • Yes stored Procedure does execute properly and it does what it needed to do.

    But the conneciton status goes to sleeping and it does stays that way for seceral hours.Any help would be a great help

    Thanks

  • After you close the ADO object, do you set the variable to nothing?

    adoObj.Close

    adoObj = Nothing

    This will help break the connection (I believe)

    Guarddata-

  • Yes I do.. Iam not sure whats going on here. because when I use the same page from test server hitting the same sql box it release after about a minutes but not from test IIS.

  • I've experienced a similar problem to this one. In our case, the problem existed in the Network Layer, well below anything you have direct control over with your code. We discovered that the networking card on one of our servers was not configured properly (I believe it was a half vs. full duplex issue -- I don't remember which was the correct setting). Changing that corrected the issue.

    As a further point, I would suggest storing your images in the SQL database. This will eliminate the need to use xp_cmdshell. I recently worked on an online catalog project where this was done (with several gigs of images) and it proved very efficient.

    Just a few thoughts. Let me know how it turns out.


    Cheers,

    Buddy

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply