We run web2py with ms sql server as a database backend. Every weekend sql
server gets rebooted (to install microsoft updates), after which web2py apps
start failing with the following error message:
*('08S02', '[08S02] [Microsoft][SQL Server Native Client 10.0]SMux Provider:
Physical connection is not usable [xFFFFFFFF]. (-1) (SQLExecDirectW);
[08S02] [Microsoft][SQL Server Native Client 10.0]Unable to open a logical
session (-1)')*
The only way to get them back up and running is to restart web2py.
I suspect it has something to do with database connection pooling (which we
do use). I have not taken a look at the code yet, so I am not sure if web2py
connection pooling reopens physical db connection if it becomes unusable
because of db server reboot or network failure or something else.
Has anyone had this issue? I cannot think of any good solution for this so
any help would be highly appreciated.