I am sorry for resurrecting this post but I am facing the same problem. 
Using the web2py -F profile option and then reading that dump with 
runsnakerun I see that fcntl.flock is where more time is spent. I have 
disabled migrations in the appconfig.ini and in the DAL constructor but I 
am still having fcntl.flock slowing my requests.

What fcntl.flock does? Is it directly related to migrations? If so how can 
I definitely get rid of this bootleneck?

Thank you.



El lunes, 5 de septiembre de 2016, 10:25:12 (UTC-5), Scott Hunter escribió:
>
> I found the problem; migrations weren't being disabled because, while I 
> had the correct settings in appconfig.ini, they were not being used 
> properly in creating the db object.
>
> - Scott
>
> On Saturday, September 3, 2016 at 1:01:39 PM UTC-4, Scott Hunter wrote:
>>
>> I have an app which runs *much* slower than expected on pythonanywhere.
>>
>> I enabled the profiler, and one thing stood out: on pythonanywhere, the 
>> function the most time was spent in, by far, is fcntl.flock from inside 
>> portalocker while loading the models.  In fact, when run locally, 
>> portalocker isn't even being called: it goes straight from save_dbt to 
>> cPickle.dump.
>>
>> Is there some configuration specific to web2py that might address this, 
>> or is it something I should take up w/ the people at PA?
>>
>> - Scott
>>
>

-- 
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 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/d/optout.

Reply via email to