yahns Ruby server user/dev discussion
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [ANN] yahns 1.17.0 -_- sleepy app server for Ruby
@ 2019-04-22  7:37  5% Eric Wong
  0 siblings, 0 replies; 4+ results
From: Eric Wong @ 2019-04-22  7:37 UTC (permalink / raw)
  To: ruby-talk, yahns-public

Earth day release of a server designed for low energy use!

A Free Software, multi-threaded, non-blocking network
application server designed for low _idle_ power consumption.
It is primarily optimized for applications with occasional users
which see little or no traffic.  yahns currently hosts Rack/HTTP
applications, but may eventually support other application
types.  Unlike some existing servers, yahns is extremely
sensitive to fatal bugs in the applications it hosts.

* git clone https://yhbt.net/yahns.git
* https://yhbt.net/yahns.git/about/
* https://yhbt.net/yahns/NEWS.atom.xml (supported by most "RSS" readers)
* we only accept plain-text email yahns-public@yhbt.net
* and archive all the mail we receive: https://yhbt.net/yahns-public/
* nntp://news.public-inbox.org/inbox.comp.lang.ruby.yahns

lrg nabgure ubeevoyl-anzrq freire :>

Changes:

    This releases includes a few kqueue-related bugfixes from
    Lin Jen-Shin <godfat@godfat.org>.  There's also some
    shutdown_timeout-related bugfixes and some cleanups to
    reduce dependencies on kgio.

    extras/exec_cgi and extras/autoindex both got some minor
    updates; the latter of which defaults to a dark scheme to save
    power on OLED and CRT displays (it is Earth Day, after all :>)

    Eric Wong (25):
          doc: fix git URLs in README and HACKING
          http_client: do not warn on do_pread overreach
          remove IO#close_on_exec= calls
          yahns/worker: shrink pipe under Linux
          test/test_extras_exec_cgi.rb: improve test reliability
          extras/exec_cgi: remove kgio dependency
          extras/exec_cgi: update copyright year and use SPDX
          extras/exec_cgi: @body_tip is always set
          extras/exec_cgi: support Process.spawn options (e.g. RLIMIT_*)
          server_mp: favor "Kernel#select" instead of "IO.select"
          server_mp: remove redundant srand call
          extras/exec_cgi: remove unecessary .freeze calls
          server: respect shutdown_timeout
          server: extra shutdown timeout debugging
          wbuf: use IO#write directly in Ruby 2.5+ for writev
          worker: rely on F_SETPIPE_SZ to set mininum value
          remove calls to kgio_wait_* able
          do not shutdown until listeners are all stopped
          README: remove SMTP-based subscription info
          sigevent_*: fixup non-eventfd path
          README: note HTTPS support for HTTP/1.1
          extras/autoindex: use dark colors by default
          doc: update homepage to point to cgit install
          doc: update wording to avoid "mailing list"
          doc: remove inaccurate comment about "GNU-ism"

    Lin Jen-Shin (2):
          Add QueueQuitter#closed? to queue_quitter_pipe.rb
          @srv.shutdown could raise Errno::ENOTCONN

Please note the disclaimer:

  yahns is extremely sensitive to fatal bugs in the apps it hosts.  There
  is no (and never will be) any built-in "watchdog"-type feature to kill
  stuck processes/threads.  Each yahns process may be handling thousands
  of clients; unexpectedly killing the process will abort _all_ of those
  connections.  Lives may be lost!

  yahns hackers are not responsible for your application/library bugs.
  Use an application server which is tolerant of buggy applications
  if you cannot be bothered to fix all your fatal bugs.

*zzzzzzz*

^ permalink raw reply	[relevance 5%]

* [PATCH] do not shutdown until listeners are all stopped
@ 2019-01-08 18:37  6% Eric Wong
  0 siblings, 0 replies; 4+ results
From: Eric Wong @ 2019-01-08 18:37 UTC (permalink / raw)
  To: yahns-public

Otherwise, listeners may still be injecting into the queue
and new clients may be accepted.

Fixes: 86ea6ed1417b ("server: respect shutdown_timeout")
---
 lib/yahns/server.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/yahns/server.rb b/lib/yahns/server.rb
index c078ade..d13c57e 100644
--- a/lib/yahns/server.rb
+++ b/lib/yahns/server.rb
@@ -500,7 +500,7 @@ def dropping(fdmap)
     if drop_acceptors[0] || fdmap.size > 0
       timeout = @shutdown_expire < Yahns.now ? -1 : @shutdown_timeout
       n = fdmap.desperate_expire(timeout)
-      return false if n == 0 # all done!
+      return false if n == 0 && @listeners.empty? # all done!
 
       # FIXME: sometimes shutdowns take a long time when using proxy_pass
       # Still not sure what's going on and it takes a while to reproduce..
-- 
EW


^ permalink raw reply related	[relevance 6%]

* [PATCH 1/2] server: respect shutdown_timeout
  2018-12-30  2:33  5% [PATCH 0/2] shutdown stuff Eric Wong
@ 2018-12-30  2:33  7% ` Eric Wong
  0 siblings, 0 replies; 4+ results
From: Eric Wong @ 2018-12-30  2:33 UTC (permalink / raw)
  To: yahns-public

It seems there is still a bug in the proxy code which causes
this timeout expiries to be missed.
---
 lib/yahns/server.rb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/yahns/server.rb b/lib/yahns/server.rb
index 583fd38..128b894 100644
--- a/lib/yahns/server.rb
+++ b/lib/yahns/server.rb
@@ -500,6 +500,8 @@ def dropping(fdmap)
     if drop_acceptors[0] || fdmap.size > 0
       timeout = @shutdown_expire < Yahns.now ? -1 : @shutdown_timeout
       n = fdmap.desperate_expire(timeout)
+      return false if timeout == -1
+
       $0 = "yahns quitting, #{n} FD(s) remain"
       true
     else
-- 
EW


^ permalink raw reply related	[relevance 7%]

* [PATCH 0/2] shutdown stuff
@ 2018-12-30  2:33  5% Eric Wong
  2018-12-30  2:33  7% ` [PATCH 1/2] server: respect shutdown_timeout Eric Wong
  0 siblings, 1 reply; 4+ results
From: Eric Wong @ 2018-12-30  2:33 UTC (permalink / raw)
  To: yahns-public

Graceful shutdown is still a bit tricky...

Eric Wong (2):
      server: respect shutdown_timeout
      server: extra shutdown timeout debugging

 lib/yahns/server.rb | 13 +++++++++++++
 1 file changed, 13 insertions(+)



^ permalink raw reply	[relevance 5%]

Results 1-4 of 4 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2018-12-30  2:33  5% [PATCH 0/2] shutdown stuff Eric Wong
2018-12-30  2:33  7% ` [PATCH 1/2] server: respect shutdown_timeout Eric Wong
2019-01-08 18:37  6% [PATCH] do not shutdown until listeners are all stopped Eric Wong
2019-04-22  7:37  5% [ANN] yahns 1.17.0 -_- sleepy app server for Ruby Eric Wong

Code repositories for project(s) associated with this public inbox

	https://yhbt.net/yahns.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).