Re: adding GPLv3 to unicorn license

2011-08-20 Thread Iñaki Baz Castillo
like unicorn to be under the terms of something like the AGPLv3. I'll email the other contributors who have more trivial contributions if you guys agree.  Thanks! Hi, I'm fine with it, fully. Cheers. -- Iñaki Baz Castillo i...@aliax.net ___ Unicorn

Re: [ANN] kgio library / RubyGem

2010-12-22 Thread Iñaki Baz Castillo
? :) -- Iñaki Baz Castillo i...@aliax.net ___ Unicorn mailing list - mongrel-unicorn@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-unicorn Do not quote signatures (like this one) or top post when replying

Re: Some issues in the HTTP parser (and suggestions)

2010-05-08 Thread Iñaki Baz Castillo
. [*] http://dev.sipdoc.net/projects/ragel-sip-parser/wiki/Phase1 -- Iñaki Baz Castillo i...@aliax.net ___ Unicorn mailing list - mongrel-unicorn@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-unicorn Do not quote signatures (like this one

Some issues in the HTTP parser (and suggestions)

2010-05-07 Thread Iñaki Baz Castillo
)|value_cont) : CRLF; - It doesn't allow valid spaces before : as: Host : mydomain.org - Tabulators are also allowed. I suggest: message_header = ((field_name [ \t]* : [ \t]* field_value)|value_cont) : CRLF; Regards. -- Iñaki Baz Castillo i...@aliax.net

Shared memory between workers

2010-04-26 Thread Iñaki Baz Castillo
processes. For that I would also need a semaphore system (perhaps again a shared variable between all workers in order to lock the shared Array/Hash when a worker writes into it). Any tip about it? suggstions? Thanks a lot. -- Iñaki Baz Castillo i...@aliax.net

Re: Shared memory between workers

2010-04-26 Thread Iñaki Baz Castillo
client API which forces the server to store/sync the on memory data to the file (if a file is being used). So thanks a lot. Definitely I'll learn about TokioCabinet as it seems a really nice solution for my needs. Regards. -- Iñaki Baz Castillo i...@aliax.net

Using HTTP/1.1 and permanent connections

2010-04-16 Thread Iñaki Baz Castillo
is really good, better than using persistent connections, but I want to experiment with persistent connections for other purposes I will explain in a future. Thanks a lot. -- Iñaki Baz Castillo i...@aliax.net ___ Unicorn mailing list - mongrel-unicorn

Explanation of how Unicorn returns error code when daemonized and cannot bind the address

2010-04-15 Thread Iñaki Baz Castillo
wrong, could you detail it a bit please? I want to propose the same improvement in other project in which I participate. Really thanks a lot. -- Iñaki Baz Castillo i...@aliax.net ___ Unicorn mailing list - mongrel-unicorn@rubyforge.org http

Re: Explanation of how Unicorn returns error code when daemonized and cannot bind the address

2010-04-15 Thread Iñaki Baz Castillo
2010/4/15 Iñaki Baz Castillo i...@aliax.net: Hi Eric, as you remember you did an improvement in Unicorn in order it to return an error code (maybe 1) when running daemonized and trying to bind in a wrong address (i.e. a non local address). As far as I remember you implemented a pipe between

Re: Monit configuration

2010-03-08 Thread Iñaki Baz Castillo
and it takes into accoutn of the child processes. The trick is telling monit to inspect the master process pid (that present unde /var/lib/SERVER.pid). -- Iñaki Baz Castillo i...@aliax.net ___ Unicorn mailing list - mongrel-unicorn@rubyforge.org http

Re: Confused classes

2010-02-06 Thread Iñaki Baz Castillo
the same DB connection (the same ActiveRecord instances) so the problem arises. Take a look to the configuration here: http://unicorn.bogomips.org/examples/unicorn.conf.rb You can see there how the ActiveRecord is disconnected at the beggining and started for each worker later. -- Iñaki Baz

About new commit xpath methods can return things other than nodesets

2010-01-22 Thread Iñaki Baz Castillo
operation and evaluates it (empty, number of entries) by alwasying inspecting the NodeSet#size method. Should I care about this new commit? Could occur that Xpath returns something but a NodeSet in my case? Thanks. -- Iñaki Baz Castillo i...@aliax.net

Re: About new commit xpath methods can return things other than nodesets

2010-01-22 Thread Iñaki Baz Castillo
Sorry, wrong list. -- Iñaki Baz Castillo i...@aliax.net ___ Unicorn mailing list - mongrel-unicorn@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-unicorn Do not quote signatures (like this one) or top post when replying

Re: Suggestion for reload action (USR2)

2010-01-21 Thread Iñaki Baz Castillo
El Miércoles, 20 de Enero de 2010, Eric Wong escribió: Iñaki Baz Castillo i...@aliax.net wrote: El Miércoles, 20 de Enero de 2010, Eric Wong escribió: While the patch was not needed for this case, inline patches are strongly preferred here. Inline patches are far easier to read, reply

Re: [PATCH] initialize signal handlers before writing pid file

2010-01-20 Thread Iñaki Baz Castillo
loop to check it: while [ 0 ] ; do /etc/init.d/myserver reload ; done -- Iñaki Baz Castillo i...@aliax.net ___ Unicorn mailing list - mongrel-unicorn@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-unicorn Do not quote signatures (like

Suggestion for reload action (USR2)

2010-01-20 Thread Iñaki Baz Castillo
an option --reload in OptionParser in bin/unicorn. - Store such option somewhere so it can be readed later by the Rack application or other library. - Add --reload to the list of original arguments when receiving USR2. Opinnions? -- Iñaki Baz Castillo i...@aliax.net

Re: Suggestion for reload action (USR2)

2010-01-20 Thread Iñaki Baz Castillo
El Miércoles, 20 de Enero de 2010, Iñaki Baz Castillo escribió: This would involve just three changes: - Add an option --reload in OptionParser in bin/unicorn. - Store such option somewhere so it can be readed later by the Rack application or other library. - Add --reload to the list

Re: Suggestion for reload action (USR2)

2010-01-20 Thread Iñaki Baz Castillo
-to and apply than attachments. Sure but what about the fixed 80 columns of a mail? Of course I can generate the mail without such constrain, but it doesn't look very cool :) Thanks a lot. -- Iñaki Baz Castillo i...@aliax.net ___ Unicorn mailing list

Re: Issue when sending USR2 too soon

2010-01-18 Thread Iñaki Baz Castillo
El Lunes, 18 de Enero de 2010, Eric Wong escribió: Iñaki Baz Castillo i...@aliax.net wrote: El Domingo, 17 de Enero de 2010, Iñaki Baz Castillo escribió: What about if Unicorn very quicky prepares the trap for USR2 so in case it receives it soon when starting it ignores it (and logs some

Re: Issue when sending USR2 too soon

2010-01-18 Thread Iñaki Baz Castillo
files are inherently racy for the USR2 case. Perhaps your script can check the ctime of the pid file... Good suggestion :) -- Iñaki Baz Castillo i...@aliax.net ___ Unicorn mailing list - mongrel-unicorn@rubyforge.org http://rubyforge.org/mailman

Re: Issue when sending USR2 too soon

2010-01-16 Thread Iñaki Baz Castillo
El Domingo, 17 de Enero de 2010, Iñaki Baz Castillo escribió: What about if Unicorn very quicky prepares the trap for USR2 so in case it receives it soon when starting it ignores it (and logs some warning)? Does it make sense? Adding the following on the top of bin/unicorn solves the problem

Re: Why workers die when sending KILL to master?

2010-01-09 Thread Iñaki Baz Castillo
that as the ppid changes when the master process dies :) -- Iñaki Baz Castillo i...@aliax.net ___ Unicorn mailing list - mongrel-unicorn@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-unicorn Do not quote signatures (like this one) or top post when

Re: X-Forwarded-Proto / X_FORWARDED_PROTO

2010-01-09 Thread Iñaki Baz Castillo
) as HTTP_X_FORWARDED_PROTO: http,https could mean that the request has been sent using HTTPS and an intermediary proxy has forwarded it using HTTP. Of course the final destination (Unicorn application) must be ready to support such syntax. -- Iñaki Baz Castillo i...@aliax.net

Re: Why workers die when sending KILL to master?

2010-01-09 Thread Iñaki Baz Castillo
El Sábado, 9 de Enero de 2010, Iñaki Baz Castillo escribió: El Sábado, 9 de Enero de 2010, Eric Wong escribió: The worker_loop just compares Process.ppid with the original ppid it was started with. They wakeup from IO.select() every timeout/2 seconds to check for original_ppid != ppid

Using a worker for a different purpose

2010-01-07 Thread Iñaki Baz Castillo
)? is it possible? Thanks a lot. -- Iñaki Baz Castillo i...@aliax.net ___ Unicorn mailing list - mongrel-unicorn@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-unicorn Do not quote signatures (like this one) or top post when replying

Re: stderr_path doesn't work at the moment of being called

2010-01-05 Thread Iñaki Baz Castillo
El Martes, 5 de Enero de 2010, Iñaki Baz Castillo escribió: The second workaround is exactly what Unicorn does when calling to stderr_path (redirect_io method). So, why doesn't work for me without the hacks? do I miss something? By running 'exec ls -l /proc/$$/fd' after 'stderr_path' I've

Re: 'before_fork' is executed in parallel by two processes ¿?

2010-01-05 Thread Iñaki Baz Castillo
to before_fork: File.open(/tmp/lalala, ab) do |f| f.puts My PID is #{$$} end I confirm that there are two lines printed in that file when Unicorn starts (being 2 the number of workers). Is it the expected behavior? Regards. -- Iñaki Baz Castillo i...@aliax.net

Re: stderr_path doesn't work at the moment of being called

2010-01-05 Thread Iñaki Baz Castillo
El Martes, 5 de Enero de 2010, Eric Wong escribió: Iñaki Baz Castillo i...@aliax.net wrote: El Martes, 5 de Enero de 2010, Iñaki Baz Castillo escribió: The second workaround is exactly what Unicorn does when calling to stderr_path (redirect_io method). So, why doesn't work for me

Re: 'before_fork' is executed in parallel by two processes ¿?

2010-01-05 Thread Iñaki Baz Castillo
El Martes, 5 de Enero de 2010, Iñaki Baz Castillo escribió: I confirm that there are two lines printed in that file when Unicorn starts (being 2 the number of workers). Is it the expected behavior? Simpler example: - worker_processes 3 before_fork do |server, worker| puts

Re: 'before_fork' is executed in parallel by two processes ¿?

2010-01-05 Thread Iñaki Baz Castillo
for me). Thanks. -- Iñaki Baz Castillo i...@aliax.net ___ Unicorn mailing list - mongrel-unicorn@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-unicorn Do not quote signatures (like this one) or top post when replying

Re: 'before_fork' is executed in parallel by two processes ¿?

2010-01-05 Thread Iñaki Baz Castillo
El Miércoles, 6 de Enero de 2010, Eric Wong escribió: Iñaki Baz Castillo i...@aliax.net wrote: El Martes, 5 de Enero de 2010, Eric Wong escribió: Yes, before_fork and after_fork are both called for every worker forked. So if I just want to test a DB connection then I do better

Re: Raised exceptions are not logged when USR2

2010-01-04 Thread Iñaki Baz Castillo
is required. IO#reopen accepts a string (file path) or other IO, so converting SyslogLogger into a IO is required. I'll try to achieve it. Regards. -- Iñaki Baz Castillo i...@aliax.net ___ Unicorn mailing list - mongrel-unicorn@rubyforge.org http

Re: Raised exceptions are not logged when USR2

2010-01-02 Thread Iñaki Baz Castillo
El Sábado, 2 de Enero de 2010, Iñaki Baz Castillo escribió: Hi, I use the ready_pipe branch. I set logger to log into Syslog, but the issue I'll explain here is the same even if I log to a file. I runned Unicorn daemonized. Now imagine I do a typo in my Rack config.ru (I use preload=true

Re: Raised exceptions are not logged when USR2

2010-01-02 Thread Iñaki Baz Castillo
El Sábado, 2 de Enero de 2010, Iñaki Baz Castillo escribió: A simpler approach would be removing this line at the end of launcher.rb: Unicorn::Configurator::DEFAULTS[:stderr_path] = /dev/null With this, errors would be displayed in stderr. Of course for workers stderr should be reopened

Re: PID is not regenerated when using -P and the master receives USR2

2010-01-01 Thread Iñaki Baz Castillo
. -- Iñaki Baz Castillo i...@aliax.net ___ Unicorn mailing list - mongrel-unicorn@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-unicorn Do not quote signatures (like this one) or top post when replying

Re: Listening UNIX socket is not deleted when stopping Unicorn?

2009-12-31 Thread Iñaki Baz Castillo
expect the answer is yes as Unicorn does it. Thanks. -- Iñaki Baz Castillo i...@aliax.net ___ Unicorn mailing list - mongrel-unicorn@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-unicorn Do not quote signatures (like this one) or top post

PID is not regenerated when using -P and the master receives USR2

2009-12-31 Thread Iñaki Baz Castillo
In case of using unicorn -P PIDFILE when the master receives a USR2 the pidfile is deleted and not regenerated anymore. In case of using pid mehotd in config file then it works well. It seems a bug, do I miss something? Regards. -- Iñaki Baz Castillo i...@aliax.net

Re: PID is not regenerated when using -P and the master receives USR2

2009-12-31 Thread Iñaki Baz Castillo
El Jueves, 31 de Diciembre de 2009, Eric Wong escribió: Iñaki Baz Castillo i...@aliax.net wrote: El Jueves, 31 de Diciembre de 2009, Iñaki Baz Castillo escribió: In case of using unicorn -P PIDFILE when the master receives a USR2 the pidfile is deleted and not regenerated anymore

Re: Do we let Nginx to handle response Transfer-Encoding?

2009-12-28 Thread Iñaki Baz Castillo
El Lunes, 28 de Diciembre de 2009, Eric Wong escribió: Iñaki Baz Castillo i...@aliax.net wrote: Hi, I've checked that in case my Rack application (under Unicorn) doesn't set Content-Lentgh neither Transfer-Encoding, then Nginx automatically adds Transfer-Encoding: chunked to the response

Re: unicorn -D always returns 0 success (even when failed to load)

2009-12-28 Thread Iñaki Baz Castillo
user (and group) so also themaster process would run as such user? Thanks. -- Iñaki Baz Castillo i...@aliax.net ___ Unicorn mailing list - mongrel-unicorn@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-unicorn Do not quote signatures (like

Re: Listening UNIX socket is not deleted when stopping Unicorn?

2009-12-28 Thread Iñaki Baz Castillo
USR2+QUIT, if you're switching between Ruby installations for example. ok, understood. Thanks. -- Iñaki Baz Castillo i...@aliax.net ___ Unicorn mailing list - mongrel-unicorn@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-unicorn Do

Re: Listening UNIX socket is not deleted when stopping Unicorn?

2009-12-28 Thread Iñaki Baz Castillo
). There are some ways to run a commandwith other user (as su) but AFAIK most of the servers implement full user switching (not just worker processes) by themself. Regards. -- Iñaki Baz Castillo i...@aliax.net ___ Unicorn mailing list - mongrel

Re: Listening UNIX socket is not deleted when stopping Unicorn?

2009-12-28 Thread Iñaki Baz Castillo
El Lunes, 28 de Diciembre de 2009, Iñaki Baz Castillo escribió: El Lunes, 28 de Diciembre de 2009, Eric Wong escribió: Since there's absolutely no point in running Unicorn on port 80/443, you should just avoid user switching entirely since it'll significantly simplify your setup(s

Re: unicorn -D always returns 0 success (even when failed to load)

2009-12-26 Thread Iñaki Baz Castillo
El Sábado, 26 de Diciembre de 2009, Iñaki Baz Castillo escribió: El Sábado, 26 de Diciembre de 2009, Eric Wong escribió: http://oversip.net/public/min_time_running.rb It contains a modification for bin/unicorn and a rewritten lib/unicorn/launcher.rb. Interesting, I could

Re: unicorn -D always returns 0 success (even when failed to load)

2009-12-26 Thread Iñaki Baz Castillo
El Domingo, 27 de Diciembre de 2009, Iñaki Baz Castillo escribió: In both cases, if preload_app is false then doing a ps I see new master processes being created by first master process (with new workers) and all of them die while new ones born. Here I meant: if preload_app is true

Re: How to trap USR2 for custom ussage ?

2009-12-24 Thread Iñaki Baz Castillo
application database(s) connection and so. What would you suggest for this rather than DRb server? Again thanks a lot for your help. -- Iñaki Baz Castillo i...@aliax.net ___ Unicorn mailing list - mongrel-unicorn@rubyforge.org http://rubyforge.org

Why --pid is deprecated?

2009-12-24 Thread Iñaki Baz Castillo
why? In order to build a service init script is really common the init script to handle the PID file so it can start, restart or stop the process runnining under that PID value. Which is the real advantage of using pid directive in config file rather than --pid? Thanks. -- Iñaki Baz Castillo

unicorn -D always returns 0 success (even when failed to load)

2009-12-22 Thread Iñaki Baz Castillo
to return). Does it make sense? Thanks a lot. -- Iñaki Baz Castillo i...@aliax.net ___ Unicorn mailing list - mongrel-unicorn@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-unicorn Do not quote signatures (like this one) or top post when