Apache::DBI with Sybase - What's wrong?

2000-05-12 Thread Graf, Chris


It seems that once processes start getting reused, I wind up with a ton of
DB error messages in my error_log. 

They seem to start like this:

ct_cmd_alloc failed at
/usr/local/lib/perl5/site_perl/5.005/sun4-solaris/DBD/Sybase.pm line 159.
DBD::Sybase::db ping failed: OpenClient message: LAYER = (5) ORIGIN = (3)
SEVERITY = (5) NUMBER = (6)
Message String: ct_cancel(): network packet layer: internal net library
error: Net-Library operation terminated due to disconnect

Then a whole host of these start popping up:

DBD::Sybase::db ping failed: OpenClient message: LAYER = (1) ORIGIN = (1)
SEVERITY = (1) NUMBER = (60)
Message String: ct_cancel(CONN,ALL): user api layer: external error: There
is a usage error.  This routine has been called at an illegal time.

OpenClient message: LAYER = (1) ORIGIN = (1) SEVERITY = (1) NUMBER = (60)
Message String: ct_close(FORCE): user api layer: external error: There is a
usage error.  This routine has been called at an illegal time.



What is happening on the user end at this time - 500s? Any insight would be
incredibly helpful at this point.


Thanks

Chris





Re: Apache::DBI with Sybase - What's wrong?

2000-05-12 Thread Michael Peppler

Graf, Chris writes:
  
  It seems that once processes start getting reused, I wind up with a ton of
  DB error messages in my error_log. 
  
  They seem to start like this:
  
  ct_cmd_alloc failed at
  /usr/local/lib/perl5/site_perl/5.005/sun4-solaris/DBD/Sybase.pm line 159.
  DBD::Sybase::db ping failed: OpenClient message: LAYER = (5) ORIGIN = (3)
  SEVERITY = (5) NUMBER = (6)
  Message String: ct_cancel(): network packet layer: internal net library
  error: Net-Library operation terminated due to disconnect

I'm not familiar with Apache::DBI, so I don't know exactly in what
situation it calls ping()... In this case it looks like ping fails (ie 
the connection to the server has been killed) but the sequence of
calls that follow is incorrect.

  What is happening on the user end at this time - 500s? Any insight would be
  incredibly helpful at this point.

I think there's a good chance of 500s, but maybe not. It's possible
that these are internal warnings, and that the initial failed ping()
causes a database reconnect and that things continue cleanly...

Michael
-- 
Michael Peppler -||-  Data Migrations Inc.
[EMAIL PROTECTED]-||-  http://www.mbay.net/~mpeppler
Int. Sybase User Group  -||-  http://www.isug.com
Sybase on Linux mailing list: [EMAIL PROTECTED]



RE: Apache::DBI with Sybase - What's wrong?

2000-05-12 Thread Graf, Chris

Thanks Michael. 

If anyone can explain a little better what Apache::DBI and mod_perl are
doing, or should be doing at this point, that may be helpful. I have been
testing a little more and found that no errors will appear unless I am
actually doing something with the connections. If I just initiate the
persistent connections the first time the scripts run, and never touch them,
they appear to stay alive (or at least restart properly) without generating
errors. 

If I do queries against the connections, they will start to generate these
errors starting about 15 mins after Apache startup (with about 100-150 httpd
processes running at any given time). The errors will become more and more
frequent after they start, which leads me to believe that when the
connection goes bad in an httpd process, it doesn't correct itself. I also
have two other Apache::DBI connections to a MySQL server running in the same
connect sub which never have a problem. 

Here is the exact complete error log in sequence from the time I started
Apache until I shut it down. The first error appeared about 15 mins after
restart. The rest happened within about a minute after the first one. 

--- Apache startup 

ct_cmd_alloc failed at /home/httpd/uoboards/cgi-bin/w3t.pm line 1322.
DBD::Sybase::st execute failed: OpenClient message: LAYER = (1) ORIGIN = (1)
SEVERITY = (1) NUMBER = (50)
Message String: ct_cmd_alloc(): user api layer: external error: The
connection has been marked dead.

ct_cmd_alloc failed at
/usr/local/lib/perl5/site_perl/5.005/sun4-solaris/DBD/Sybase.pm line 159.
DBD::Sybase::db ping failed: OpenClient message: LAYER = (5) ORIGIN = (3)
SEVERITY = (5) NUMBER = (6)
Message String: ct_cancel(): network packet layer: internal net library
error: Net-Library operation terminated due to disconnect

ct_cmd_alloc failed at
/usr/local/lib/perl5/site_perl/5.005/sun4-solaris/DBD/Sybase.pm line 159.
DBD::Sybase::db ping failed: OpenClient message: LAYER = (5) ORIGIN = (3)
SEVERITY = (5) NUMBER = (6)
Message String: ct_cancel(): network packet layer: internal net library
error: Net-Library operation terminated due to disconnect

ct_cmd_alloc failed at
/usr/local/lib/perl5/site_perl/5.005/sun4-solaris/DBD/Sybase.pm line 159.
DBD::Sybase::db ping failed: OpenClient message: LAYER = (5) ORIGIN = (3)
SEVERITY = (5) NUMBER = (6)

Message String: ct_cancel(): network packet layer: internal net library
error: Net-Library operation terminated due to disconnect
DBD::Sybase::db ping failed: OpenClient message: LAYER = (1) ORIGIN = (1)
SEVERITY = (1) NUMBER = (60)

Message String: ct_cancel(CONN,ALL): user api layer: external error: There
is a usage error.  This routine has been called at an illegal time.
OpenClient message: LAYER = (1) ORIGIN = (1) SEVERITY = (1) NUMBER = (60)

Message String: ct_close(FORCE): user api layer: external error: There is a
usage error.  This routine has been called at an illegal time.
DBD::Sybase::db ping failed: OpenClient message: LAYER = (1) ORIGIN = (1)
SEVERITY = (1) NUMBER = (60)

Message String: ct_cancel(CONN,ALL): user api layer: external error: There
is a usage error.  This routine has been called at an illegal time.
OpenClient message: LAYER = (1) ORIGIN = (1) SEVERITY = (1) NUMBER = (60)

Message String: ct_close(FORCE): user api layer: external error: There is a
usage error.  This routine has been called at an illegal time.
DBD::Sybase::db ping failed: OpenClient message: LAYER = (1) ORIGIN = (1)
SEVERITY = (1) NUMBER = (60)

Message String: ct_cancel(CONN,ALL): user api layer: external error: There
is a usage error.  This routine has been called at an illegal time.
OpenClient message: LAYER = (1) ORIGIN = (1) SEVERITY = (1) NUMBER = (60)
Message String: ct_close(FORCE): user api layer: external error: There is a
usage error.  This routine has been called at an illegal

--- shutdown occurs here 

syb_db_disconnect(): ct_con_drop() failed
syb_db_disconnect(): ct_con_drop() faile

Thanks


 
  It seems that once processes start getting reused, I wind up with a ton
of
  DB error messages in my error_log. 
  
  They seem to start like this:
  
  ct_cmd_alloc failed at
  /usr/local/lib/perl5/site_perl/5.005/sun4-solaris/DBD/Sybase.pm line 159.
  DBD::Sybase::db ping failed: OpenClient message: LAYER = (5) ORIGIN = (3)
  SEVERITY = (5) NUMBER = (6)
  Message String: ct_cancel(): network packet layer: internal net library
  error: Net-Library operation terminated due to disconnect

I'm not familiar with Apache::DBI, so I don't know exactly in what
situation it calls ping()... In this case it looks like ping fails (ie 
the connection to the server has been killed) but the sequence of
calls that follow is incorrect.

  What is happening on the user end at this time - 500s? Any insight would
be
  incredibly helpful at this point.

I think there's a good chance of 500s, but maybe not. It's possible
that these are internal warnings, and that the initial failed ping()
causes a database reconnect and 

Re: Apache::DBI with Sybase - What's wrong?

2000-05-12 Thread Manfred Dehnkamp



"Graf, Chris" schrieb:

 Thanks Michael.

 If anyone can explain a little better what Apache::DBI and mod_perl are
 doing, or should be doing at this point, that may be helpful. I have been
 testing a little more and found that no errors will appear unless I am
 actually doing something with the connections. If I just initiate the
 persistent connections the first time the scripts run, and never touch them,
 they appear to stay alive (or at least restart properly) without generating
 errors.

Hy,
I had serious sockket/connect  porblems too ;-(( that was using 11.0.3.
I changed to 11.9.2 and now everything is fine
(Everything on RedHat 6.2).
My problem was somewhere in the clientlibrary : let's say a couple of
hundred/thousand queries went fine. Than my application stopped running.
The Process in the database (sp_who) was existing, and killing the DB-connection

caused the client to die. ;-))
Maybe it's worth to try an upgrade if you are running 11.0.3 ...


regards
Fred