Discussion:
EAServer and ASA11 -- connection cache question
(too old to reply)
forums.sybase.com
2009-12-10 18:48:46 UTC
Permalink
Our web application has a web server and database server. Both use Windows
2003. The web server has EAS 5.1 and components written in PB9.0.3. The db
server uses ASA 11.0.1. The two communicate with one another via a
connection case in EAServer.

Sometimes it is necessary to drop a connection in Sybase Central on the
database server. For example, we recently had a problem with an index which
I tried to rebuild. However, a table lock prevented me from doing so.
Killing the connection allowed me to rebuild the index which worked fine.
However, I've discovered that when dropping a connection in Sybase Central,
our web application begins to act very erratically and the following error
appears repeatedly in the Jag log:

cm__odbc_error: SQLError: -308, SQLState: HY000, [Sybase][ODBC Driver][SQL
Anywhere]Connection was terminated.

When this happens, it is necessary to restart the Jaguar service to get the
web app working normally again. I've been able to replicate the problem on
our development server even when the index is ok so it seems that the
connection cache is really sensitive to disconnects. Has anyonw else
experienced this problem? Is there a setting/option in either the
connection cache or EAS that would prevent this from happening?

Thanks, Tom
Alex Whitney
2009-12-10 23:16:41 UTC
Permalink
Do you have the 'Enable connection sanity check' option enabled for the
cache? This will cause the cache to test the connection before reusing it.

Alex
Post by forums.sybase.com
Our web application has a web server and database server. Both use
Windows 2003. The web server has EAS 5.1 and components written in
PB9.0.3. The db server uses ASA 11.0.1. The two communicate with one
another via a connection case in EAServer.
Sometimes it is necessary to drop a connection in Sybase Central on the
database server. For example, we recently had a problem with an index
which I tried to rebuild. However, a table lock prevented me from doing
so. Killing the connection allowed me to rebuild the index which worked
fine. However, I've discovered that when dropping a connection in Sybase
Central, our web application begins to act very erratically and the
cm__odbc_error: SQLError: -308, SQLState: HY000, [Sybase][ODBC Driver][SQL
Anywhere]Connection was terminated.
When this happens, it is necessary to restart the Jaguar service to get
the web app working normally again. I've been able to replicate the
problem on our development server even when the index is ok so it seems
that the connection cache is really sensitive to disconnects. Has anyonw
else experienced this problem? Is there a setting/option in either the
connection cache or EAS that would prevent this from happening?
Thanks, Tom
Libby
2009-12-11 05:44:06 UTC
Permalink
Yes, this option is checked. Tom
Post by Alex Whitney
Do you have the 'Enable connection sanity check' option enabled for the
cache? This will cause the cache to test the connection before reusing it.
Alex
Post by forums.sybase.com
Our web application has a web server and database server. Both use
Windows 2003. The web server has EAS 5.1 and components written in
PB9.0.3. The db server uses ASA 11.0.1. The two communicate with one
another via a connection case in EAServer.
Sometimes it is necessary to drop a connection in Sybase Central on the
database server. For example, we recently had a problem with an index
which I tried to rebuild. However, a table lock prevented me from doing
so. Killing the connection allowed me to rebuild the index which worked
fine. However, I've discovered that when dropping a connection in Sybase
Central, our web application begins to act very erratically and the
cm__odbc_error: SQLError: -308, SQLState: HY000, [Sybase][ODBC
Driver][SQL Anywhere]Connection was terminated.
When this happens, it is necessary to restart the Jaguar service to get
the web app working normally again. I've been able to replicate the
problem on our development server even when the index is ok so it seems
that the connection cache is really sensitive to disconnects. Has anyonw
else experienced this problem? Is there a setting/option in either the
connection cache or EAS that would prevent this from happening?
Thanks, Tom
Alex Whitney
2009-12-11 20:25:35 UTC
Permalink
what options do you have set in the dbparm string when you connect to the
database? Do you have UseContextObject set?

Alex
Post by Libby
Yes, this option is checked. Tom
Post by Alex Whitney
Do you have the 'Enable connection sanity check' option enabled for the
cache? This will cause the cache to test the connection before reusing it.
Alex
Post by forums.sybase.com
Our web application has a web server and database server. Both use
Windows 2003. The web server has EAS 5.1 and components written in
PB9.0.3. The db server uses ASA 11.0.1. The two communicate with one
another via a connection case in EAServer.
Sometimes it is necessary to drop a connection in Sybase Central on the
database server. For example, we recently had a problem with an index
which I tried to rebuild. However, a table lock prevented me from doing
so. Killing the connection allowed me to rebuild the index which worked
fine. However, I've discovered that when dropping a connection in Sybase
Central, our web application begins to act very erratically and the
cm__odbc_error: SQLError: -308, SQLState: HY000, [Sybase][ODBC
Driver][SQL Anywhere]Connection was terminated.
When this happens, it is necessary to restart the Jaguar service to get
the web app working normally again. I've been able to replicate the
problem on our development server even when the index is ok so it seems
that the connection cache is really sensitive to disconnects. Has
anyonw else experienced this problem? Is there a setting/option in
either the connection cache or EAS that would prevent this from
happening?
Thanks, Tom
Tom Rolseth
2009-12-11 21:20:43 UTC
Permalink
We have the following in our dbparm string:
"UseContextObject='Yes',CacheName='xyz'", nothing else

Doesn't sanity check try to re-establish the connection if it detects one
has failed? It doesn't seem to be handling this correctly based on what
I've read. Maybe this is a bug in EAS 5.2?

Tom
Post by Alex Whitney
what options do you have set in the dbparm string when you connect to the
database? Do you have UseContextObject set?
Alex
Post by Libby
Yes, this option is checked. Tom
Post by Alex Whitney
Do you have the 'Enable connection sanity check' option enabled for the
cache? This will cause the cache to test the connection before reusing it.
Alex
Post by forums.sybase.com
Our web application has a web server and database server. Both use
Windows 2003. The web server has EAS 5.1 and components written in
PB9.0.3. The db server uses ASA 11.0.1. The two communicate with one
another via a connection case in EAServer.
Sometimes it is necessary to drop a connection in Sybase Central on the
database server. For example, we recently had a problem with an index
which I tried to rebuild. However, a table lock prevented me from
doing so. Killing the connection allowed me to rebuild the index which
worked fine. However, I've discovered that when dropping a connection
in Sybase Central, our web application begins to act very erratically
cm__odbc_error: SQLError: -308, SQLState: HY000, [Sybase][ODBC
Driver][SQL Anywhere]Connection was terminated.
When this happens, it is necessary to restart the Jaguar service to get
the web app working normally again. I've been able to replicate the
problem on our development server even when the index is ok so it seems
that the connection cache is really sensitive to disconnects. Has
anyonw else experienced this problem? Is there a setting/option in
either the connection cache or EAS that would prevent this from
happening?
Thanks, Tom
Alex Whitney
2009-12-14 19:29:40 UTC
Permalink
In our environment, dropping a connection does not cause any issues. We are
on EAS 5.1 buld 51016

Our connect string looks like yours.

what is your sanity check statement set to?

from the props file for your connection cache:
com.sybase.jaguar.conncache.check=select 1 from dummy


Alex
Post by Tom Rolseth
"UseContextObject='Yes',CacheName='xyz'", nothing else
Doesn't sanity check try to re-establish the connection if it detects one
has failed? It doesn't seem to be handling this correctly based on what
I've read. Maybe this is a bug in EAS 5.2?
Tom
Post by Alex Whitney
what options do you have set in the dbparm string when you connect to the
database? Do you have UseContextObject set?
Alex
Post by Libby
Yes, this option is checked. Tom
Post by Alex Whitney
Do you have the 'Enable connection sanity check' option enabled for the
cache? This will cause the cache to test the connection before reusing it.
Alex
Post by forums.sybase.com
Our web application has a web server and database server. Both use
Windows 2003. The web server has EAS 5.1 and components written in
PB9.0.3. The db server uses ASA 11.0.1. The two communicate with one
another via a connection case in EAServer.
Sometimes it is necessary to drop a connection in Sybase Central on
the database server. For example, we recently had a problem with an
index which I tried to rebuild. However, a table lock prevented me
from doing so. Killing the connection allowed me to rebuild the index
which worked fine. However, I've discovered that when dropping a
connection in Sybase Central, our web application begins to act very
cm__odbc_error: SQLError: -308, SQLState: HY000, [Sybase][ODBC
Driver][SQL Anywhere]Connection was terminated.
When this happens, it is necessary to restart the Jaguar service to
get the web app working normally again. I've been able to replicate
the problem on our development server even when the index is ok so it
seems that the connection cache is really sensitive to disconnects.
Has anyonw else experienced this problem? Is there a setting/option
in either the connection cache or EAS that would prevent this from
happening?
Thanks, Tom
forums.sybase.com
2009-12-11 15:18:47 UTC
Permalink
I tried turning sanity check off but ran into the same problem with our web
application -- pages not rendering properly, items disappearing, fonts and
colors changing, etc. Our web app has a unique look and feel for each
client that uses it and the settings that control this branding are all
stored in the database.

The one thing that was different is that with sanity check off, it didn't
check for the dropped connection and therefore an odbc error did not show up
in the jaguar log.

Tom
Post by Alex Whitney
Do you have the 'Enable connection sanity check' option enabled for the
cache? This will cause the cache to test the connection before reusing it.
Alex
Post by forums.sybase.com
Our web application has a web server and database server. Both use
Windows 2003. The web server has EAS 5.1 and components written in
PB9.0.3. The db server uses ASA 11.0.1. The two communicate with one
another via a connection case in EAServer.
Sometimes it is necessary to drop a connection in Sybase Central on the
database server. For example, we recently had a problem with an index
which I tried to rebuild. However, a table lock prevented me from doing
so. Killing the connection allowed me to rebuild the index which worked
fine. However, I've discovered that when dropping a connection in Sybase
Central, our web application begins to act very erratically and the
cm__odbc_error: SQLError: -308, SQLState: HY000, [Sybase][ODBC
Driver][SQL Anywhere]Connection was terminated.
When this happens, it is necessary to restart the Jaguar service to get
the web app working normally again. I've been able to replicate the
problem on our development server even when the index is ok so it seems
that the connection cache is really sensitive to disconnects. Has anyonw
else experienced this problem? Is there a setting/option in either the
connection cache or EAS that would prevent this from happening?
Thanks, Tom
Mark Maslow
2009-12-14 18:40:25 UTC
Permalink
Do you have stateful components that connect to the DB? If the
component disconnects from the cache before deactivating, the next time
it needs a connection, sanity check should handle reconnecting. But if
the component never disconnects from the cache, sanity checking isn't
going to be of any help.
Post by forums.sybase.com
Our web application has a web server and database server. Both use Windows
2003. The web server has EAS 5.1 and components written in PB9.0.3. The db
server uses ASA 11.0.1. The two communicate with one another via a
connection case in EAServer.
Sometimes it is necessary to drop a connection in Sybase Central on the
database server. For example, we recently had a problem with an index which
I tried to rebuild. However, a table lock prevented me from doing so.
Killing the connection allowed me to rebuild the index which worked fine.
However, I've discovered that when dropping a connection in Sybase Central,
our web application begins to act very erratically and the following error
cm__odbc_error: SQLError: -308, SQLState: HY000, [Sybase][ODBC Driver][SQL
Anywhere]Connection was terminated.
When this happens, it is necessary to restart the Jaguar service to get the
web app working normally again. I've been able to replicate the problem on
our development server even when the index is ok so it seems that the
connection cache is really sensitive to disconnects. Has anyonw else
experienced this problem? Is there a setting/option in either the
connection cache or EAS that would prevent this from happening?
Loading...