Discussion:
Getting intermittant -308 errors
(too old to reply)
Mike Niemann
2007-07-06 13:46:49 UTC
Permalink
We have many customers with our application (which uses ASA 8.0.3, with no
replication). At one site, we are getting intermittant -308 errors.

I'm not sure what would cause a -308, but my immediate guess was perhaps a
deadlock was detected (we are multi-user), and the connection is being
terminated by the server. However, we have been unable to confirm this...
perhaps there is a magical command line setting that allows us to trace
things like this.

Some web reseach indicates that perhaps the Prefetch Buffer could cause -308
errors. We are attempting to adjust the ODBC connection with "PBUF=512", but
won't know if there will be an impact for a while.

Does anyone have experience with intermittant -308 errors, what can cause
them, how to track the problem, and how to resolve the problem?

Fortunately, we have not heard about this issue from our other customers.
<g>

Regards,
Mike Niemann
Paul Horan[TeamSybase]
2007-07-06 14:18:38 UTC
Permalink
Mike,
-308's are just "Connection was dropped"... It could be something as simple
as a faulty NIC in the server.
If you want to trace network connection issues, add the -z switch to your
server commandline. Probably a good idea to add -o to create an output log
file as well.

Your app is in PowerBuilder, right? In my previous PB9/ASA9 work, we would
set PBUF=4096;PROWS=1000 on the client ODBC profiles. I don't think that
had anything to do with solving intermittent connection issues, but it made
datawindow-based retrievals perform better.

Paul Horan[TeamSybase]
Post by Mike Niemann
We have many customers with our application (which uses ASA 8.0.3, with no
replication). At one site, we are getting intermittant -308 errors.
I'm not sure what would cause a -308, but my immediate guess was perhaps a
deadlock was detected (we are multi-user), and the connection is being
terminated by the server. However, we have been unable to confirm this...
perhaps there is a magical command line setting that allows us to trace
things like this.
Some web reseach indicates that perhaps the Prefetch Buffer could
cause -308 errors. We are attempting to adjust the ODBC connection with
"PBUF=512", but won't know if there will be an impact for a while.
Does anyone have experience with intermittant -308 errors, what can cause
them, how to track the problem, and how to resolve the problem?
Fortunately, we have not heard about this issue from our other customers.
<g>
Regards,
Mike Niemann
Mike Niemann
2007-07-06 14:44:24 UTC
Permalink
Paul,

Thanks for responding.

We used the -z -o filename... but there was nothing present except
connections, no errors, no disconnects, no -308's. I briefly tried -zr all,
but that pretty much brought the server to its knees. So I just used the
"Display debugging information in a log file" setting on the ODBC Advanced
settings tab... it seems to hold promise.

From Online Books: SQLCode = -308 => Your database connection has been
terminated and your transaction has been rolled back. The connection may
have been terminated because a DBA executed a DROP CONNECTION statement, or
because the database server was shut down, or because your network
connection to the database server was interrupted.

In our situation, the DBA didn't, and the database wasn't. Obviously
"interupted" can mean many things... that is why I asked. If a deadlock is
detected, is not the unlucky connection disconnected?

PowerBuilder, yes. OK, so the Prefetch Buffer settings will only make things
faster... oh well. <g>

Regards,
Mike Niemann
Post by Paul Horan[TeamSybase]
Mike,
-308's are just "Connection was dropped"... It could be something as
simple as a faulty NIC in the server.
If you want to trace network connection issues, add the -z switch to your
server commandline. Probably a good idea to add -o to create an output
log file as well.
Your app is in PowerBuilder, right? In my previous PB9/ASA9 work, we
would set PBUF=4096;PROWS=1000 on the client ODBC profiles. I don't think
that had anything to do with solving intermittent connection issues, but
it made datawindow-based retrievals perform better.
Paul Horan[TeamSybase]
Post by Mike Niemann
We have many customers with our application (which uses ASA 8.0.3, with
no replication). At one site, we are getting intermittant -308 errors.
I'm not sure what would cause a -308, but my immediate guess was perhaps
a deadlock was detected (we are multi-user), and the connection is being
terminated by the server. However, we have been unable to confirm this...
perhaps there is a magical command line setting that allows us to trace
things like this.
Some web reseach indicates that perhaps the Prefetch Buffer could
cause -308 errors. We are attempting to adjust the ODBC connection with
"PBUF=512", but won't know if there will be an impact for a while.
Does anyone have experience with intermittant -308 errors, what can cause
them, how to track the problem, and how to resolve the problem?
Fortunately, we have not heard about this issue from our other customers.
<g>
Regards,
Mike Niemann
Jeff Albion (iAnywhere Solutions)
2007-07-06 15:33:17 UTC
Permalink
Mike

"Deadlock Detected" should be reported as SQLCODE -306, not -308. The
-308 error code indicates there's a connection-based issue. Provided you
aren't DROP CONNECTIONing or shutting down the database, it's most
likely a network-level connectivity issue and you'll probably need the
involvement of your IT department to help debug the issue.

You'll probably need to go the "-z -o output.txt" route and check which
connection / client is having the issue when you get the -308, and then
debug from there.

I checked to see if there were any related engineering cases, but I
couldn't see any. There was a bug in 8.0.2 related to -308 errors
(#353336), but if you're on 8.0.3, it would have been fixed.

Regards,
--
Jeff Albion, Product Support Analyst
iAnywhere Solutions

iAnywhere Developer Community : http://www.ianywhere.com/developer
iAnywhere Documentation : http://www.ianywhere.com/developer/product_manuals
ASA Patches and EBFs :
http://downloads.sybase.com/swd/summary.do?baseprod=144&client=ianywhere&timeframe=0
Post by Mike Niemann
Paul,
Thanks for responding.
We used the -z -o filename... but there was nothing present except
connections, no errors, no disconnects, no -308's. I briefly tried -zr all,
but that pretty much brought the server to its knees. So I just used the
"Display debugging information in a log file" setting on the ODBC Advanced
settings tab... it seems to hold promise.
From Online Books: SQLCode = -308 => Your database connection has been
terminated and your transaction has been rolled back. The connection may
have been terminated because a DBA executed a DROP CONNECTION statement, or
because the database server was shut down, or because your network
connection to the database server was interrupted.
In our situation, the DBA didn't, and the database wasn't. Obviously
"interupted" can mean many things... that is why I asked. If a deadlock is
detected, is not the unlucky connection disconnected?
PowerBuilder, yes. OK, so the Prefetch Buffer settings will only make things
faster... oh well. <g>
Regards,
Mike Niemann
Post by Paul Horan[TeamSybase]
Mike,
-308's are just "Connection was dropped"... It could be something as
simple as a faulty NIC in the server.
If you want to trace network connection issues, add the -z switch to your
server commandline. Probably a good idea to add -o to create an output
log file as well.
Your app is in PowerBuilder, right? In my previous PB9/ASA9 work, we
would set PBUF=4096;PROWS=1000 on the client ODBC profiles. I don't think
that had anything to do with solving intermittent connection issues, but
it made datawindow-based retrievals perform better.
Paul Horan[TeamSybase]
Post by Mike Niemann
We have many customers with our application (which uses ASA 8.0.3, with
no replication). At one site, we are getting intermittant -308 errors.
I'm not sure what would cause a -308, but my immediate guess was perhaps
a deadlock was detected (we are multi-user), and the connection is being
terminated by the server. However, we have been unable to confirm this...
perhaps there is a magical command line setting that allows us to trace
things like this.
Some web reseach indicates that perhaps the Prefetch Buffer could
cause -308 errors. We are attempting to adjust the ODBC connection with
"PBUF=512", but won't know if there will be an impact for a while.
Does anyone have experience with intermittant -308 errors, what can cause
them, how to track the problem, and how to resolve the problem?
Fortunately, we have not heard about this issue from our other customers.
<g>
Regards,
Mike Niemann
Mike Niemann
2007-07-06 15:38:58 UTC
Permalink
Thanks you Jeff.

Kind Regards,
Mike Niemann
Mike
"Deadlock Detected" should be reported as SQLCODE -306, not -308. The -308
error code indicates there's a connection-based issue. Provided you aren't
DROP CONNECTIONing or shutting down the database, it's most likely a
network-level connectivity issue and you'll probably need the involvement
of your IT department to help debug the issue.
You'll probably need to go the "-z -o output.txt" route and check which
connection / client is having the issue when you get the -308, and then
debug from there.
I checked to see if there were any related engineering cases, but I
couldn't see any. There was a bug in 8.0.2 related to -308 errors
(#353336), but if you're on 8.0.3, it would have been fixed.
Regards,
--
Jeff Albion, Product Support Analyst
iAnywhere Solutions
iAnywhere Developer Community : http://www.ianywhere.com/developer
http://www.ianywhere.com/developer/product_manuals
http://downloads.sybase.com/swd/summary.do?baseprod=144&client=ianywhere&timeframe=0
Post by Mike Niemann
Paul,
Thanks for responding.
We used the -z -o filename... but there was nothing present except
connections, no errors, no disconnects, no -308's. I briefly tried -zr
all, but that pretty much brought the server to its knees. So I just used
the "Display debugging information in a log file" setting on the ODBC
Advanced settings tab... it seems to hold promise.
From Online Books: SQLCode = -308 => Your database connection has been
terminated and your transaction has been rolled back. The connection may
have been terminated because a DBA executed a DROP CONNECTION statement,
or because the database server was shut down, or because your network
connection to the database server was interrupted.
In our situation, the DBA didn't, and the database wasn't. Obviously
"interupted" can mean many things... that is why I asked. If a deadlock
is detected, is not the unlucky connection disconnected?
PowerBuilder, yes. OK, so the Prefetch Buffer settings will only make
things faster... oh well. <g>
Regards,
Mike Niemann
Post by Paul Horan[TeamSybase]
Mike,
-308's are just "Connection was dropped"... It could be something as
simple as a faulty NIC in the server.
If you want to trace network connection issues, add the -z switch to
your server commandline. Probably a good idea to add -o to create an
output log file as well.
Your app is in PowerBuilder, right? In my previous PB9/ASA9 work, we
would set PBUF=4096;PROWS=1000 on the client ODBC profiles. I don't
think that had anything to do with solving intermittent connection
issues, but it made datawindow-based retrievals perform better.
Paul Horan[TeamSybase]
Post by Mike Niemann
We have many customers with our application (which uses ASA 8.0.3, with
no replication). At one site, we are getting intermittant -308 errors.
I'm not sure what would cause a -308, but my immediate guess was
perhaps a deadlock was detected (we are multi-user), and the connection
is being terminated by the server. However, we have been unable to
confirm this... perhaps there is a magical command line setting that
allows us to trace things like this.
Some web reseach indicates that perhaps the Prefetch Buffer could
cause -308 errors. We are attempting to adjust the ODBC connection with
"PBUF=512", but won't know if there will be an impact for a while.
Does anyone have experience with intermittant -308 errors, what can
cause them, how to track the problem, and how to resolve the problem?
Fortunately, we have not heard about this issue from our other
customers. <g>
Regards,
Mike Niemann
Paul Horan[TeamSybase]
2007-07-06 15:35:46 UTC
Permalink
Post by Mike Niemann
Paul,
Thanks for responding.
We used the -z -o filename... but there was nothing present except
connections, no errors, no disconnects, no -308's. I briefly tried -zr
all, but that pretty much brought the server to its knees. So I just used
the "Display debugging information in a log file" setting on the ODBC
Advanced settings tab... it seems to hold promise.
The tracing/debugging options available in 9.0.2 are significantly enhanced
over 8.x. And they're even better in 10...
Post by Mike Niemann
From Online Books: SQLCode = -308 => Your database connection has been
terminated and your transaction has been rolled back. The connection may
have been terminated because a DBA executed a DROP CONNECTION statement,
or because the database server was shut down, or because your network
connection to the database server was interrupted.
Liveness or idle timeouts, perhaps? In the ASA7 days, we had problems with
liveness pings (which are defaulted to 120 seconds) getting swallowed if the
user initiated a query that ran longer than two minutes before starting to
return the result set. Yeah, bad form for writing lousy queries, but we had
to bump that up until we redesigned that particular report. The server
wouldn't get that client's liveness ping, and it would drop the connection.
This was not a problem in 9 (we jumped over 8.x altogether).
Post by Mike Niemann
In our situation, the DBA didn't, and the database wasn't. Obviously
"interupted" can mean many things... that is why I asked. If a deadlock is
detected, is not the unlucky connection disconnected?
I wouldn't think that a deadlock would kill the entire CONNECTION, it would
just rollback one of the involved transactions, according to some
"importance" algorithm. The connection would remain intact...
Post by Mike Niemann
PowerBuilder, yes. OK, so the Prefetch Buffer settings will only make
things faster... oh well. <g>
For datawindow-based queries only. They use cursors under the covers, and
love a big pre-fetch buffer.
Post by Mike Niemann
Regards,
Mike Niemann
Loading...