[egenix-users] Solid: OperationalError()
Michal Vitecek
fuf at mageo.cz
Mon Jan 17 17:42:13 CET 2005
M.-A. Lemburg wrote:
>Michal Vitecek wrote:
>>M.-A. Lemburg wrote:
>>
>>>Michal Vitecek wrote:
>>>
>>>>hello,
>>>>
>>>>i'm running egenix-mx-commercial version 2.1b02 (license bought), db
>>>>engine is Solid 3.50. with python 2.2 everything runs correctly.
>>>>however starting with python 2.3 inserting into a table gives the
>>>>following error:
>>>>
>>>>OperationalError ('08S01', 0, '', 5835): from
>>>>/home/project/utils/db.py:503 for
>>>>query: INSERT INTO userAuthStr (userId, authStr, isUnconfirmed,
>>>>lastUsedTime,
>>>>ip) VALUES (0, '08a3db2fc1b13549bd125f265d30b808', 0, 1105972868,
>>>>'10.0.0.122')&
>>>>
>>>>the error is raised when the application runs for a longish time (~24
>>>>hours) and _only_ when mxODBC is running over python 2.3+. what is the
>>>>cause of the error? solid doesn't know anything about error code 08S01
>>>>or 5835.
>>>
>>>The first entry in the tuple is the SQL State value:
>>>
>>>08S01 Communication link The communication link between the
>>>driver and
>>> failure the data source to which the driver
>>> was
>>> connected failed before the function
>>> completed
>>> processing.
>>>
>>>Even though there any many things that could cause such
>>>an error message, I'd suggest starting to check whether a firewall
>>>is blocking the TCP Port used by the server (e.g. as a result of
>>>an Win XP SP2 upgrade).
>>
>> i'm running this on Slackware 10.0, no firewall is present on that
>> computer and the communication is done via unix sockets. so this
>> doesn't seem like the problem. also the computer i'm running it on is
>> not loaded at all (184 processes, load average 0.00, file-nr 1389 91
>> 52313).
>>
>> again this doesn't happen with python 2.2 (at least it hasn't for 2
>> years). there's nothing in the solid's error or message log.
>
>There shouldn't be any differences between Python 2.2 and 2.3
>versions of mxODBC. However, it is possible that the versions
>you compiled pick up different drivers or configuration files.
i have egenix-mx-commercial 2.1b02 which uses the old way of
configuration (one has to edit the mxCOMMERCIAL.py file). there's only
one Solid library on that computer. also there's only python 2.4
installed, but it behaves the same with python 2.3 even though doesn't
with python 2.2.
>The error you are seeing is generated by the ODBC driver not
>mxODBC and the result of executing the statement (not the prepare
>or binding step).
>If you're using domain sockets, please also check the permissions
>on the socket "files".
the permissions are right for sure - as i said - the application (a
server actually with each thread having its own database handle) runs
all okay for like ~24 hours, then it begins spitting these
OperationalError() exceptions and no connection to the database is
possible.
the only thing that comes to my mind is whether this could be caused
by the Solid engine closing the connection because there isn't going on
much at the time (the machine is not used most of the time). but mxODBC
should be able to catch this kind of problem and report it, right?
i'm using my own wrapper around direct calls to mxODBC and before each
execute() a test on valid connection is performed, so the code looks
like:
...
if (self.__db.closed):
self.__reconnect()
try:
retVal = self.__cursor.execute(queryString)
...
so self.__db.closed should be set when it is a connecion problem i
guess.
p.s.: i would use 2.0.6 but i wasn't even able to compile it - the new
system of configuration is less understandable for me :/
thanks,
--
fuf (fuf at mageo.cz)
More information about the egenix-users
mailing list