I do not have a solution for your issue, but a suggestion is - can you try to profile your app, to understand the performance aspects of your app. This may give you a better clue as to where you the issue is. I suggest you use the runsnakerun visualizer with -cProfile to understand the runtime profile for your app: http://www.vrplumber.com/programming/runsnakerun/ During hangs, I found the steps mentioned here rather handy: https://wiki.python.org/moin/DebuggingWithGdb

If you do figure out the issues, please share the details here.

________________________________________
Kiran Subbaraman
http://subbaraman.wordpress.com/about/

On Sun, 12-02-2017 6:16 PM, 'Andy Key' via web2py-users wrote:
Hi Everyone,

I am working with Web2Py 2.14.6 for almost 3 Weeks now. I liked the principle to generate a Raspberry Pi monitoring frontend rapidly. I started to create a small app on my local ubuntu VirutualBox + Apache 2. Everything worked fine, but one week ago I've tried to deploy that app on my Raspberry PI 3 (Raspbin 2017-01-11 + Apache + MySQL) It was not usable: As soon as I connected to the webpage, the Apache-Process used 100% CPU and never stopped doing that.

After some research I blamed Apache for this issue and tried to get Web2py working with lighttpd + fcgi + MySQL. (It took my days to get this setup running....). At least the fresh/untouched admin interface was working now. I installed my App and it worked for a few minutes until the python worker process ((sudo -u www-data python fcgihandler.py)) ran into a high CPU load.
Even when I close the browser, the CPU load doesn't decrease. As

In the last days I crawled through a lot of groups and docs to find a clue why this happens.
- For testing I used only three tables with one entry entry each
- I tried to activate lazy_tables
- in a forum some users stated performance issues by using ".first()" argument, so I tried to avoid this by using plain and unparsed sql querys ("dbs.executesql('SELECT * FROM livedata')"), no effect as far as I could observe - I checked the speed of the sql database directly in the terminal (mysql -p => USE DB => SELECT * FROM livedata) it reacts perfectly. Same with php everything is so fast! - I tried use that debugging bar, but it was not usable because when the python process was hanging, nothing showed up in the frondend - I found out, that as long as only one client is connected, the CPU stays under 10% (what seems to be much either). If client 2 and 3 opens the liveview, the CPU hangs at 100%. Even if the clients close the browser, the python process occupies 100% forever (kill -9 was the only option). With a completely stripped down app I can at least avoid killing the python process by closing the browsers of the clients.

It is possible to use the admin frontend and the app (2-3 users max) with that stripped down version of my app. I included this app in an attachment.

Can anyone see whats wrong or has a clue how to find out whats wrong? Is it possible that the RaspberryPi 3 is to weak powering web2py + a small ajax app?
I am almost done with web2py on the Raspi, so you people are my last hope!

Have a nice weekend,
Andy


--
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 [email protected] <mailto:[email protected]>.
For more options, visit https://groups.google.com/d/optout.

--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to