Data Source = problem

Discussion in 'ASP General' started by James, Feb 14, 2005.

  1. James

    James Guest

    I've been having this recurring General Network Error problem and I've been
    looking to solve it. Reboot fixes the problem for several hours, but
    eventually it happens again. Nothing seems to specifically trigger it.
    HTML loads fine, ASP pages that connect to SQL Server, no dice.

    Long story short, it happened about 15 minutes ago and one of the pages that
    connects to SQL Server worked, but none of the other ones would. The page
    in question is also the only page that has Data Source = IP Address. All of
    the others refer to a machine name. Could this be the cause of the problem?
    Before I change it system-wide, I want to be relatively certain it could be
    the cause.

    Any ideas?

    Thanks!
    James
     
    James, Feb 14, 2005
    #1
    1. Advertising

  2. "James" <> wrote in message
    news:#...
    > I've been having this recurring General Network Error problem and I've

    been
    > looking to solve it. Reboot fixes the problem for several hours, but
    > eventually it happens again. Nothing seems to specifically trigger it.
    > HTML loads fine, ASP pages that connect to SQL Server, no dice.
    >
    > Long story short, it happened about 15 minutes ago and one of the pages

    that
    > connects to SQL Server worked, but none of the other ones would. The page
    > in question is also the only page that has Data Source = IP Address. All

    of
    > the others refer to a machine name. Could this be the cause of the

    problem?
    > Before I change it system-wide, I want to be relatively certain it could

    be
    > the cause.
    >
    > Any ideas?


    Hard to offer any ideas without knowing the exact error message ...
     
    Tom Kaminski [MVP], Feb 14, 2005
    #2
    1. Advertising

  3. James wrote:
    > I've been having this recurring General Network Error problem and
    > I've been looking to solve it. Reboot fixes the problem for several
    > hours, but eventually it happens again. Nothing seems to
    > specifically trigger it. HTML loads fine, ASP pages that connect to
    > SQL Server, no dice.
    >
    > Long story short, it happened about 15 minutes ago and one of the
    > pages that connects to SQL Server worked, but none of the other ones
    > would. The page in question is also the only page that has Data
    > Source = IP Address. All of the others refer to a machine name.
    > Could this be the cause of the problem? Before I change it
    > system-wide, I want to be relatively certain it could be the cause.
    >
    > Any ideas?
    >
    > Thanks!
    > James


    It sounds as if you may be disabling session/connection pooling:
    http://support.microsoft.com/?kbid=328476

    You should be striving to make all your connection strings the same. Also,
    avoid situations that cause implicit connections to be used:
    http://support.microsoft.com/?kbid=271128

    That means always using explicit connection objects, never doing things
    like:

    strconn="provider=..."
    rs.open sqlstring,strconn
    instead, use
    set conn=createobject("adodb.connection")
    rs.open sqlstring,conn,,,1
    or
    set rs=conn.execute(sqlstring,,1)

    or

    cmd.activeconnection = conn (this causes a new implicit connection)
    use this to cause an existing connection object to be used:
    set cmd.activeconnection = conn

    Bob Barrows

    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.
     
    Bob Barrows [MVP], Feb 14, 2005
    #3
  4. James

    James Guest

    Tell me about it! That was the exact error message. "General Network
    Error".


    "Tom Kaminski [MVP]" <tomk (A@T) mvps (D.O.T) org> wrote in message
    news:...
    > "James" <> wrote in message
    > news:#...
    > > I've been having this recurring General Network Error problem and I've

    > been
    > > looking to solve it. Reboot fixes the problem for several hours, but
    > > eventually it happens again. Nothing seems to specifically trigger it.
    > > HTML loads fine, ASP pages that connect to SQL Server, no dice.
    > >
    > > Long story short, it happened about 15 minutes ago and one of the pages

    > that
    > > connects to SQL Server worked, but none of the other ones would. The

    page
    > > in question is also the only page that has Data Source = IP Address.

    All
    > of
    > > the others refer to a machine name. Could this be the cause of the

    > problem?
    > > Before I change it system-wide, I want to be relatively certain it could

    > be
    > > the cause.
    > >
    > > Any ideas?

    >
    > Hard to offer any ideas without knowing the exact error message ...
    >
    >
     
    James, Feb 14, 2005
    #4
  5. James

    James Guest

    I'm not really a SQL guru. Any idea how I can check to see if Connection
    Pooling is enabled/disabled? I read that article and some of it makes
    sense, but it just seems to say "here's the possible problem" without a
    solution. I am 99% certain that there isn't any code that explictly
    disables connection pooling. I'm not sure if this is a setting I need to
    explicitly enable within code or it's something I need to handle on the
    server.

    Thanks

    "Bob Barrows [MVP]" <> wrote in message
    news:%...
    > James wrote:
    > > I've been having this recurring General Network Error problem and
    > > I've been looking to solve it. Reboot fixes the problem for several
    > > hours, but eventually it happens again. Nothing seems to
    > > specifically trigger it. HTML loads fine, ASP pages that connect to
    > > SQL Server, no dice.
    > >
    > > Long story short, it happened about 15 minutes ago and one of the
    > > pages that connects to SQL Server worked, but none of the other ones
    > > would. The page in question is also the only page that has Data
    > > Source = IP Address. All of the others refer to a machine name.
    > > Could this be the cause of the problem? Before I change it
    > > system-wide, I want to be relatively certain it could be the cause.
    > >
    > > Any ideas?
    > >
    > > Thanks!
    > > James

    >
    > It sounds as if you may be disabling session/connection pooling:
    > http://support.microsoft.com/?kbid=328476
    >
    > You should be striving to make all your connection strings the same. Also,
    > avoid situations that cause implicit connections to be used:
    > http://support.microsoft.com/?kbid=271128
    >
    > That means always using explicit connection objects, never doing things
    > like:
    >
    > strconn="provider=..."
    > rs.open sqlstring,strconn
    > instead, use
    > set conn=createobject("adodb.connection")
    > rs.open sqlstring,conn,,,1
    > or
    > set rs=conn.execute(sqlstring,,1)
    >
    > or
    >
    > cmd.activeconnection = conn (this causes a new implicit connection)
    > use this to cause an existing connection object to be used:
    > set cmd.activeconnection = conn
    >
    > Bob Barrows
    >
    > --
    > Microsoft MVP -- ASP/ASP.NET
    > Please reply to the newsgroup. The email account listed in my From
    > header is my spam trap, so I don't check it very often. You will get a
    > quicker response by posting to the newsgroup.
    >
    >
     
    James, Feb 14, 2005
    #5
  6. James

    Patrice Guest

    It looks like a problem with name resolution as the page with the IP works
    while those with the name fails....

    Though it could be a workaround (they don't share all the same connection
    string ?), it could worth to see if the server that resolves the name works
    always fine or had a problem...

    Patrice



    --

    "James" <> a écrit dans le message de
    news:%...
    > I've been having this recurring General Network Error problem and I've

    been
    > looking to solve it. Reboot fixes the problem for several hours, but
    > eventually it happens again. Nothing seems to specifically trigger it.
    > HTML loads fine, ASP pages that connect to SQL Server, no dice.
    >
    > Long story short, it happened about 15 minutes ago and one of the pages

    that
    > connects to SQL Server worked, but none of the other ones would. The page
    > in question is also the only page that has Data Source = IP Address. All

    of
    > the others refer to a machine name. Could this be the cause of the

    problem?
    > Before I change it system-wide, I want to be relatively certain it could

    be
    > the cause.
    >
    > Any ideas?
    >
    > Thanks!
    > James
    >
    >
     
    Patrice, Feb 14, 2005
    #6
  7. It's not really a SQL issue: it's an ADO/OLE DB issue.

    With ASP, pooling is on by default. You pretty much have to jump through
    hoops to turn it off (as long as you avoid the bad programming practices I
    described in my first reply).

    With SQL Server, you can use SQL Profiler to determine whether pooling is
    being used. The thing to look for is calls to sp_reset_connection. If you
    see this call, connections are being reused. (If you don't see any calls to
    sp_reset_connection, you really don't have any pooling - or connections
    occur less than once a minute.)

    Bob Barrows

    James wrote:
    > I'm not really a SQL guru. Any idea how I can check to see if
    > Connection Pooling is enabled/disabled? I read that article and some
    > of it makes sense, but it just seems to say "here's the possible
    > problem" without a solution. I am 99% certain that there isn't any
    > code that explictly disables connection pooling. I'm not sure if
    > this is a setting I need to explicitly enable within code or it's
    > something I need to handle on the server.
    >
    > Thanks
    >
    > "Bob Barrows [MVP]" <> wrote in message
    > news:%...
    >> James wrote:
    >>> I've been having this recurring General Network Error problem and
    >>> I've been looking to solve it. Reboot fixes the problem for several
    >>> hours, but eventually it happens again. Nothing seems to
    >>> specifically trigger it. HTML loads fine, ASP pages that connect to
    >>> SQL Server, no dice.
    >>>
    >>> Long story short, it happened about 15 minutes ago and one of the
    >>> pages that connects to SQL Server worked, but none of the other ones
    >>> would. The page in question is also the only page that has Data
    >>> Source = IP Address. All of the others refer to a machine name.
    >>> Could this be the cause of the problem? Before I change it
    >>> system-wide, I want to be relatively certain it could be the cause.
    >>>
    >>> Any ideas?
    >>>
    >>> Thanks!
    >>> James

    >>
    >> It sounds as if you may be disabling session/connection pooling:
    >> http://support.microsoft.com/?kbid=328476
    >>
    >> You should be striving to make all your connection strings the same.
    >> Also, avoid situations that cause implicit connections to be used:
    >> http://support.microsoft.com/?kbid=271128
    >>
    >> That means always using explicit connection objects, never doing
    >> things like:
    >>
    >> strconn="provider=..."
    >> rs.open sqlstring,strconn
    >> instead, use
    >> set conn=createobject("adodb.connection")
    >> rs.open sqlstring,conn,,,1
    >> or
    >> set rs=conn.execute(sqlstring,,1)
    >>
    >> or
    >>
    >> cmd.activeconnection = conn (this causes a new implicit connection)
    >> use this to cause an existing connection object to be used:
    >> set cmd.activeconnection = conn
    >>
    >> Bob Barrows
    >>
    >> --
    >> Microsoft MVP -- ASP/ASP.NET
    >> Please reply to the newsgroup. The email account listed in my From
    >> header is my spam trap, so I don't check it very often. You will get
    >> a quicker response by posting to the newsgroup.


    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.
     
    Bob Barrows [MVP], Feb 14, 2005
    #7
  8. James

    io Guest

    G'day James,

    Looks like name resolution service goes off spontaneously. I think you are
    quite safe to do what you already suggested - use IP address for Data
    Source. If you feel like fixing it properly you better bug your sys/network
    admin.

    Cheers

    "James" <> wrote in message
    news:#...
    > I've been having this recurring General Network Error problem and I've

    been
    > looking to solve it. Reboot fixes the problem for several hours, but
    > eventually it happens again. Nothing seems to specifically trigger it.
    > HTML loads fine, ASP pages that connect to SQL Server, no dice.
    >
    > Long story short, it happened about 15 minutes ago and one of the pages

    that
    > connects to SQL Server worked, but none of the other ones would. The page
    > in question is also the only page that has Data Source = IP Address. All

    of
    > the others refer to a machine name. Could this be the cause of the

    problem?
    > Before I change it system-wide, I want to be relatively certain it could

    be
    > the cause.
    >
    > Any ideas?
    >
    > Thanks!
    > James
    >
    >
     
    io, Feb 15, 2005
    #8
  9. James

    James Guest

    That's certainly what it seems like to me. We never had this problem before
    (used to use DSNs). We spent the past several months reorganizing our
    database/code to a much more efficient structure. Per several suggestions,
    we changed the connections away from DSNs and this problem began.

    I've changed all of the connection strings to reference the IP address of
    the SQL Server. So far, so good...but it's only been about 12 hours.

    Thanks for all the help, hopefully this is resolved now. ::knock on wood::

    James

    "io" <> wrote in message
    news:OvIpc%...
    > G'day James,
    >
    > Looks like name resolution service goes off spontaneously. I think you are
    > quite safe to do what you already suggested - use IP address for Data
    > Source. If you feel like fixing it properly you better bug your

    sys/network
    > admin.
    >
    > Cheers
    >
    > "James" <> wrote in message
    > news:#...
    > > I've been having this recurring General Network Error problem and I've

    > been
    > > looking to solve it. Reboot fixes the problem for several hours, but
    > > eventually it happens again. Nothing seems to specifically trigger it.
    > > HTML loads fine, ASP pages that connect to SQL Server, no dice.
    > >
    > > Long story short, it happened about 15 minutes ago and one of the pages

    > that
    > > connects to SQL Server worked, but none of the other ones would. The

    page
    > > in question is also the only page that has Data Source = IP Address.

    All
    > of
    > > the others refer to a machine name. Could this be the cause of the

    > problem?
    > > Before I change it system-wide, I want to be relatively certain it could

    > be
    > > the cause.
    > >
    > > Any ideas?
    > >
    > > Thanks!
    > > James
    > >
    > >

    >
    >
     
    James, Feb 15, 2005
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ken Varn
    Replies:
    4
    Views:
    409
    Joseph James
    Jan 19, 2005
  2. Siva
    Replies:
    1
    Views:
    1,320
    Jeff Dillon
    Apr 24, 2006
  3. Author Tarun Tyagi
    Replies:
    0
    Views:
    727
    Author Tarun Tyagi
    Dec 29, 2004
  4. Burak Gunay
    Replies:
    0
    Views:
    775
    Burak Gunay
    Jun 14, 2006
  5. Allan Ebdrup
    Replies:
    2
    Views:
    485
    Allan Ebdrup
    Oct 6, 2006
Loading...

Share This Page