ASP classic application hungs at function call
===

Good day!

I'm experiencing an issue with an ASP classic application we have. We were working on the SQL connection management and everything was perfect, so we deployed on another environment for the users to test and one of the ASP page hungs for 90 sec and results in:


    Active Server Pages error 'ASP 0113' 

    Script timed out 

So, I tried adding some debug code. What I used is:

    Response.End

To check where it was hanging. I finally discovered that it was the new function we developed that was hanging, obviously! Here's a little extract:
      
    Dim sqlConn
    Set sqlConn = SessionConnection("SQLConnection")
    set rsIDXMDL = SQLQuery(sqlConn, sQuery)

If I put a Response.End just before the call to SessionConnection(), the process stops. If I put the Response.End after the call to SessionConnection(), the page hangs for 90 sec. That made me think: "Bingo! Something inside fails!" So, just for fun, I put a Response.End at the first line of the function, like:

    Function SessionConnection(SessVarName)
        Response.End
        [...]

I'm sure you can guess what happened!!! THE PAGE STILL HANGS!!! How is this possible?