items in databases folder getting corrupted

64 views
Skip to first unread message

peter

unread,
May 2, 2014, 11:32:21 AM5/2/14
to web...@googlegroups.com
I have several web2py 2.8.2 applications running on a VPS under Centos 5 with nginx and uwsgi. I use sqlite with all the apps. Items in the databases folder regularly get corrupted. Nothing else appears to get corrupted. The most common file to get corrupted across different apps is auth_cas.table. Does anyone have any idea why things might be getting corrupted in this folder?

Thanks
Peter

Niphlod

unread,
May 2, 2014, 3:21:48 PM5/2/14
to web...@googlegroups.com
what does it mean exactly when you say a table gets "corrupted" ?

peter

unread,
May 2, 2014, 4:32:28 PM5/2/14
to web...@googlegroups.com
It means I get a ticket, and the error says

.......... auth_cas.table appears corrupted.

Peter

Niphlod

unread,
May 2, 2014, 5:10:44 PM5/2/14
to web...@googlegroups.com
what sqlite version are you on ?

peter

unread,
May 2, 2014, 5:31:34 PM5/2/14
to web...@googlegroups.com
version is 3.6.21

Niphlod

unread,
May 3, 2014, 8:44:32 AM5/3/14
to web...@googlegroups.com
Whoops.... I was looking at sqlite because I thought the database was corrupted.... seems instead that you have troubles with pickle files (the .table ones) .... do you have all migrations turned off in production, right ?

On Friday, May 2, 2014 11:31:34 PM UTC+2, peter wrote:
version is 3.6.21

peter

unread,
May 3, 2014, 1:13:58 PM5/3/14
to web...@googlegroups.com
I thought that leaving migrations on only affected performance? How can it cause corruptions?
i.e you are right I have left them on.

Thanks
Peter

Niphlod

unread,
May 3, 2014, 2:48:34 PM5/3/14
to web...@googlegroups.com
well, they shouldn't but that's a VPS you're on.... who knows what kind of kinky storage is running under it... web2py raises that error if it can't un-pickle .table files...so it's not properly a web2py issue, more of a problem with that file being somewhat "tampered with". web2py writes to the file only if a table definition is altered...but for auth_cas table the definition is static, so in theory, web2py writes to it ONLY if it doesn't exist in the first place (i.e. the very first request for that app).
However, it reads from it every time a request comes in if migrations are turned on, hence the error you were seeing, but not due to web2py, due mostly to the underlying filesystem being "not so consistent". 

Peter Hutchinson

unread,
May 3, 2014, 5:31:00 PM5/3/14
to web...@googlegroups.com

Thanks for your help on this Niphlod

 

Peter

--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/Qzlep_OFSyY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Massimo Di Pierro

unread,
May 3, 2014, 9:55:21 PM5/3/14
to web...@googlegroups.com
One thing that causes .table to get corrupted is running out of disk space.
Reply all
Reply to author
Forward
0 new messages