Could this be a pyodbc issue? Are you sure web2py hangs or only this one 
session hangs? You can try from two separate browsers. It is possible 
pyodbc does not return (because for example a circular reference is on 
delete cascade) and web2py keeps the session blocked. All requests from 
this user/session are queued.

On Tuesday, 6 August 2013 20:02:51 UTC-5, Andrew Buchan wrote:
>
> We have the same (similar) issue using mssql on Windows: when we get a 
> pyodbc.ProgrammingError typically relating to a foreign key, we have to 
> restart web2py.
>
> This is particularly frustrating problem as these errors happen every time 
> you rename/delete a column with a foreign key.
>
>  E.g. create a field that references another table:
> .....
>     Field('a_field', db.another_table, ondelete='CASCADE'),
> ....
> Then remove/rename ;a_field', and you get "ALTER TABLE DROP COLUMN a_field 
> failed because one or more objects access this column."
>
> This causes web2py to hang, so we have to go into management studio, 
> delete the constraint, and restart web2py because it has become 
> unresponsive.
>
> I think that, aside from resolving why web2py hangs, we could also improve 
> migration so that it deletes any constraints automatically when we drop a 
> column. 
>
> While we're at it, web2py could check a column actually exists before 
> calling a DROP statement. It frequently happens that things do get out of 
> synch with fake migrates and manually modifying the table etc, and for a 
> DROP statement to be called on a column that has been removed. There is 
> really no benefit in web2py failing if the column to delete isn't found.
>
> I thought I'd reply to this thread (ps: right thing to do?) and see if 
> anyone had any suggestions/info before I go raising as bugs/features, or 
> attempting to produce a patch...
>
>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to