try using psycopg2 on the prod env too. pg8000 (especially the one shipped 
with web2py in the latest stable, which was quite old) can exhibit memory 
leaks (or, for better saying, a premature optimization resulted in an 
"evil" usage of the memory for the way web2py uses pg8000).

On Friday, October 14, 2016 at 8:21:21 PM UTC+2, 
> On my development environment i am using psycopg2 in production pg8000, 
> and im not using db cache anywhere
> El viernes, 14 de octubre de 2016, 10:07:43 (UTC-5), Paolo Valleri 
> escribió:
>> Which driver are you using for postgres? Are you using cache in models?
>> Try to figure out if there are controllers using more memory than others.
>> On Friday, October 14, 2016 at 4:03:20 AM UTC+2, Anthony wrote:
>>> That's a lot of code to review. You're probably going to have to do some 
>>> digging and narrow it down for us. I did see one problem, though:
>>> class IS_BARCODE_AVAILABLE(object):     
>>>     T = current.T
>>> You can't use current in a class attribute (for the same reason it can't 
>>> be used at the top level of a module -- it's value will be fixed at the 
>>> first import, though it is a thread-local object that should change with 
>>> every request).
>>> Anthony
>>> On Thursday, October 13, 2016 at 9:28:44 PM UTC-4, 
>>> wrote:
>>>> Hello im an developing an opensource POS (link 
>>>> <>) using web2py, 
>>>> everything is fine except that on my development environment and in a 
>>>> production server, my app memory usage grows without limits, it does not 
>>>> crash the server however sometimes i get python MemoryError's, things like 
>>>> error: 
>>>> unpack_from requires a buffer of at least 5 bytes 
>>>> <> or postgres memory 
>>>> errors in the production server, in my development environment i see the 
>>>> memory grow by 3 to 6 MB for every request, i dont know what is causing 
>>>> this behavior, i am not using caching. any help appreciated.

- (Documentation)
- (Source code)
- (Report Issues)
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 
For more options, visit

Reply via email to