Re: Please move to github

2014-08-02 Thread Eric Wong
Gary Grossman gary.gross...@gmail.com wrote: Hi Eric, I work with Michael, and this discussion sure got off on the wrong foot... we love unicorn and use it heavily, and just want to contribute back to it. No worries, cultural differences happen. Thanks for following up. To detail the

Re: Please move to github

2014-08-02 Thread Eric Wong
Gary Grossman gary.gross...@gmail.com wrote: We'd pretty much need to introduce some kind of configuration switch, at least for the short term and maybe for the long term. The hope would be that it could become the default setting. Apps that don't use UTF8 should be able to set their desired

Re: Weird Unicorn Timeout Issues (Hibernation problem?)

2014-08-04 Thread Eric Wong
Kapil Israni kapil.isr...@gmail.com wrote: I unsubscribed from this list few days back, still getting emails? *checking logs* You sent the unsubscribe request, but never responded to the confirmation email. If you lost the confirmation email, you can resend the unsubscribe request again and

more house-cleaning for unicorn 5

2014-08-16 Thread Eric Wong
The only user-visible change would be the removal of the Status: header from the HTTP response, but I doubt anybody would even notice. Eric Wong (3): dev: remove isolate dependency unicorn.gemspec: depend on test-unit 3.0 http_response: remove Status: header

[PATCH 2/4] remove mongrel.rubyforge.org references

2014-09-21 Thread Eric Wong
mongrel.rubyforge.org has been dead longer than rubyforge.org! --- test/test_helper.rb | 4 ++-- test/unit/test_http_parser.rb | 4 ++-- test/unit/test_response.rb| 4 ++-- test/unit/test_server.rb | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git

Re: Master hooks needed

2014-10-03 Thread Eric Wong
Bráulio Bhavamitra brau...@eita.org.br wrote: Documentation is an excelent solution :) OK, pushed to the website[1] and unicorn.git as commit 3318b070c6513a3baa7ce7ac26f4835f46ccff1f examples: add run_once to before_fork hook example There may be code in a before_fork hook which should

Re: [ANN] email submission port (587) enabled

2014-10-05 Thread Eric Wong
Eric Wong e...@80x24.org wrote: - This will expose your client IP address to the world (but many existing mail setups do that anyways) You may use tor to get around this: tsocks git send-email ...

Re: Unicorn not working in GitLab 7.3

2014-10-06 Thread Eric Wong
Onno van der Straaten onno.van.der.straa...@gmail.com wrote: On Mon, Oct 6, 2014 at 5:04 PM, Onno van der Straaten wrote: (Top-posting corrected. Please do not send HTML email as it ends up marked as spam. You would've gotten a response much earlier if you sent as plain text) Hi, I am

Re: Having issue with Unicorn

2014-10-24 Thread Eric Wong
Imdad khanim...@gmail.com wrote: I have rails4, nginx, unicorn and mona for app deployed http://104.131.74.69/ But after deploy hitting on above link results in error, and the log says root@Hailisys:~# tail -n 0 -f /var/www/hailisys/shared/log/unicorn.stderr.log I,

Re: Issue with Unicorn: Big latency when getting a request

2014-11-14 Thread Eric Wong
Roberto Cordoba del Moral roberto.chin...@hotmail.com wrote: I´m getting this warn message when starting NGINX nginx: [warn] 1024 worker_connections exceed open file resource limit: 256 Could it be related to this? Probably not. You could try ulimit -n 1024 before starting nginx (assuming

[RFC] http: TypedData C-API conversion

2014-11-16 Thread Eric Wong
This provides some extra type safety if combined with other C extensions, as well as allowing us to account for memory usage of the HTTP parser in ObjectSpace. Note: this means we are finally dropping Ruby 1.8 support as TypedData requires Ruby 1.9 and later. Future changes will require Ruby

[PATCH] http_server: save 450+ bytes of memory on x86-64

2014-11-27 Thread Eric Wong
Replacing the Regexp argument to a rarely-called String#split with a literal String can save a little memory. The removed Regexp memsize is 469 bytes on Ruby 2.1: ObjectSpace.memsize_of(/,/) = 469 Is slightly smaller at 453 bytes on 2.2.0dev (r48474). These numbers do not include the

[PATCH] test_socket_helper: do not depend on SO_REUSEPORT

2015-02-06 Thread Eric Wong
Older Rubies (2.0) may not define SO_REUSEPORT even if the kernel and libc support it --- test/unit/test_socket_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit/test_socket_helper.rb b/test/unit/test_socket_helper.rb index 8b09198..7526e82 100644 ---

[PATCH 1/2] const: drop constants used by Rainbows!

2015-02-09 Thread Eric Wong
Rainbows! (in maintenance mode) will need to define it's own constants in the future. We'll trim down our constant usage in subsequent commits as we take advantage of Ruby VM improvements. --- lib/unicorn/const.rb | 8 1 file changed, 8 deletions(-) diff --git a/lib/unicorn/const.rb

[PATCH 2/2] reduce and localize constant string use

2015-02-09 Thread Eric Wong
Literal String#freeze avoids allocations since Ruby 2.1 via the opt_str_freeze instruction, so we can start relying on it in some places as Ruby 2.1 adoption increases. The 100-continue handling is a good place to start since it is an uncommonly-used code path which benefits from size reduction

Re: On USR2, new master runs with same PID

2015-03-19 Thread Eric Wong
Kevin Yank ky...@avalanche.com.au wrote: Regarding zero-downtime deploys: On 12 Mar 2015, at 5:45 pm, Eric Wong e...@80x24.org wrote: Best bet would be to run with double the workers temporarily unless you're too low on memory (and swapping) or backend (DB) connections or any other

Re: Request Queueing after deploy + USR2 restart

2015-03-05 Thread Eric Wong
Sarkis Varozian svaroz...@gmail.com wrote: Braulio, Are you referring to the vertical grey line? That is the deployment event. The part that spikes in the first graph is request queue which is a bit different on newrelic: http://blog.newrelic.com/2013/01/22/understanding-new-relic-queuing/

[PATCH] doc: document Etc.nprocessors for worker_processes

2015-03-12 Thread Eric Wong
Ruby 2.2 has Etc.nprocessors, and using that (directly or as a factor) for setting worker_processes is often (but not always) appropriate. --- TUNING | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/TUNING b/TUNING index 542ebdc..6a6d7db 100644 --- a/TUNING +++

Re: nginx reverse proxy getting ECONNRESET

2015-03-24 Thread Eric Wong
Eric Wong e...@80x24.org wrote: ECONNRESET is harmless in this case (unless nginx started pipelining or blindly attempting persistent connections to unicorn, which it should not be doing since unicorn sends Connection: close on every response) Actually, are you getting 502 errors returned from

Re: nginx reverse proxy getting ECONNRESET

2015-03-24 Thread Eric Wong
Another likely explanation might be you're not draining rack.input every request, since unicorn does lazy reads off the socket to prevent rejected uploads from wasting disk I/O[1] So you can send a bigger POST request with my example to maybe reproduce the issue. [1] you can use the

Re: nginx reverse proxy getting ECONNRESET

2015-03-24 Thread Eric Wong
Michael Fischer mfisc...@zendesk.com wrote: We have an nginx 1.6.2 proxy in front of a Unicorn 4.8.3 server that is frequently reporting the following error: 2015/03/24 01:46:01 [error] 11217#0: *872231 readv() failed (104: Connection reset by peer) while reading upstream The interesting

Re: $USER and $HOME shell variables not set

2015-03-27 Thread Eric Wong
Russell Jennings violentp...@gmail.com wrote: Hello, I am running into some issues with these variables being set - since I am spawning a script from a unicorn worker (via a rails controller) I figured I’d ask here. Here is the stackoverflow with the full background:

Re: TeeInput leaks file handles/space

2015-04-22 Thread Eric Wong
How about this patch to tee_input? It won't pollute the common code path, at least, and unicorn won't support multiple clients/tee_inputs I might release 4.8.4 with this, but it does break behavior for hijackers, but 5.0 will have lots of tiny internal incompatibilities for corner-cases anyways.

unicorn 4.8.x-stable branch pushed to git

2015-04-22 Thread Eric Wong
) Eric Wong (19): ISSUES: update with mailing list subscription FAQ: add entry for Rails autoflush_log dev: remove isolate dependency unicorn.gemspec: depend on test-unit 3.0 remove RubyForge and Freecode references remove

[PATCH 2/2] support TempfileReaper in deployment and development envs

2015-04-23 Thread Eric Wong
rack 1.6 added a TempfileReaper middleware to cleanup temporary files. Enable it by default for users running rack 1.6 or later to avoid leaving temporary files around. --- lib/unicorn.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/unicorn.rb b/lib/unicorn.rb index 467245d..9fdcb8e

[PATCH 0/2] Rack::TempfileReaper support

2015-04-23 Thread Eric Wong
These will be in the upcoming 4.9 release, as well as the 5.x release which drops old cruft and 1.8 support. I've decided to use 4.9 instead of 4.8.4 since this does change the feature set slightly. Eric Wong (2): tee_input: support for Rack::TempfileReaper middleware support

[ANN] unicorn 4.9.0 - Rack HTTP server for fast clients and *nix

2015-04-23 Thread Eric Wong
Unicorn is an HTTP server for Rack applications designed to only serve fast clients on low-latency, high-bandwidth connections and take advantage of features in Unix/Unix-like kernels. Slow clients should only be served by placing a reverse proxy capable of fully buffering both the the request

Re: Unicorn homepage design

2015-05-03 Thread Eric Wong
Tommaso Pavese tomm...@pavese.me wrote: Hello, Unicorn’s homepage (http://unicorn.bogomips.org/) seems to have lost CSS and JS. I switched to olddoc recently to get rid of CSS/images and haven't used JS for several years before that:

[PATCH 0/2] no avoiding rack.hijack anymore

2015-05-16 Thread Eric Wong
I'm not sure if it makes sense to use rack.hijack with a prefork server like unicorn which only works behind nginx, but maybe somebody does... Eric Wong (2): http_request: support rack.hijack by default avoid extra allocation for hijack proc creation lib/unicorn/http_request.rb | 40

[PATCH 1/2] http_request: support rack.hijack by default

2015-05-16 Thread Eric Wong
Rack 1.4 and earlier will soon die out, so avoid having extra code The only minor overhead is assigning two hash slots and the extra hash checks when running ancient versions of Rack, so it is unlikely anybody cares about that overhead with Rack 1.5 and later. --- lib/unicorn/http_request.rb |

[PATCH 2/2] avoid extra allocation for hijack proc creation

2015-05-16 Thread Eric Wong
proc creation is expensive, so merely use a 48-byte generic ivar hash slot for @socket instead. --- lib/unicorn/http_request.rb | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/lib/unicorn/http_request.rb b/lib/unicorn/http_request.rb index b32003e..b60e383

[PATCH] FAQ: add note about ECONNRESET errors from bodies

2015-05-18 Thread Eric Wong
Thanks to Michael Fischer and Gabe Martin-Dempesy for bringing this to light on the mailing list. Ref: cabhxty7sn5yair5a3gdk1g4xyse+utfuqutcosdmwnexld5...@mail.gmail.com Ref: fc91211e-fd32-432c-92fc-0318714c2...@zendesk.com Cc: Michael Fischer mfisc...@zendesk.com Cc: Gabe Martin-Dempesy

Re: SIGWINCH ignored...

2015-05-19 Thread Eric Wong
Don't send HTML parts, it is flagged as spam and nearly lost. Onto your question... Dan Moore d...@vaporwa.re wrote: I’m interested in the SIGWINCH signal and specifically the message that is posted to the console at an INFO level instead of DEBUG level:

[PATCH] http_response: avoid special-casing for Rack 1.5

2015-05-19 Thread Eric Wong
Rack 1.4 and earlier will soon die out, so avoid having extra, overengineered code and method dispatch to silently drop support for mis-hijacking with old Rack versions. This will cause improperly hijacked responses in all versions of Rack to fail, but allows properly hijacked responses to work

Re: SIGWINCH ignored...

2015-05-20 Thread Eric Wong
Dan Moore d...@vaporwa.re wrote: Thank you, that's perfect. +1 for unicorn 5 patch. Thanks for the confirmation, pushed as the following commit: commit a6077391bb62d0b13016084b0eea36b987afe8f0 Author: Eric Wong e...@80x24.org Date: Wed May 20 22:15:48 2015 + process SIGWINCH unless

[PATCH] http_response: simplify regular expression

2015-06-05 Thread Eric Wong
It's ugly and less-readable to have redundant \z statements, and according to ObjectSpace.memsize_of, this saves 4 bytes on x86-64. --- lib/unicorn/http_response.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/unicorn/http_response.rb b/lib/unicorn/http_response.rb

Re: unicorn: native systemd service

2015-06-25 Thread Eric Wong
Dmitry Smirnov only...@debian.org wrote: On Wed, 24 Jun 2015 23:26:49 Eric Wong wrote: Dmitry: unicorn upstream here, is there anything in unicorn itself can do to make systemd integration easier? Thank you very much for keeping an eye on us and for all your help. I'm not sure if we need

TAN: Ragel now maintained by Colm networks

2015-06-26 Thread Eric Wong
As most of you know, unicorn has always used Ragel for HTTP parsing (inherited from Mongrel). For the most part, Ragel works great and does not need much maintenance. I made some changes to work with the Ragel 5-to-6 transition for Mongrel (pre-unicorn) and that was it. Since I mainly use Ragel

Re: Does the the environment is preserved on USR2?

2015-06-26 Thread Eric Wong
Eric Wong e...@80x24.org wrote: USR2 should not change environment variables besides UNICORN_FD and PWD (if working_directory is used). On most Linux versions, you can check the initial environment of a running process by inspecting the environ file for the process: tr '\0' '\n

[PATCH] apply TCP socket options on inherited sockets

2015-06-26 Thread Eric Wong
TCP socket options are now set when inheriting existing sockets from a parent process. I'm fairly certain all the TCP setsockopt knobs we use are idempotent and harmless to change. If anything, the only directive I'd be uncomfortable changing is shortening the listen(2) (aka :backlog) size, but

Re: [DRE-maint] unicorn: native systemd service

2015-06-26 Thread Eric Wong
Christos Trochalakis yati...@ideopolis.gr wrote: On Thu, Jun 25, 2015 at 11:26:26PM +, Eric Wong wrote: With socket activation, you should just be able to kill unicorn using SIGQUIT (just master, or even all workers) and restart without ever dropping a connection. I do NOT suggest using

[RFC] emulate sd_listen_fds for systemd support

2015-06-26 Thread Eric Wong
Unfortunately, testing this is tricky because FD=3 (SD_LISTEN_FDS_START) tends to be grabbed by (MRI) Ruby 1.9.3 and onwards for the internal self-pipe. So for now, I've manually tested this with a systemd installation Disclaimer: this is also my first experience using systemd --- Eric Wong e

[ANN] unicorn 5.0.0.pre1 - incompatible changes!

2015-06-15 Thread Eric Wong
This release finally drops Ruby 1.8 support and requires Ruby 1.9.3 or later. The horrible Status: header in our HTTP response is finally gone, saving at least 16 precious bytes in every single HTTP response. Under Ruby 2.1 and later, the monotonic clock is used for timeout handling for better

[PATCH] http: use rb_hash_clear in Ruby 2.0+

2015-05-29 Thread Eric Wong
Calling the function directly avoids the overhead of Ruby method table lookup and global method cache. The only downside is this is now hidden from tracers and cannot be overridden from Ruby, but I doubt anybody cares about that. --- ext/unicorn_http/extconf.rb | 1 +

[PATCH] www: install NEWS.atom.xml properly

2015-06-01 Thread Eric Wong
I just noticed the 4.9.0 release was not properly reflected in the Atom news feed at http://unicorn.bogomips.org/NEWS.atom.xml --- GNUmakefile | 1 + 1 file changed, 1 insertion(+) diff --git a/GNUmakefile b/GNUmakefile index 2995a6b..3f9c441 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -178,6

Re: Unicorn returns blank page after no use

2015-07-01 Thread Eric Wong
Farjad Adamjee fadam...@vailsys.com wrote: Hello, I am not sure if this is the correct place for this, I have googled around to see if anyone else has encountered such an issue, but I did not find anything. This is the correct place :) Plain-text email is the only way I handle support for

[PATCH] test/unit/test_response.rb: compatibility with older test-unit

2015-07-04 Thread Eric Wong
assert_predicate really isn't that useful even if it seems preferred in another project I work on. Avoid having folks download the latest test-unit if they're on an old version of Ruby (e.g. 1.9.3) which bundled it. --- test/unit/test_response.rb | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH v2] emulate sd_listen_fds for systemd support

2015-07-04 Thread Eric Wong
, 2015 at 04:01:36AM +, Eric Wong wrote: Unfortunately, testing this is tricky because FD=3 (SD_LISTEN_FDS_START) tends to be grabbed by (MRI) Ruby 1.9.3 and onwards for the internal self-pipe. OK, that was a bogus note. I forgot exec() in Ruby 1.9+ supports redirects natively

[PATCH] stream_input: favor String#clear over String#replace

2015-08-21 Thread Eric Wong
We no longer need Ruby 1.8 compatibility, so use String#clear to reduce argument passing and code size. --- lib/unicorn/stream_input.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/unicorn/stream_input.rb b/lib/unicorn/stream_input.rb index 9278f47..de5aeea 100644

TAN: Coquelicot

2015-06-30 Thread Eric Wong
Lunar lu...@anargeek.net wrote: Rainbows! is used by Coquelicot: https://coquelicot.potager.org/ The project needs some love, but I know about several installations that are used on a daily basis. Interesting! I'm honestly a bit disappointed it's not a generic Rack app and depends on

Re: Question: How to limit size of log error files

2015-07-24 Thread Eric Wong
Dowd, Stephen stephen.d...@emc.com wrote: I'd like to control the size and on disk layout of the unicorn error and output logs. Basically I want ruby Logger like functionality where I can specify a fixed # of rolling logs each of which is limited to # mb in size. Not sure how to do this in

[PATCH] configurator: document net.core.somaxconn sysctl dependency

2015-07-15 Thread Eric Wong
Linux users are effectively capped to 128 on stock installations and may wonder why connections get rejected with overloaded apps sooner rather than later. --- lib/unicorn/configurator.rb | 5 + 1 file changed, 5 insertions(+) diff --git a/lib/unicorn/configurator.rb

[PATCH] doc: remove references to old servers

2015-07-15 Thread Eric Wong
They'll continue to be maintained, but we're no longer advertising them. Also, favor lowercase unicorn while we're at it since that matches the executable and gem name to avoid unnecessary escaping for RDoc. --- Application_Timeouts | 6 +++--- KNOWN_ISSUES | 14

[PATCH 2/2] inheriting sockets from UNICORN_FD does not close them

2015-10-26 Thread Eric Wong
For some reason, I thought invalid descriptors passed to UNICORN_FD would be automatically closed by the master process; but apparently this hasn't been the case. On the other hand, this bug has been around for over 6 years now and nobody noticed or cared enough to tell us, so fixing it might

[PATCH 1/2] sd_listen_fds emulation cleanup

2015-10-26 Thread Eric Wong
Re-enable and expand on the test case while we're at it for new Rubies. The bug is now fixed in Ruby 2.3.0dev as of r51576. We shall assume anybody running a pre-release 2.3.0 at this point is running a fairly recent snapshot, so we won't bother doing a finer-grained check in the test for an

[PATCH 0/2] socket inheritance behavior/bug => feature!

2015-10-26 Thread Eric Wong
be. And then I noticed we have an existing bug as documented in 2/2 which would allow the user to be DRY after all. Eric Wong (2): sd_listen_fds emulation cleanup inheriting sockets from UNICORN_FD does not close them Documentation/unicorn.1.txt | 4 +--- lib/unicorn/http_server.rb | 4

Re: Shared Metrics Between Workers

2015-11-12 Thread Eric Wong
Jeff Utter wrote: > The earliest, promising solution I considered was raindrops, but it looks > as though you need to know all of the possible metrics up front - which > won't necessarily work as prometheus could use metrics based on parameters > which could vary. You

Re: Shared Metrics Between Workers

2015-11-13 Thread Eric Wong
Jeff Utter <jeff.ut...@firespring.com> wrote: > On November 12, 2015 at 7:23:13 PM, Eric Wong (e...@80x24.org) wrote: > > You don't have to return all the data you'd aggregate with raindrops, > > though. Just what was requested. > > Just to make sure I under

Re: undefined method `include?' for nil:NilClass (NoMethodError)

2015-11-16 Thread Eric Wong
Owen Ou wrote: > We recently upgraded to Unicorn 5.0 but getting the following error: > > [2015-11-16T14:54:16.943652 #19838] ERROR -- : app error: undefined > method `include?' for nil:NilClass (NoMethodError) > > E, [2015-11-16T14:54:16.943712 #19838] ERROR -- : >

[PATCH 2/3] gemspec: relax Ruby version requirement for old RubyGems

2015-11-01 Thread Eric Wong
Older RubyGems (1.8.23.2 at least) does not seem to support multiple version requirements for the Ruby version; so drop the lower 1.9.3 requirement for now. --- unicorn.gemspec | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/unicorn.gemspec b/unicorn.gemspec

[PATCH 0/3] last updates before 5.0 release

2015-11-01 Thread Eric Wong
Nothing significant... Eric Wong (3): golf down conditional for socket activation gemspec: relax Ruby version requirement for old RubyGems doc updates ISSUES | 2 +- Links | 7 --- lib/unicorn/http_server.rb | 2

[PATCH 3/3] doc updates

2015-11-01 Thread Eric Wong
ISSUES: note images are considered spam as well as HTML. Links: Clarify we may only endorse the Free versions of nginx, not the non-Free versions. Add a link to Starman as a unicorn derivative, as I even use Starman myself. Remove yahns, since it's really the complete opposite of unicorn and

[ANN] unicorn 5.0.0 - Rack HTTP server for fast clients and *nix

2015-11-01 Thread Eric Wong
Unicorn is an HTTP server for Rack applications designed to only serve fast clients on low-latency, high-bandwidth connections and take advantage of features in Unix/Unix-like kernels. Slow clients should only be served by placing a reverse proxy capable of fully buffering both the the request

unicorn non-technical FAQ

2015-10-14 Thread Eric Wong
Maybe this should be on the website somewhere, but the mailing list archives are quite accessible nowadays. Fwiw, I tend to followup publically (anonymized content) with technical stuff to the private email address , but never publically address the non-technical questions.

[PATCH] unicorn.conf.rb: remove mention of REE-specific setting

2015-10-15 Thread Eric Wong
Ruby 2.0+ has a copy-on-write-friendly memory layout by default, and REE is long dead and just confusing to new users. --- examples/unicorn.conf.rb | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/examples/unicorn.conf.rb b/examples/unicorn.conf.rb index 4b28a5a..1e05cbb

[PATCH] test_exec: disable systemd inheritance test

2015-07-07 Thread Eric Wong
Turns out ruby does have trouble emulating systemd, for now: [ruby-core:69895] https://bugs.ruby-lang.org/issues/11336 When we re-enable this test, we'll only enable it for fixed Rubies. The actual socket inheritance functionality works in any version of Ruby, of course, it's just that emulating

[ANN] unicorn 5.0.1 - Rack HTTP server for fast clients and *nix

2015-11-17 Thread Eric Wong
Unicorn is an HTTP server for Rack applications designed to only serve fast clients on low-latency, high-bandwidth connections and take advantage of features in Unix/Unix-like kernels. Slow clients should only be served by placing a reverse proxy capable of fully buffering both the the request

Re: Monitoring active/idle unicorn process stats

2015-09-02 Thread Eric Wong
Christian Pedersen wrote: > Is it possible to query the number of busy/idle unicorn workers? What Carl said. You can also use Raindrops::Linux.tcp_listener_stats for TCP for a similar effect. Raindrops also includes a different module, Raindrops::Watcher, to be used as

Re: Request Queueing after deploy + USR2 restart

2015-09-13 Thread Eric Wong
Bráulio Bhavamitra wrote: > Sakis, ressurecting this. > > I'm seeing this after the upgrade from rails 3.2 to rails 4.2. Maybe it is > because of adequate record and other "cached on first time used" stuff. I'm not knowledgeable enough to comment on Rails , but "cache on

Re: Request to follow SemVer/mention it in homepage

2015-09-29 Thread Eric Wong
Pirate Praveen wrote: > Do you follow Semantic Versioning as defined by semver.org? If yes, > can you mention it on the homepage? If not, can you consider it? Maybe we follow semver... No, I'd rather not mention it on the homepage or be formally/officially bound to it (see

Re: Request to follow SemVer/mention it in homepage

2015-09-30 Thread Eric Wong
Pirate Praveen wrote: > Can you mention the recommended way of adding unicorn in a Gemfile in > your home page? I'm not very knowledgeable about bundler, but app servers probably should not be in any packaged Gemfile at all. > gitlab and diaspora has unicorn in their

Re: Request to follow SemVer/mention it in homepage

2015-10-01 Thread Eric Wong
Pirate Praveen wrote: > With debian packaging, our aim is to get a user setup an application > like gitlab or diaspora, just using the package manager they are > already familiar with. They don't have to know what language it is > written, what framework or application server

[PUSHED] various documentation updates

2016-01-06 Thread Eric Wong
* add nntp_url to the olddoc website footer * update legacy support status for 4.x (not 4.8.x) * update copyright range to 2016 * note all of our development tools are Free Software, too * remove cgit mention; it may not always be cgit (but URLs should remain compatible). * discourage

Re: [PATCH] limit rack version for ruby compatibility

2016-01-08 Thread Eric Wong
Adam Duke wrote: > From: Adam Duke > Date: Fri, 8 Jan 2016 13:06:31 -0500 > Subject: [PATCH] limit rack version for ruby compatibility > > rack introduced a dependency on ruby 2.2.2 or greater in >

if you want to unsubscribe

2016-01-08 Thread Eric Wong
mlmmj[1] needs to know YOUR email address when you email: unicorn-public+unsubscr...@bogomips.org Do NOT use "unroll.me" or similar services. They are meant for unsubscribing from marketing lists with unique unsubscription addresses for each recipient. That's not how discussion list

Re: [PATCH] limit rack version for ruby compatibility

2016-01-08 Thread Eric Wong
were empty; HTTP status lines would just be short and non-descriptive. * The Rack::Builder dependency can be optional, even. Fwiw, I plan to support Rack 1.x and Ruby 1.9.3 under unicorn for a few more years because of LTS distros. New versions take priority, of course. > On Fri, Jan 08, 20

[PATCH] examples: add systemd socket and service files

2015-11-17 Thread Eric Wong
Since we have init scripts, we ought to have the equivalent for systemd users who cannot upgrade via the normal SIGUSR2 mechanism; but can use multiple services: "unicorn@1" + h"unicorn@2" to accomplish the same thing. Based on examples by Christos Trochalakis ref:

[PATCH] add .gitattributes for Ruby method detection

2015-11-17 Thread Eric Wong
The "diff" function detection for C does not map well to Ruby files, take advantage of gitattributes(5) to improve method name detection in generated patches as well as making "git diff -W" output more useful. --- .gitattributes | 5 + 1 file changed, 5 insertions(+) create mode 100644

Re: behaviour with signal HUP

2016-01-13 Thread Eric Wong
Francesco Savignago wrote: > Hi unicorn. > Asking a question about a thing that I am not able to test: does > sending a HUP signal to unicorn results in connections being dropped > or kept? The connection is kept during any socket I/O and application processing.

[PATCH] examples/init.sh: update to reduce upgrade raciness

2016-06-07 Thread Eric Wong
Jesper Rønn-Jensen <jespe...@gmail.com> wrote: > On Tue, Jun 7, 2016 at 3:41 PM, Eric Wong <e...@80x24.org> wrote: > > Jesper Rønn-Jensen <jespe...@gmail.com> wrote: > >> +++ b/examples/init.sh > >> @@ -45,7 +45,7 @@ restart|reload) > >> $CM

Re: [PATCH] `unicorn upgrade` script resilience against exceptions

2016-06-07 Thread Eric Wong
Jesper Rønn-Jensen wrote: > This is actually a change proposal "by accident". But first, some > background: Please don't send HTML mail. I guess the bounce message didn't include the reason for the bounce, but should be fixed; now; and the bounce will

[PATCH] doc: systemd should only kill master in example

2016-06-13 Thread Eric Wong
By default, systemd kills every process in the control group when stopping a service. While it ought to be harmless to signal workers, some Rack applications (and perhaps further subprocesses) can misbehave when interrupted by a signal. Ensure we only hit the master on graceful shutdown to avoid

Re: Unicorn is a famous and widely use software, but why official website look so outdate?

2016-05-26 Thread Eric Wong
Zheng Cheng wrote: Please don't send HTML email; it is bloated, spammy and your mail got stuck in my spam filter instead of hitting the list. About the Subject, unicorn itself is outdated by design: http://unicorn.bogomips.org/PHILOSOPY.html

Re: [PATCH] examples/init.sh: update to reduce upgrade raciness

2016-06-15 Thread Eric Wong
Eric Wong <e...@80x24.org> wrote: > https://bogomips.org/unicorn.git/plain/examples/init.sh?h=jr/init Hi Jesper, did you get a chance to test this updated init script? Any feedback would be appreciated, thanks. ref: https://bogomips.org/unicorn-public/20160607211354.ga21...@dcvr

Re: unicorn log attack?

2016-01-30 Thread Eric Wong
Lawrence Pit wrote: > Hi Eric, > > I'm writing to you directly instead of to the unicorn-public list. Which got your HTML email tarpitted in my spam folder instead of being bounced back right away so you could fix it :) > I noticed yesterday our unicorn.log files, which

Re: [PATCH] limit rack version for ruby compatibility

2016-01-26 Thread Eric Wong
Eric Wong <e...@80x24.org> wrote: > I prefer we drop the rack dependency entirely. We don't use rack > for much. This seems doable, (totally untested) patch below: (removed rack-devel from Cc:) Tested and pushed to unicorn.git master with minor chang

Re: Systemd socket inheritance fails with “not a socket file descriptor”

2016-03-11 Thread Eric Wong
Amir Yalon wrote: > I will try to run my app using the 3rd method and report back as soon as > I can. Looking forward to it. I'd like to release 5.1.0 final with any necessary updates (most likely documentation) needed for this problem in a week or so. A huge thanks for

Re: https://unicorn.bogomips.org accepts client certificate?

2016-03-15 Thread Eric Wong
"Shota Fukumori (sora_h)" wrote: > Hi, > > I found that https://unicorn.bogomips.org/ accepts client certificate. > My browser prompts what certificate to use for a connection, even > https://unicorn.bogomips.org/ doesn't require a client certificate. +Cc yahns-pub...@yhbt.net

[PATCH] doc: further trimming to reduce noise

2016-03-30 Thread Eric Wong
It's not worth mentioning pre-Rack versions of Rails anymore, and there are a few async Rack applications reliant on EventMachine which we do not use. Some uses of chunked request decoding are not well-handled with nginx in front, anyways; so avoid mentioning them. Additionally, avoid

Re: Systemd socket inheritance fails with “not a socket file descriptor”

2016-03-08 Thread Eric Wong
Amir Yalon wrote: > Interesting. With the testing patch applied, we’re now failing this > test in thread_pthread.c: > http://bogomips.org/mirrors/ruby.git/tree/thread_pthread.c#n1720 > Which then raises the following exception in io.c: >

[ANN] unicorn 5.1.0 - Rack HTTP server for fast clients and *nix

2016-03-31 Thread Eric Wong
Unicorn is an HTTP server for Rack applications designed to only serve fast clients on low-latency, high-bandwidth connections and take advantage of features in Unix/Unix-like kernels. Slow clients should only be served by placing a reverse proxy capable of fully buffering both the the request

Re: Please join the Rack Specification discussion for `env['upgrade.websocket']`

2016-08-05 Thread Eric Wong
Boaz Segev wrote: > Running two (or more) event loops, each with it's own > resources, is wasteful and promotes needless context switches. > > There is no reason to hijack a socket when the server can > easily provide callbacks for IO related events using it's > existing

Re: Please join the Rack Specification discussion for `env['upgrade.websocket']`

2016-08-08 Thread Eric Wong
Sam Saffron wrote: > For the record Eric, > > We use unicorn at Discourse to serve concurrent long polls across 100s > of hosted forums using hijack with zero issues using > https://github.com/SamSaffron/message_bus Thanks. That's exactly the usage I had in mind when I

[PATCH] doc: update gmane URLs to point to our own archives

2016-07-28 Thread Eric Wong
Gmane's NNTP server remains up, but the HTTP site is down: https://lars.ingebrigtsen.no/2016/07/28/the-end-of-gmane/ Anyways, our own archives are designed to be mirror-able via git: git clone --mirror https://bogomips.org/unicorn-public And the code is self-hostable: git clone

Re: WTF is up with memory usage nowadays?

2017-02-08 Thread Eric Wong
Eric Wong <e...@80x24.org> wrote: > The Rack response body only needs to respond to #each. > There should be no reason to build giant response > documents in memory before sending them to a client. > > unicorn can't do the following for you automatically since

[PATCH] tee_input: simplify condition for IO#write

2017-02-10 Thread Eric Wong
IO#write already elides the write(2) syscall for empty buffers, so there's no need to complicate our instruction sequence footprint for the rare case of an empty buffer. The only cases a Rack app will have an empty buffer are: 1) `env['rack.input'].read` without args 2) `env['rack.input'].gets`

response_start_sent (check_client_connection) is staying

2017-02-15 Thread Eric Wong
There's no way I would remove this feature or any other feature other people rely on. Just pushed this out: commit c4b58719e8aa7f2b4979d139ca166a8c6a11eb7e Author: Eric Wong <e...@80x24.org> Date: Wed Feb 15 18:37:10 2017 + Revert "remove response_start_sent&quo

Re: systemd with logs to journald

2016-09-09 Thread Eric Wong
Bill Lipa wrote: > Hello, > > Is there a recommended way to run unicorn under systemd and get its > stdout/err to go to journald rather than into a file on disk? I > prefer to minimize the number of places I have to look for errors. Remove the stdout_path and stderr_path

Re: systemd with logs to journald

2016-09-09 Thread Eric Wong
Please don't drop the Cc: to unicorn-public@bogomips.org, other readers are following along. Bill Lipa wrote: > If I do that, the output goes nowhere, I assume because I'm using the > -D flag on the ExecStart: > ExecStart=/home/ops/bin/bundle exec "unicorn_rails -D -c >

[PATCH] relocate website to https://bogomips.org/unicorn/

2016-10-25 Thread Eric Wong
HTTPS helps some with reader privacy and Let's Encrypt seems to be working well enough the past few months. This change will allow us to reduce subjectAltName bloat in our TLS certificate over time. It will also promote domain name agility to support mirrors or migrations to other domains

  1   2   >