Looks like I've got some work to do. Thanks for your help.
Chris
On Mar 29, 2004, at 8:14 PM, Jeff Bohmer wrote:
I get crashes with iODBC too. I've also tried JDBC. It was slightly better, but still crashed.
IIRC, unixODBC 2.1.0 doesn't do outer joins (can't recall why). If you're using that version, try another driver manager. (unixODBC 2.1.0 was the basis for the mac:ODBC product by The Kompany.) Some versions around 2.1.0 may also have this problem.
Make sure the ODBC driver and driver manager support ODBC level 3. Also, the ODBC driver may not be thread safe. Try setting Threading=3 in odbcinst.ini. This setting is described in the comments of <unixODBC_src>/DriverManaer/__handles.c
Also check the hardware (memory and file systems). Apple usually includes a test CD with systems. A warning: I've seen this CD check a machine with bad cache RAM and completely miss the problem.
As you try different things, keep looking for CrashReporter logs.
A reproducible test case would greatly increase the odds of getting the problem fixed. Without that, the other options (as I can see them) are trying out different software/versions (OS X, ODBC, JDBC, etc.) and avoiding certain things in your code.
If you're really dedicated to having a crash-free OS X app server, I think you'll need to do more testing. Specifically, testing for threading problems by running code in sequential requests vs. parallel requests. And checking TAFs that hit the DB vs. TAFs that don't. TAFs that use SSL libs (<@URL "https://..., or some <@CIPHER> functions), TAFs that use the JavaScript engine, etc.
JOINs in SQL statements will not cause the app server to use more threads. I believe the name "active query threads" is a throw back to the pre Tango 3 days when the code files were called query files (.qry). "Active request threads" might be better, since each thread handles a single request to the app server. One app server thread's processing might result in multiple queries sent to a database server.
If you have good reason to believe running TAFs with JOINs increases the chance of a crash, and not database activity in general, you may want to modify your code. You can avoid exposing Witango and the ODBC layer to SQL statements that include JOINs if your database supports views. Instead of getting the result set you want by joining table a and table b, define a view v as "select fields from table a join table b". Then change your Witango code to grab the data from view v.
- Jeff
I would go back and try Apples. They made some major changes in their ODBC
"direction" with Panther so their may be issues with older drivers.
You might also try JDBC is you are with MySQL since it ships with Panther.
Dan
on 3/29/04 18:56, Roland Dumas at [EMAIL PROTECTED] wrote:
dunno. I'm using Apple's
On Mar 29, 2004, at 3:26 PM, Chris Millet wrote:
Does the flavor of odbc matter? I'm using unixODBC. I couldn't get Apple's to work when I set Witango up over a year ago.
Chris
On Mar 29, 2004, at 5:18 PM, Roland Dumas wrote:
I'd suggest that's not the issue. I've got a crashing problem and the
crash log always points at ODBC.
There are some joins here and there, but are unrelated to crashes.
Crashes are unrelated to hits, in fact. Unrelated to taf, table,
database.
at a high, there were 3 crashes a day. Haven't had one in a few
weeks, though (knocking on wood) but have had lulls before and then a
storm of crashes.
On Mar 29, 2004, at 3:12 PM, Chris Millet wrote:
I suspected ODBC simply because Apple's implementation seems, well,
less than up-to-snuff. I checked for logs bug haven't found
anything useful.
As for active query threads, that is one reason I was asking this
question. I'm somewhat new to SQL (I've used Tango/FMP for years)
and don't know if a join is considered a single query or multiple. I
have read that Witango for OS X can crash under load, but my server
just doesn't get that heavy of a load (yet). My thought process was
that if a join constituted multiple query threads, then un-joining
them might help alleviate the problem.
I'll test out the joins as you've suggested and let you know what happens.
Thanks, Chris
It may be the ODBC or JDBC layer. That code is loaded by the app server and can cause the app server to crash.
Have you checked /Users/witango/Library/Logs/CrashReporter for crash logs?
In Witango.log, can you see how many active query threads are listed before the crash?
I have often seen more than one thread active before a crash. This
leads me to believe the crashes were due to thread problems (e.g, a
non-thread safe system call like strftime on OS X 10.2, for which
the app server has a work-around but J/ODBC may not). Thread
problems could explain the apparent inconsistency with the crashes.
However, I think using Witango.log to determine whether or not a
crash was thread-related is difficult. The app server does not
seem write out all Witango.log entries immediately (for performance
reasons?). A crash may result in missing messages from the end of
Witango.log.
One possible test: Make a TAF containing only a DirectDBMS action
with a SQL statement that makes a join. Request the TAF a lot --
enough so the app server spends a few minutes with multiple active
query threads. See if it crashes. Then replace the SQL statement
with one that doesn't do a join and hit it again. If it looks like
avoiding joins helps with crashes, you could use SQL views instead
of defining joins in your Witango code.
- Jeff
if its a join making the server crash it sounds more like your database is causing the crash instead of witango.
you might check if it has any kind of crash log or debugging output you can turn on.
----- Original Message ----- From: "Roland Dumas" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, March 29, 2004 12:26 PM Subject: Re: Witango-Talk: Can SQL joins make OS X server crash?
witango always writes to the witango crash log when it crashes. It
tells what's going on with each thread. I've got a 100% record of
crashes.
On Mar 29, 2004, at 12:23 PM, Chris Millet wrote:
Nothing. Zip. Zero. Zilch.
(actually it does say something, but the only entries are for known instances where we have been able to trace the problem)
Chris
On Mar 29, 2004, at 2:13 PM, Roland Dumas wrote:
what's your crash log say?
On Mar 29, 2004, at 12:08 PM, Chris Millet wrote:
Can SQL joins make the server crash on OS X?
I don't know enough about why the server crashes, only that it
does
crash (in)consistently after running apps with joins in the SQL
query. I have combed through the apps several times and have
made
them as efficient as I can. I am even using DBMS actions
instead of
search actions (they are faster), but nothing seems to help.
The crashes, like others I have read about on OS X, work fine
most
times but begin to crash seemingly on a whim.
Any insight would be greatly appreciated.
Chris
-- Jeff Bohmer
VisionLink, Inc.
_________________________________
303.402.0170
www.visionlink.org
_________________________________
People. Tools. Change. Community.
_________________________________________________________________ ___
____
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
__________________________________________________________________ ___
___
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
___________________________________________________________________ ___
__
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
____________________________________________________________________ ___
_
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
_____________________________________________________________________ ___
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
-- Dan Stein Digital Software Solutions 799 Evergreen Circle Telford PA 18969 Land: 215-799-0192 Mobile: 610-256-2843 Fax 413-410-9682 FMP, WiTango, EDI,SQL 2000 [EMAIL PROTECTED] www.dss-db.com
"When you are born, you cry and those who love you rejoice. And if you
live your life as you should, when you die, you rejoice and those who
love you cry."
______________________________________________________________________ __
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
--
Jeff Bohmer
VisionLink, Inc.
_________________________________
303.402.0170
www.visionlink.org
_________________________________
People. Tools. Change. Community.
_______________________________________________________________________ _
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
