On Jan 28, 2009, at 12:12 PM, gil.shi...@gmail.com wrote:
On Jan 27, 5:59 pm, Philip Semanchuk <phi...@semanchuk.com> wrote:
On Jan 27, 2009, at 10:34 AM, gil.shi...@gmail.com wrote:
On Jan 27, 2:10 pm, Tim Golden <m...@timgolden.me.uk> wrote:
Then how are you interacting with Sybase?
I'm using python's functions to run sybase sql commands.
Can you give a short code sample? I'm unaware of how one would use
the
standard Python library to talk to Sybase, unless Sybase has a raw
socket interface or some such.
First of all I have found the following python's import:
import Sybase
This isn't part of the Python standard library. It's a 3rd party
module -- exactly what we were looking for.
Personally, I think this (or another C++ or C-based 3rd party module
that you use heavily) is your prime suspect for the origin of the
crashes you're having. That's not because I think the people who wrote
or maintain it are bad or lazy coders. In fact, it's no reflection on
their skill at all. It's just that a lot more people have used and
exercised the Python standard library modules. A 3rd party module like
this one will be less well-used and therefore less well-tested and
therefore more likely to contain a bug that causes a crash.
That said, I don't know how to advise you to proceed from here. You
could perhaps turn on logging at the database level. I know Postgres,
for instance, can write very detailed logs and so if you get a crash
at 9:33:22 you can look in the log and see what was happening at that
time. If you get several crashes and they all happen when a certain
SQL statement is being executed, that's probably the culprit.
You could also alter the Sybase module to add logging using Python's
logging module. Who knows, it might already be there, waiting to be
turned on with a switch.
But I'm jumping the gun a little. As I said, it could be this module
or another that's causing your problem. It's a lot easier to cause a
hard crash using C or C++ than it is using pure Python, so pure Python
modules would be lower on my list of suspects. Enumerate all of the
modules you're using and find out where they come from. Any of them
that are not in the standard library and are not written in pure
Python should top your list of suspects.
Good luck
Philip
--
http://mail.python.org/mailman/listinfo/python-list