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: stderr_path doesn't work at the moment of being called

2010-01-05 Thread Eric Wong
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 without the hacks? do I miss something? By running

Unicorn, Rails and Memcached

2010-01-05 Thread Stefan Maier
Hi, I am running unicorn with rails and memcached. The combination usually works flawlessly but sometimes when I retrieve an item from memcached i get a different, unrelated item. At the moment I'm more or less investigating in all directions and after reading

Re: Unicorn, Rails and Memcached

2010-01-05 Thread Eric Wong
Stefan Maier stefanma...@gmail.com wrote: Hi, I am running unicorn with rails and memcached. The combination usually works flawlessly but sometimes when I retrieve an item from memcached i get a different, unrelated item. At the moment I'm more or less investigating in all directions and

Re: Unicorn, Rails and Memcached

2010-01-05 Thread Stefan Maier
Am 1/5/10 11:34 PM, schrieb Eric Wong: Stefan Maier stefanma...@gmail.com wrote: Hi, I am running unicorn with rails and memcached. The combination usually works flawlessly but sometimes when I retrieve an item from memcached i get a different, unrelated item. At the moment I'm more or

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, Eric Wong escribió: So I'm totally lost. However if I test my databases in before_fork then I see N number of DB connections (N = workers num). How are you testing the database? `` or via Ruby code? I use Ruby Sequel ORM. I've also added the following code

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 execut ed in parallel by two processes ¿?

2010-01-05 Thread Eric Wong
Iñaki Baz Castillo i...@aliax.net wrote: El Martes, 5 de Enero de 2010, Eric Wong escribió: So I'm totally lost. However if I test my databases in before_fork then I see N number of DB connections (N = workers num). How are you testing the database? `` or via Ruby code? I use Ruby

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
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 wrtitting such code out of before_fork in the config file, right? (at least it's the workaround that works for

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: 'before_fork' is execut ed in parallel by two processes ¿?

2010-01-05 Thread Eric Wong
Iñaki Baz Castillo i...@aliax.net wrote: 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