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.18.0 -_-
@ 2021-10-09  8:37  4% Eric Wong
  0 siblings, 0 replies; 3+ results
From: Eric Wong @ 2021-10-09  8:37 UTC (permalink / raw)
  To: yahns-public

Some minor updates and fixes, mainly to workaround for a
(now-fixed upstream) Linux kernel bug.  I doubt anybody
uses this, yet, or ever will at this point...

Changes:

    8 changes since 1.17.0 (2019-04-22):

          worker: workaround old F_SETPIPE_SZ bug
          doc: favor File.read over IO.read to ease review
          proxy_pass: document as a public API
          doc: include Yahns/ directory on website
          extras/try_gzip_static: set "Vary: Accept-Encoding" on gzip
          do not sleep if signals are pending
          server: workaround Linux v5.5..v5.13 epoll bug
          gemspec: allow unicorn 6.x

* homepage: https://yhbt.net/yahns/
* git clone https://yhbt.net/yahns.git

*zzzzzzzz*

^ permalink raw reply	[relevance 4%]

* [PATCH 1/3] do not sleep if signals are pending
  2021-10-09  2:24  4% [PATCH 0/3] various minor bugfixes Eric Wong
@ 2021-10-09  2:24  7% ` Eric Wong
  0 siblings, 0 replies; 3+ results
From: Eric Wong @ 2021-10-09  2:24 UTC (permalink / raw)
  To: yahns-public

This should prevent missed/delayed wakeups if repeatedly
kill(2)-ed.
---
 lib/yahns/server.rb    | 3 ++-
 lib/yahns/server_mp.rb | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/yahns/server.rb b/lib/yahns/server.rb
index d13c57e..208b5ee 100644
--- a/lib/yahns/server.rb
+++ b/lib/yahns/server.rb
@@ -476,7 +476,8 @@ def reap_reexec
   end
 
   def sp_sig_handle(alive)
-    @sev.wait_readable(alive ? nil : 0.01)
+    tout = alive ? (@sig_queue.empty? ? nil : 0) : 0.01
+    @sev.wait_readable(tout)
     @sev.yahns_step
     case sig = @sig_queue.shift
     when :QUIT, :TERM, :INT
diff --git a/lib/yahns/server_mp.rb b/lib/yahns/server_mp.rb
index 5467674..d56d1ed 100644
--- a/lib/yahns/server_mp.rb
+++ b/lib/yahns/server_mp.rb
@@ -157,7 +157,8 @@ def run_mp_worker(worker)
   def mp_sig_handle(watch, alive)
     # not performance critical
     watch.delete_if { |io| io.to_io.closed? }
-    if r = select(watch, nil, nil, alive ? nil : 0.1)
+    tout = alive ? (@sig_queue.empty? ? nil : 0) : 0.01
+    if r = select(watch, nil, nil, tout)
       r[0].each(&:yahns_step)
     end
     case @sig_queue.shift

^ permalink raw reply related	[relevance 7%]

* [PATCH 0/3] various minor bugfixes
@ 2021-10-09  2:24  4% Eric Wong
  2021-10-09  2:24  7% ` [PATCH 1/3] do not sleep if signals are pending Eric Wong
  0 siblings, 1 reply; 3+ results
From: Eric Wong @ 2021-10-09  2:24 UTC (permalink / raw)
  To: yahns-public

It's been a while since I've run the test suite, turns out there
was a Linux kernel bug introduced and fixed which was causing
shutdown timeouts.

A couple of other minor things, too...

Eric Wong (3):
  do not sleep if signals are pending
  server: workaround Linux v5.5..v5.13 epoll bug
  gemspec: allow unicorn 6.x

 lib/yahns/queue_epoll.rb |  4 ++++
 lib/yahns/server.rb      | 20 ++++++++++++--------
 lib/yahns/server_mp.rb   |  3 ++-
 yahns.gemspec            |  2 +-
 4 files changed, 19 insertions(+), 10 deletions(-)

^ permalink raw reply	[relevance 4%]

Results 1-3 of 3 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2021-10-09  2:24  4% [PATCH 0/3] various minor bugfixes Eric Wong
2021-10-09  2:24  7% ` [PATCH 1/3] do not sleep if signals are pending Eric Wong
2021-10-09  8:37  4% [ANN] yahns 1.18.0 -_- 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).