Discussion:
bottle + raspberry pi
Eduardo Reanha
2013-09-05 11:42:42 UTC
Permalink
Hi all

I have a small bottle app running in a raspberry pi interfacing with a
relay.
After 12 to 24 hours, the server stops answering requests until i restart
the app.

I've checked the logs but i can't find anything

Any ideas?

Thanks
Eduardo
--
--
You are member of the "bottlepy" group at google groups.
See http://groups.google.de/group/bottlepy for mailing list options.
See http://bottlepy.org/ for news and documentation.

---
You received this message because you are subscribed to the Google Groups "bottlepy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bottlepy+***@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
bulletmark
2013-09-06 02:29:48 UTC
Permalink
I ripped out my home alarm system central box and replaced it with a
Raspberry Pi running a small bottle app about 9 months ago, interfacing to
a PiFace board. I found the same problem as you. Debugged it for a while
but decided it was some odd bug in the generic python wsgi server.
Eventually I switched to bjoern server and that problem went away but I
found that after some time my app would creep to and stay with high cpu.
Then I switched to meinheld server and my small but multi-threaded web app
has been running for many months on end, without any issue, and with total
CPU load around 5%.

Changing the server is surprising easy. Just sudo apt-get python-pip,
sudo pip install meinheld, and then add server="meinheld" to your
bottle.run().

BTW, I benchmarked all 17 of the servers which bottle supports natively and
found bjoern and meinheld to be significantly the best performing. For my
app, they return requests/sec nearly 10 times the rate of the default
python wsgi server.
--
--
You are member of the "bottlepy" group at google groups.
See http://groups.google.de/group/bottlepy for mailing list options.
See http://bottlepy.org/ for news and documentation.

---
You received this message because you are subscribed to the Google Groups "bottlepy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bottlepy+***@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Eduardo Reanha
2013-09-08 23:03:43 UTC
Permalink
Thanks, it works like a charm.
Post by bulletmark
I ripped out my home alarm system central box and replaced it with a
Raspberry Pi running a small bottle app about 9 months ago, interfacing to
a PiFace board. I found the same problem as you. Debugged it for a while
but decided it was some odd bug in the generic python wsgi server.
Eventually I switched to bjoern server and that problem went away but I
found that after some time my app would creep to and stay with high cpu.
Then I switched to meinheld server and my small but multi-threaded web app
has been running for many months on end, without any issue, and with total
CPU load around 5%.
Changing the server is surprising easy. Just sudo apt-get python-pip,
sudo pip install meinheld, and then add server="meinheld" to your
bottle.run().
BTW, I benchmarked all 17 of the servers which bottle supports natively
and found bjoern and meinheld to be significantly the best performing. For
my app, they return requests/sec nearly 10 times the rate of the default
python wsgi server.
--
--
You are member of the "bottlepy" group at google groups.
See http://groups.google.de/group/bottlepy for mailing list options.
See http://bottlepy.org/ for news and documentation.

---
You received this message because you are subscribed to the Google Groups "bottlepy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bottlepy+***@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Andrew Knotek
2016-02-01 23:45:19 UTC
Permalink
Thank you so much! I replaced my thermostat with a RPI setup and was
experiencing the same issues! Heck, for a proof-of-concept I converted on
of my client's websites into a bottle app so I could host from a cellphone.
It worked great, just one problem, after some time it the server would stop
serving and just stop responding until I restarted it.

I've been wary of moving forward with new projects using bottle.py because
of this issue. Thanks again!
Post by bulletmark
I ripped out my home alarm system central box and replaced it with a
Raspberry Pi running a small bottle app about 9 months ago, interfacing to
a PiFace board. I found the same problem as you. Debugged it for a while
but decided it was some odd bug in the generic python wsgi server.
Eventually I switched to bjoern server and that problem went away but I
found that after some time my app would creep to and stay with high cpu.
Then I switched to meinheld server and my small but multi-threaded web app
has been running for many months on end, without any issue, and with total
CPU load around 5%.
Changing the server is surprising easy. Just sudo apt-get python-pip,
sudo pip install meinheld, and then add server="meinheld" to your
bottle.run().
BTW, I benchmarked all 17 of the servers which bottle supports natively
and found bjoern and meinheld to be significantly the best performing. For
my app, they return requests/sec nearly 10 times the rate of the default
python wsgi server.
--
--
You are member of the "bottlepy" group at google groups.
See http://groups.google.de/group/bottlepy for mailing list options.
See http://bottlepy.org/ for news and documentation.

---
You received this message because you are subscribed to the Google Groups "bottlepy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bottlepy+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Continue reading on narkive:
Loading...