Note that there are some explanatory texts on larger screens.

plurals
  1. POWEBrick on Raspberry Pi gives "ThreadError: can't create Thread" after running for awhile
    primarykey
    data
    text
    <p>I've encountered a WEBrick + Rails problem &amp; I haven't been able to find anyone else with the same issue. </p> <p>I run WEBrick in my Rails app with</p> <pre><code>$ rvmsudo rails server -p 80 </code></pre> <p>then I leave it in a detached <code>screen</code> and log out. If I wait a few days, WEBrick stops serving requests, giving this every time someone tries to load the app:</p> <pre><code>ERROR ThreadError: can't create Thread (11) /home/pi/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/webrick/server.rb:284:in `start' </code></pre> <p>Then when I try to stop the server and restart it with Control-C, sometimes it shows this and I have to press Control-C twice to kill it: </p> <pre><code>[2013-11-13 21:13:08] ERROR NoMethodError: undefined method `shutdown' for nil:NilClass /home/pi/.rvm/gems/ruby-2.0.0-p247/gems/rack-1.5.2/lib/rack/handler/webrick.rb:25:in `shutdown' </code></pre> <p>I tried checking whether my server has enough resources—plenty of RAM, CPU, disk space, swap, and network I/O to spare. Everything looks almost the same as when Rails is running normally (it's a really simple app).</p> <p>Software &amp; hardware details: Rails 4.0.1 with ruby 2.0.0p247 (2013-06-27 revision 41674) [armv6l-linux-eabihf] running on a Raspberry Pi with the latest Raspbian.</p> <p><a href="https://github.com/kevin1/fsae-shop-status" rel="nofollow">Source of my app is on GitHub</a>. It's running at <a href="http://door.servebeer.com/" rel="nofollow">http://door.servebeer.com/</a>.</p> <p>Thanks in advance for your help!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload