run_later not running behind passenger

12 views
Skip to first unread message

Justin

unread,
Nov 18, 2008, 12:43:43 AM11/18/08
to merb
I was just testing out an app running behind passenger, and none of my
run_later calls actually get executed. They work just fine behind thin
and mongrel, but it just seems to skip the run_later in passenger. No
errors are output anywhere to any log files about failing or anything
like that, so I'm not sure where/how it's failing. Anyone experienced
this or have any advice?

Yehuda Katz

unread,
Nov 18, 2008, 2:28:49 AM11/18/08
to me...@googlegroups.com
I wonder if Passenger forks after the run_later threads are set up. We had to work some special magic to get it working with our forking model.

-- Yehuda
--
Yehuda Katz
Developer | Engine Yard
(ph) 718.877.1325

Caius Durling

unread,
Nov 18, 2008, 7:30:58 AM11/18/08
to me...@googlegroups.com
On 18 Nov 2008, at 05:43, Justin wrote:
Anyone experienced this or have any advice?

I was playing with this quite soon after run_later was added to merb. I think it actually ran the block, but no logging or anything happened.

From what I remember (it was an old project I've not got access to anymore), I wrote my own logging code that just wrote to a file from within the run_later block and didn't use merb's logger.

C

Michael Klishin

unread,
Nov 18, 2008, 3:04:31 PM11/18/08
to me...@googlegroups.com
2008/11/18 Caius Durling <ca...@caius.name>:

> I was playing with this quite soon after run_later was added to merb. I
> think it actually ran the block, but no logging or anything happened.
> From what I remember (it was an old project I've not got access to anymore),
> I wrote my own logging code that just wrote to a file from within the
> run_later block and didn't use merb's logger.


A while ago there was a bug that prevented worker thread from being
started when worker process is restarted.
Fork in Ruby only copies one thread to child process, and worker that
runs background tasks is another thread.

But it is resolved around 0.9.9 I think.
--
MK

Yehuda Katz

unread,
Nov 18, 2008, 4:36:08 PM11/18/08
to me...@googlegroups.com
Right, for our own workers. But perhaps not for Passenger's.

-- Yehuda

Bill Turner

unread,
Jan 13, 2009, 2:44:35 PM1/13/09
to merb
On Nov 18 2008, 3:04 pm, "Michael Klishin"
<michael.s.klis...@gmail.com> wrote:
> A while ago there was a bug that prevented worker thread from being
> started when worker process is restarted.
> Fork in Ruby only copies one thread to child process, and worker that
> runs background tasks is another thread.
>
> But it is resolved around 0.9.9 I think.

Does anyone know if there is still a lingering issue with run_later
under passenger? I haven't been able to find a answer either way, and
if it was known, I'd like to know before pushing something live. :-)

Thanks!
Bill

Justin

unread,
Jan 14, 2009, 12:09:59 PM1/14/09
to merb
As far as I know this is still an issue when running under passenger.
I've mentioned it to the #passenger guys but haven't heard one way or
another another if/what they're doing on it.

sferik

unread,
Feb 17, 2009, 2:17:48 AM2/17/09
to merb
On Jan 14, 9:09 am, Justin <nitsujweidm...@gmail.com> wrote:
> As far as I know this is still an issue when running under passenger.
> I've mentioned it to the #passenger guys but haven't heard one way or
> another another if/what they're doing on it.

A patch has been submitted for this problem, which is available on
edge today and should be released in Merb 1.1.

Matt Aimonetti

unread,
Feb 17, 2009, 2:56:34 AM2/17/09
to me...@googlegroups.com
$ sudo gem install merb --source http://edge.merbivore.com

Or you can apply the patch to your own code (not recommended)

- Matt
Reply all
Reply to author
Forward
0 new messages