raspberry pi 3 should be more than enough to run web2py I have it running
an N64 emulator.
I do recommend you go with nginx/uwsgi instead of apache or lighthttpd.
Looking at your code I find nothing that could cause this but I do have a
few recommendations:
You could add session.forget() to your controllers since you don't care
about session. You could also simplify things, so:
def get_overview_values():
from gluon.serializers import json
livedata = db(db.ec_livedata.id >0).select(orderby=~db.ec_livedata.id,
limitby=(0,1)).first() # get last entry of ec_livedata
ret = {
'V_ist':livedata['V_ist'],
'f_fu':livedata['f_fu'],
'dp_4':livedata['dp_4'],
'fuellstand':livedata['fuellstand'],
}
return json(ret)
Would become:
def get_overview_values():
session.forget()
livedata = db(db.ec_livedata.id >0).select(orderby=~db.ec_livedata.id,
limitby=(0,1)).first() # get last entry of ec_livedata
return response.json(livedata)
Another big improvement you could make would be to turn off migrations in
your appconfig.ini and then set reload=False for AppConfig.
Then remove all Auth and Mail stuff from db.py since you don't use them
anyway.
Then compile your app.
If you make all these changes you application should be extremely fast.
That said this is probably a bug with the way you're running things and I
think you will only fix it by going the nginx/uwsgi-emperor route.
--
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.