If my Rails server has been sitting idle for a while, it does not respond to new requests. What is the best way to troubleshoot something like that. I am using Rails 3.0.7 in development. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 9 May 2011 21:54, Alex Katebi <alex.katebi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> If my Rails server has been sitting idle for a while, it does not respond to > new requests. > What is the best way to troubleshoot something like that. > I am using Rails 3.0.7 in development.Is there anything in development.log when you submit the request (or already there indicating a problem before the request)? What about in the server terminal window? Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I see nothing any where. On Mon, May 9, 2011 at 4:58 PM, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> On 9 May 2011 21:54, Alex Katebi <alex.katebi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > If my Rails server has been sitting idle for a while, it does not respond > to > > new requests. > > What is the best way to troubleshoot something like that. > > I am using Rails 3.0.7 in development. > > Is there anything in development.log when you submit the request (or > already there indicating a problem before the request)? What about in > the server terminal window? > > Colin > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Tue, May 10, 2011 at 9:25 AM, Alex Katebi <alex.katebi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I see nothing any where. >To clarify, on your server terminal window, you see no output when you try to access a page? And of course the page does not load, I assume. It is probably not this if you are seeing nothing at all on the terminal, but sometimes if I forget to remove a debugger line and still am running the server in --debugger mode then of course it hangs. Otherwise, other obvious quations: have you restarted the server? As well, restarted your computer?> > On Mon, May 9, 2011 at 4:58 PM, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: > >> On 9 May 2011 21:54, Alex Katebi <alex.katebi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> > If my Rails server has been sitting idle for a while, it does not >> respond to >> > new requests. >> > What is the best way to troubleshoot something like that. >> > I am using Rails 3.0.7 in development. >> >> Is there anything in development.log when you submit the request (or >> already there indicating a problem before the request)? What about in >> the server terminal window? >> >> Colin >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Talk" group. >> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-talk?hl=en. >> >> > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I have restarted the server but not the computer. I am doing something abnormal. Off of a request I start some external program as sub processes. It takes about one second to start those sub processes. How long are we allowed to delay the sending of a respond? Is there a better way do this in Rails way? This problem is intermittent. On Tue, May 10, 2011 at 10:29 AM, David Kahn <dk-rfEMNHKVqOwNic7Bib+Ti1W1rNmOCjRP@public.gmane.org>wrote:> > > On Tue, May 10, 2011 at 9:25 AM, Alex Katebi <alex.katebi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote: > >> >> I see nothing any where. >> > > To clarify, on your server terminal window, you see no output when you try > to access a page? And of course the page does not load, I assume. It is > probably not this if you are seeing nothing at all on the terminal, but > sometimes if I forget to remove a debugger line and still am running the > server in --debugger mode then of course it hangs. > > Otherwise, other obvious quations: have you restarted the server? As well, > restarted your computer? > > >> >> On Mon, May 9, 2011 at 4:58 PM, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: >> >>> On 9 May 2011 21:54, Alex Katebi <alex.katebi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>> > If my Rails server has been sitting idle for a while, it does not >>> respond to >>> > new requests. >>> > What is the best way to troubleshoot something like that. >>> > I am using Rails 3.0.7 in development. >>> >>> Is there anything in development.log when you submit the request (or >>> already there indicating a problem before the request)? What about in >>> the server terminal window? >>> >>> Colin >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Ruby on Rails: Talk" group. >>> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> To unsubscribe from this group, send email to >>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> For more options, visit this group at >>> http://groups.google.com/group/rubyonrails-talk?hl=en. >>> >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Talk" group. >> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-talk?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 10 May 2011 15:45, Alex Katebi <alex.katebi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: Please don''t top post, it makes it difficult to follow the thread. Insert your replies at appropriate points in previous message. Thanks> I have restarted the server but not the computer. I am doing something > abnormal. Off of a request I start some external program as sub processes. > It takes about one second to start those sub processes. How long are we > allowed to delay the sending of a respond? Is there a better way do this in > Rails way? This problem is intermittent.Where are you starting the sub processes? You said there was nothing in the server or application development.log when you do the submit so it is not getting as far as a rails action. Colin> > On Tue, May 10, 2011 at 10:29 AM, David Kahn <dk-rfEMNHKVqOwNic7Bib+Ti1W1rNmOCjRP@public.gmane.org> > wrote: >> >> >> On Tue, May 10, 2011 at 9:25 AM, Alex Katebi <alex.katebi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> >> wrote: >>> >>> I see nothing any where. >> >> To clarify, on your server terminal window, you see no output when you try >> to access a page? And of course the page does not load, I assume. It is >> probably not this if you are seeing nothing at all on the terminal, but >> sometimes if I forget to remove a debugger line and still am running the >> server in --debugger mode then of course it hangs. >> >> Otherwise, other obvious quations: have you restarted the server? As well, >> restarted your computer? >> >>> >>> On Mon, May 9, 2011 at 4:58 PM, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: >>>> >>>> On 9 May 2011 21:54, Alex Katebi <alex.katebi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>>> > If my Rails server has been sitting idle for a while, it does not >>>> > respond to >>>> > new requests. >>>> > What is the best way to troubleshoot something like that. >>>> > I am using Rails 3.0.7 in development. >>>> >>>> Is there anything in development.log when you submit the request (or >>>> already there indicating a problem before the request)? What about in >>>> the server terminal window? >>>> >>>> Colin >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Ruby on Rails: Talk" group. >>>> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org. >>>> To unsubscribe from this group, send email to >>>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>> For more options, visit this group at >>>> http://groups.google.com/group/rubyonrails-talk?hl=en. >>>> >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Ruby on Rails: Talk" group. >>> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> To unsubscribe from this group, send email to >>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> For more options, visit this group at >>> http://groups.google.com/group/rubyonrails-talk?hl=en. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Talk" group. >> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-talk?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Tue, May 10, 2011 at 9:45 AM, Alex Katebi <alex.katebi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I have restarted the server but not the computer. I am doing something > abnormal. Off of a request I start some external program as sub processes. > It takes about one second to start those sub processes.Maybe you could post your code. One thing you might want to look at is if you can start it using another thread -- especially if you have something which is apparently volatile. I call terminal commands all the time from my code, so itself should not be a problem. One way to do this could be delayed_job but you can probably do it much more simply using a new thread. See: http://www.ruby-doc.org/core/classes/Thread.html> How long are we allowed to delay the sending of a respond? Is there a > better way do this in Rails way? This problem is intermittent. > > On Tue, May 10, 2011 at 10:29 AM, David Kahn <dk-rfEMNHKVqOwNic7Bib+Ti1W1rNmOCjRP@public.gmane.org>wrote: > >> >> >> On Tue, May 10, 2011 at 9:25 AM, Alex Katebi <alex.katebi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote: >> >>> >>> I see nothing any where. >>> >> >> To clarify, on your server terminal window, you see no output when you try >> to access a page? And of course the page does not load, I assume. It is >> probably not this if you are seeing nothing at all on the terminal, but >> sometimes if I forget to remove a debugger line and still am running the >> server in --debugger mode then of course it hangs. >> >> Otherwise, other obvious quations: have you restarted the server? As well, >> restarted your computer? >> >> >>> >>> On Mon, May 9, 2011 at 4:58 PM, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>wrote: >>> >>>> On 9 May 2011 21:54, Alex Katebi <alex.katebi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>>> > If my Rails server has been sitting idle for a while, it does not >>>> respond to >>>> > new requests. >>>> > What is the best way to troubleshoot something like that. >>>> > I am using Rails 3.0.7 in development. >>>> >>>> Is there anything in development.log when you submit the request (or >>>> already there indicating a problem before the request)? What about in >>>> the server terminal window? >>>> >>>> Colin >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Ruby on Rails: Talk" group. >>>> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>> To unsubscribe from this group, send email to >>>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>> For more options, visit this group at >>>> http://groups.google.com/group/rubyonrails-talk?hl=en. >>>> >>>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Ruby on Rails: Talk" group. >>> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> To unsubscribe from this group, send email to >>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> For more options, visit this group at >>> http://groups.google.com/group/rubyonrails-talk?hl=en. >>> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Talk" group. >> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-talk?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Tue, May 10, 2011 at 9:56 AM, David Kahn <dk-rfEMNHKVqOwNic7Bib+Ti1W1rNmOCjRP@public.gmane.org>wrote:> > > On Tue, May 10, 2011 at 9:45 AM, Alex Katebi <alex.katebi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote: > >> I have restarted the server but not the computer. I am doing something >> abnormal. Off of a request I start some external program as sub processes. >> It takes about one second to start those sub processes. > > > Maybe you could post your code. One thing you might want to look at is if > you can start it using another thread -- especially if you have something > which is apparently volatile. I call terminal commands all the time from my > code, so itself should not be a problem. One way to do this could be > delayed_job but you can probably do it much more simply using a new thread. > See: http://www.ruby-doc.org/core/classes/Thread.html >this looks pretty good as an intro to threading, if it turns out that this is the correct route to go: http://rubylearning.com/satishtalim/ruby_threads.html I guess though if your process is important you will have to add some handling in the case of failure if it were to happen.> > >> How long are we allowed to delay the sending of a respond? Is there a >> better way do this in Rails way? This problem is intermittent. >> >> On Tue, May 10, 2011 at 10:29 AM, David Kahn <dk-rfEMNHKVqOwNic7Bib+Ti1W1rNmOCjRP@public.gmane.org>wrote: >> >>> >>> >>> On Tue, May 10, 2011 at 9:25 AM, Alex Katebi <alex.katebi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote: >>> >>>> >>>> I see nothing any where. >>>> >>> >>> To clarify, on your server terminal window, you see no output when you >>> try to access a page? And of course the page does not load, I assume. It is >>> probably not this if you are seeing nothing at all on the terminal, but >>> sometimes if I forget to remove a debugger line and still am running the >>> server in --debugger mode then of course it hangs. >>> >>> Otherwise, other obvious quations: have you restarted the server? As >>> well, restarted your computer? >>> >>> >>>> >>>> On Mon, May 9, 2011 at 4:58 PM, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>wrote: >>>> >>>>> On 9 May 2011 21:54, Alex Katebi <alex.katebi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>>>> > If my Rails server has been sitting idle for a while, it does not >>>>> respond to >>>>> > new requests. >>>>> > What is the best way to troubleshoot something like that. >>>>> > I am using Rails 3.0.7 in development. >>>>> >>>>> Is there anything in development.log when you submit the request (or >>>>> already there indicating a problem before the request)? What about in >>>>> the server terminal window? >>>>> >>>>> Colin >>>>> >>>>> -- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "Ruby on Rails: Talk" group. >>>>> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org >>>>> . >>>>> To unsubscribe from this group, send email to >>>>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>>> For more options, visit this group at >>>>> http://groups.google.com/group/rubyonrails-talk?hl=en. >>>>> >>>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Ruby on Rails: Talk" group. >>>> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>> To unsubscribe from this group, send email to >>>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>> For more options, visit this group at >>>> http://groups.google.com/group/rubyonrails-talk?hl=en. >>>> >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Ruby on Rails: Talk" group. >>> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> To unsubscribe from this group, send email to >>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> For more options, visit this group at >>> http://groups.google.com/group/rubyonrails-talk?hl=en. >>> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Talk" group. >> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-talk?hl=en. >> > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Tue, May 10, 2011 at 10:54 AM, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> On 10 May 2011 15:45, Alex Katebi <alex.katebi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Please don''t top post, it makes it difficult to follow the thread. >Sure!> Insert your replies at appropriate points in previous message. Thanks > > > I have restarted the server but not the computer. I am doing something > > abnormal. Off of a request I start some external program as sub > processes. > > It takes about one second to start those sub processes. How long are we > > allowed to delay the sending of a respond? Is there a better way do this > in > > Rails way? This problem is intermittent. > > Where are you starting the sub processes? You said there was nothing > in the server or application development.log when you do the submit so > it is not getting as far as a rails action. >I meant to say that I started the subprocesses in the previous request. Here is my code: class PortalMonitor include Mongoid::Document field :count, :type => Integer field :url, :type => String field :user, :type => String field :password, :type => String field :run, :type => Boolean validates_presence_of :count, :url, :user, :password validates_uniqueness_of :url #embeds_many :emails embeds_many :vidyo_desktops after_create :desktop_start before_destroy :desktop_stop before_update :desktop_stop, :desktop_start, :if => :changed? def desktop_stop t1 = Time.now Rails.logger.debug "######### Stop VidyoDesktops size #{vidyo_desktops.size} Dir = #{Dir.getwd} #########" for vd in vidyo_desktops Rails.logger.debug "######## #{vd.vd_pid} ######" begin Process.kill ''TERM'', vd.vd_pid rescue Errno::ESRCH end end vidyo_desktops.delete_all Rails.logger.debug "############# TIME SPENT STOP #{Time.now - t1} ##################" end def desktop_start Rails.logger.debug "######### desktop_start ###########" return if run == false t1 = Time.now count.times do |n| n += 1 cmd = ''lib/vidyo/VidyoDesktop'' eid = user + n.to_s root = ''lib/vidyo'' args = " --eid #{eid} --port #{51300+n} " + "--video #{root}/ofer_wvga.vidyo --audio #{root}/ogm.wav" cmd = cmd.to_s + args pid, vd_stdin, vd_stdout, vd_stderr = Open4::popen4(cmd) #eval("`#{cmd}&`") #pid = $?.pid =begin Thread.new do while (( line = vd_stderr.gets )) puts "errrrrrrrrrr #{line}" end end Thread.new do while (( line = vd_stdout.gets )) puts "ottttttttttt #{line}" end end =end Rails.logger.debug "######### Start VidyoDesktops #{pid} cmd = #{cmd} #########" vidyo_desktops.create!(:vd_pid => pid, :pm_pid => 0, :pm_error => "Hello There!") Process.detach(pid) #p vidyo_desktops end Rails.logger.debug "############# TIME SPENT START #{Time.now - t1} ##################" end end> Colin > > > > > On Tue, May 10, 2011 at 10:29 AM, David Kahn <dk-rfEMNHKVqOwNic7Bib+Ti1W1rNmOCjRP@public.gmane.org> > > wrote: > >> > >> > >> On Tue, May 10, 2011 at 9:25 AM, Alex Katebi <alex.katebi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > >> wrote: > >>> > >>> I see nothing any where. > >> > >> To clarify, on your server terminal window, you see no output when you > try > >> to access a page? And of course the page does not load, I assume. It is > >> probably not this if you are seeing nothing at all on the terminal, but > >> sometimes if I forget to remove a debugger line and still am running the > >> server in --debugger mode then of course it hangs. > >> > >> Otherwise, other obvious quations: have you restarted the server? As > well, > >> restarted your computer? > >> > >>> > >>> On Mon, May 9, 2011 at 4:58 PM, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> > wrote: > >>>> > >>>> On 9 May 2011 21:54, Alex Katebi <alex.katebi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >>>> > If my Rails server has been sitting idle for a while, it does not > >>>> > respond to > >>>> > new requests. > >>>> > What is the best way to troubleshoot something like that. > >>>> > I am using Rails 3.0.7 in development. > >>>> > >>>> Is there anything in development.log when you submit the request (or > >>>> already there indicating a problem before the request)? What about in > >>>> the server terminal window? > >>>> > >>>> Colin > >>>> > >>>> -- > >>>> You received this message because you are subscribed to the Google > >>>> Groups "Ruby on Rails: Talk" group. > >>>> To post to this group, send email to > rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > >>>> To unsubscribe from this group, send email to > >>>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > >>>> For more options, visit this group at > >>>> http://groups.google.com/group/rubyonrails-talk?hl=en. > >>>> > >>> > >>> -- > >>> You received this message because you are subscribed to the Google > Groups > >>> "Ruby on Rails: Talk" group. > >>> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > . > >>> To unsubscribe from this group, send email to > >>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > >>> For more options, visit this group at > >>> http://groups.google.com/group/rubyonrails-talk?hl=en. > >> > >> -- > >> You received this message because you are subscribed to the Google > Groups > >> "Ruby on Rails: Talk" group. > >> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > >> To unsubscribe from this group, send email to > >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > >> For more options, visit this group at > >> http://groups.google.com/group/rubyonrails-talk?hl=en. > > > > -- > > You received this message because you are subscribed to the Google Groups > > "Ruby on Rails: Talk" group. > > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To unsubscribe from this group, send email to > > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > For more options, visit this group at > > http://groups.google.com/group/rubyonrails-talk?hl=en. > > > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Tue, May 10, 2011 at 11:01 AM, David Kahn <dk-rfEMNHKVqOwNic7Bib+Ti1W1rNmOCjRP@public.gmane.org>wrote:> > > On Tue, May 10, 2011 at 9:56 AM, David Kahn <dk-rfEMNHKVqOwNic7Bib+Ti1W1rNmOCjRP@public.gmane.org>wrote: > >> >> >> On Tue, May 10, 2011 at 9:45 AM, Alex Katebi <alex.katebi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote: >> >>> I have restarted the server but not the computer. I am doing something >>> abnormal. Off of a request I start some external program as sub processes. >>> It takes about one second to start those sub processes. >> >> >> Maybe you could post your code. One thing you might want to look at is if >> you can start it using another thread -- >> > I avoided using Threads since I wanted my operations to be atomic.> especially if you have something which is apparently volatile. I call >> terminal commands all the time from my code, so itself should not be a >> problem. One way to do this could be delayed_job but you can probably do it >> much more simply using a new thread. See: >> http://www.ruby-doc.org/core/classes/Thread.html >> > > this looks pretty good as an intro to threading, if it turns out that this > is the correct route to go: > http://rubylearning.com/satishtalim/ruby_threads.html > > I guess though if your process is important you will have to add some > handling in the case of failure if it were to happen. > > >> >> >>> How long are we allowed to delay the sending of a respond? Is there a >>> better way do this in Rails way? This problem is intermittent. >>> >>> On Tue, May 10, 2011 at 10:29 AM, David Kahn <dk-rfEMNHKVqOwNic7Bib+Ti1W1rNmOCjRP@public.gmane.org>wrote: >>> >>>> >>>> >>>> On Tue, May 10, 2011 at 9:25 AM, Alex Katebi <alex.katebi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote: >>>> >>>>> >>>>> I see nothing any where. >>>>> >>>> >>>> To clarify, on your server terminal window, you see no output when you >>>> try to access a page? And of course the page does not load, I assume. It is >>>> probably not this if you are seeing nothing at all on the terminal, but >>>> sometimes if I forget to remove a debugger line and still am running the >>>> server in --debugger mode then of course it hangs. >>>> >>>> Otherwise, other obvious quations: have you restarted the server? As >>>> well, restarted your computer? >>>> >>>> >>>>> >>>>> On Mon, May 9, 2011 at 4:58 PM, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>wrote: >>>>> >>>>>> On 9 May 2011 21:54, Alex Katebi <alex.katebi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>>>>> > If my Rails server has been sitting idle for a while, it does not >>>>>> respond to >>>>>> > new requests. >>>>>> > What is the best way to troubleshoot something like that. >>>>>> > I am using Rails 3.0.7 in development. >>>>>> >>>>>> Is there anything in development.log when you submit the request (or >>>>>> already there indicating a problem before the request)? What about in >>>>>> the server terminal window? >>>>>> >>>>>> Colin >>>>>> >>>>>> -- >>>>>> You received this message because you are subscribed to the Google >>>>>> Groups "Ruby on Rails: Talk" group. >>>>>> To post to this group, send email to >>>>>> rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>>>> To unsubscribe from this group, send email to >>>>>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>>>> For more options, visit this group at >>>>>> http://groups.google.com/group/rubyonrails-talk?hl=en. >>>>>> >>>>>> >>>>> -- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "Ruby on Rails: Talk" group. >>>>> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org >>>>> . >>>>> To unsubscribe from this group, send email to >>>>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>>> For more options, visit this group at >>>>> http://groups.google.com/group/rubyonrails-talk?hl=en. >>>>> >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Ruby on Rails: Talk" group. >>>> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>> To unsubscribe from this group, send email to >>>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>> For more options, visit this group at >>>> http://groups.google.com/group/rubyonrails-talk?hl=en. >>>> >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Ruby on Rails: Talk" group. >>> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> To unsubscribe from this group, send email to >>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> For more options, visit this group at >>> http://groups.google.com/group/rubyonrails-talk?hl=en. >>> >> >> > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 10 May 2011 16:40, Alex Katebi <alex.katebi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> ... > I meant to say that I started the subprocesses in the previous request.I suggest that you first disable the starting of the sub processes to see whether the issues disappears. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Tue, May 10, 2011 at 10:43 AM, Alex Katebi <alex.katebi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > On Tue, May 10, 2011 at 11:01 AM, David Kahn <dk-rfEMNHKVqOwNic7Bib+Ti1W1rNmOCjRP@public.gmane.org>wrote: > >> >> >> On Tue, May 10, 2011 at 9:56 AM, David Kahn <dk-rfEMNHKVqOwNic7Bib+Ti1W1rNmOCjRP@public.gmane.org>wrote: >> >>> >>> >>> On Tue, May 10, 2011 at 9:45 AM, Alex Katebi <alex.katebi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote: >>> >>>> I have restarted the server but not the computer. I am doing something >>>> abnormal. Off of a request I start some external program as sub processes. >>>> It takes about one second to start those sub processes. >>> >>> >>> Maybe you could post your code. One thing you might want to look at is if >>> you can start it using another thread -- >>> >> I avoided using Threads since I wanted my operations to be atomic. >So what does the ''desktop'' app or code do? It is it something that your users depend on, and if so for what? What is the process? Of course first do what Colin asked and see if bypassing this process gets you back working so you at least know where to focus.> especially if you have something which is apparently volatile. I call >>> terminal commands all the time from my code, so itself should not be a >>> problem. One way to do this could be delayed_job but you can probably do it >>> much more simply using a new thread. See: >>> http://www.ruby-doc.org/core/classes/Thread.html >>> >> >> this looks pretty good as an intro to threading, if it turns out that this >> is the correct route to go: >> http://rubylearning.com/satishtalim/ruby_threads.html >> >> I guess though if your process is important you will have to add some >> handling in the case of failure if it were to happen. >> >> >>> >>> >>>> How long are we allowed to delay the sending of a respond? Is there a >>>> better way do this in Rails way? This problem is intermittent. >>>> >>>> On Tue, May 10, 2011 at 10:29 AM, David Kahn <dk-rfEMNHKVqOwNic7Bib+Ti1W1rNmOCjRP@public.gmane.org >>>> > wrote: >>>> >>>>> >>>>> >>>>> On Tue, May 10, 2011 at 9:25 AM, Alex Katebi <alex.katebi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote: >>>>> >>>>>> >>>>>> I see nothing any where. >>>>>> >>>>> >>>>> To clarify, on your server terminal window, you see no output when you >>>>> try to access a page? And of course the page does not load, I assume. It is >>>>> probably not this if you are seeing nothing at all on the terminal, but >>>>> sometimes if I forget to remove a debugger line and still am running the >>>>> server in --debugger mode then of course it hangs. >>>>> >>>>> Otherwise, other obvious quations: have you restarted the server? As >>>>> well, restarted your computer? >>>>> >>>>> >>>>>> >>>>>> On Mon, May 9, 2011 at 4:58 PM, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>wrote: >>>>>> >>>>>>> On 9 May 2011 21:54, Alex Katebi <alex.katebi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>>>>>> > If my Rails server has been sitting idle for a while, it does not >>>>>>> respond to >>>>>>> > new requests. >>>>>>> > What is the best way to troubleshoot something like that. >>>>>>> > I am using Rails 3.0.7 in development. >>>>>>> >>>>>>> Is there anything in development.log when you submit the request (or >>>>>>> already there indicating a problem before the request)? What about >>>>>>> in >>>>>>> the server terminal window? >>>>>>> >>>>>>> Colin >>>>>>> >>>>>>> -- >>>>>>> You received this message because you are subscribed to the Google >>>>>>> Groups "Ruby on Rails: Talk" group. >>>>>>> To post to this group, send email to >>>>>>> rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>>>>> To unsubscribe from this group, send email to >>>>>>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>>>>> For more options, visit this group at >>>>>>> http://groups.google.com/group/rubyonrails-talk?hl=en. >>>>>>> >>>>>>> >>>>>> -- >>>>>> You received this message because you are subscribed to the Google >>>>>> Groups "Ruby on Rails: Talk" group. >>>>>> To post to this group, send email to >>>>>> rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>>>> To unsubscribe from this group, send email to >>>>>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>>>> For more options, visit this group at >>>>>> http://groups.google.com/group/rubyonrails-talk?hl=en. >>>>>> >>>>> >>>>> -- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "Ruby on Rails: Talk" group. >>>>> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org >>>>> . >>>>> To unsubscribe from this group, send email to >>>>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>>> For more options, visit this group at >>>>> http://groups.google.com/group/rubyonrails-talk?hl=en. >>>>> >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Ruby on Rails: Talk" group. >>>> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>> To unsubscribe from this group, send email to >>>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>> For more options, visit this group at >>>> http://groups.google.com/group/rubyonrails-talk?hl=en. >>>> >>> >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Talk" group. >> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-talk?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Tue, May 10, 2011 at 12:04 PM, David Kahn <dk-rfEMNHKVqOwNic7Bib+Ti1W1rNmOCjRP@public.gmane.org>wrote:> > > On Tue, May 10, 2011 at 10:43 AM, Alex Katebi <alex.katebi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote: > >> >> >> On Tue, May 10, 2011 at 11:01 AM, David Kahn <dk-rfEMNHKVqOwNic7Bib+Ti1W1rNmOCjRP@public.gmane.org>wrote: >> >>> >>> >>> On Tue, May 10, 2011 at 9:56 AM, David Kahn <dk-rfEMNHKVqOwNic7Bib+Ti1W1rNmOCjRP@public.gmane.org>wrote: >>> >>>> >>>> >>>> On Tue, May 10, 2011 at 9:45 AM, Alex Katebi <alex.katebi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote: >>>> >>>>> I have restarted the server but not the computer. I am doing something >>>>> abnormal. Off of a request I start some external program as sub processes. >>>>> It takes about one second to start those sub processes. >>>> >>>> >>>> Maybe you could post your code. One thing you might want to look at is >>>> if you can start it using another thread -- >>>> >>> I avoided using Threads since I wanted my operations to be atomic. >> > > So what does the ''desktop'' app or code do? It is it something that your > users depend on, and if so for what? What is the process? Of course first do > what Colin asked and see if bypassing this process gets you back working so > you at least know where to focus. >I tried it with the subprocess and it does not hang. Keep in mind that hanging does not happen all the time. The desktop app is a video conferencing desktop client on Linux. I think I would have to do Threads. I will let you know if it makes it better.> > >> especially if you have something which is apparently volatile. I call >>>> terminal commands all the time from my code, so itself should not be a >>>> problem. One way to do this could be delayed_job but you can probably do it >>>> much more simply using a new thread. See: >>>> http://www.ruby-doc.org/core/classes/Thread.html >>>> >>> >>> this looks pretty good as an intro to threading, if it turns out that >>> this is the correct route to go: >>> http://rubylearning.com/satishtalim/ruby_threads.html >>> >>> I guess though if your process is important you will have to add some >>> handling in the case of failure if it were to happen. >>> >>> >>>> >>>> >>>>> How long are we allowed to delay the sending of a respond? Is there a >>>>> better way do this in Rails way? This problem is intermittent. >>>>> >>>>> On Tue, May 10, 2011 at 10:29 AM, David Kahn < >>>>> dk-rfEMNHKVqOwNic7Bib+Ti1W1rNmOCjRP@public.gmane.org> wrote: >>>>> >>>>>> >>>>>> >>>>>> On Tue, May 10, 2011 at 9:25 AM, Alex Katebi <alex.katebi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote: >>>>>> >>>>>>> >>>>>>> I see nothing any where. >>>>>>> >>>>>> >>>>>> To clarify, on your server terminal window, you see no output when you >>>>>> try to access a page? And of course the page does not load, I assume. It is >>>>>> probably not this if you are seeing nothing at all on the terminal, but >>>>>> sometimes if I forget to remove a debugger line and still am running the >>>>>> server in --debugger mode then of course it hangs. >>>>>> >>>>>> Otherwise, other obvious quations: have you restarted the server? As >>>>>> well, restarted your computer? >>>>>> >>>>>> >>>>>>> >>>>>>> On Mon, May 9, 2011 at 4:58 PM, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>wrote: >>>>>>> >>>>>>>> On 9 May 2011 21:54, Alex Katebi <alex.katebi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>>>>>>> > If my Rails server has been sitting idle for a while, it does not >>>>>>>> respond to >>>>>>>> > new requests. >>>>>>>> > What is the best way to troubleshoot something like that. >>>>>>>> > I am using Rails 3.0.7 in development. >>>>>>>> >>>>>>>> Is there anything in development.log when you submit the request (or >>>>>>>> already there indicating a problem before the request)? What about >>>>>>>> in >>>>>>>> the server terminal window? >>>>>>>> >>>>>>>> Colin >>>>>>>> >>>>>>>> -- >>>>>>>> You received this message because you are subscribed to the Google >>>>>>>> Groups "Ruby on Rails: Talk" group. >>>>>>>> To post to this group, send email to >>>>>>>> rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>>>>>> To unsubscribe from this group, send email to >>>>>>>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>>>>>> For more options, visit this group at >>>>>>>> http://groups.google.com/group/rubyonrails-talk?hl=en. >>>>>>>> >>>>>>>> >>>>>>> -- >>>>>>> You received this message because you are subscribed to the Google >>>>>>> Groups "Ruby on Rails: Talk" group. >>>>>>> To post to this group, send email to >>>>>>> rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>>>>> To unsubscribe from this group, send email to >>>>>>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>>>>> For more options, visit this group at >>>>>>> http://groups.google.com/group/rubyonrails-talk?hl=en. >>>>>>> >>>>>> >>>>>> -- >>>>>> You received this message because you are subscribed to the Google >>>>>> Groups "Ruby on Rails: Talk" group. >>>>>> To post to this group, send email to >>>>>> rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>>>> To unsubscribe from this group, send email to >>>>>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>>>> For more options, visit this group at >>>>>> http://groups.google.com/group/rubyonrails-talk?hl=en. >>>>>> >>>>> >>>>> -- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "Ruby on Rails: Talk" group. >>>>> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org >>>>> . >>>>> To unsubscribe from this group, send email to >>>>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>>> For more options, visit this group at >>>>> http://groups.google.com/group/rubyonrails-talk?hl=en. >>>>> >>>> >>>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Ruby on Rails: Talk" group. >>> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> To unsubscribe from this group, send email to >>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> For more options, visit this group at >>> http://groups.google.com/group/rubyonrails-talk?hl=en. >>> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Talk" group. >> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-talk?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 10 May 2011 17:40, Alex Katebi <alex.katebi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: ? ...> I tried it with the subprocess and it does not hang.Do you mean *without*? Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Tue, May 10, 2011 at 3:25 PM, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> On 10 May 2011 17:40, Alex Katebi <alex.katebi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > ? ... > > I tried it with the subprocess and it does not hang. > > Do you mean *without*? >Sorry! Yes I meant without.> > Colin > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I think I have found a good solution for my background tasks. http://kr.github.com/beanstalkd/ http://railscasts.com/episodes/243-beanstalkd-and-stalker It''s exactly what I need, and it seems to be a simple and popular solution. On Tue, May 10, 2011 at 11:43 AM, Alex Katebi <alex.katebi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > On Tue, May 10, 2011 at 11:01 AM, David Kahn <dk-rfEMNHKVqOwNic7Bib+Ti1W1rNmOCjRP@public.gmane.org>wrote: > >> >> >> On Tue, May 10, 2011 at 9:56 AM, David Kahn <dk-rfEMNHKVqOwNic7Bib+Ti1W1rNmOCjRP@public.gmane.org>wrote: >> >>> >>> >>> On Tue, May 10, 2011 at 9:45 AM, Alex Katebi <alex.katebi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote: >>> >>>> I have restarted the server but not the computer. I am doing something >>>> abnormal. Off of a request I start some external program as sub processes. >>>> It takes about one second to start those sub processes. >>> >>> >>> Maybe you could post your code. One thing you might want to look at is if >>> you can start it using another thread -- >>> >> I avoided using Threads since I wanted my operations to be atomic. > >> especially if you have something which is apparently volatile. I call >>> terminal commands all the time from my code, so itself should not be a >>> problem. One way to do this could be delayed_job but you can probably do it >>> much more simply using a new thread. See: >>> http://www.ruby-doc.org/core/classes/Thread.html >>> >> >> this looks pretty good as an intro to threading, if it turns out that this >> is the correct route to go: >> http://rubylearning.com/satishtalim/ruby_threads.html >> >> I guess though if your process is important you will have to add some >> handling in the case of failure if it were to happen. >> >> >>> >>> >>>> How long are we allowed to delay the sending of a respond? Is there a >>>> better way do this in Rails way? This problem is intermittent. >>>> >>>> On Tue, May 10, 2011 at 10:29 AM, David Kahn <dk-rfEMNHKVqOwNic7Bib+Ti1W1rNmOCjRP@public.gmane.org >>>> > wrote: >>>> >>>>> >>>>> >>>>> On Tue, May 10, 2011 at 9:25 AM, Alex Katebi <alex.katebi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote: >>>>> >>>>>> >>>>>> I see nothing any where. >>>>>> >>>>> >>>>> To clarify, on your server terminal window, you see no output when you >>>>> try to access a page? And of course the page does not load, I assume. It is >>>>> probably not this if you are seeing nothing at all on the terminal, but >>>>> sometimes if I forget to remove a debugger line and still am running the >>>>> server in --debugger mode then of course it hangs. >>>>> >>>>> Otherwise, other obvious quations: have you restarted the server? As >>>>> well, restarted your computer? >>>>> >>>>> >>>>>> >>>>>> On Mon, May 9, 2011 at 4:58 PM, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>wrote: >>>>>> >>>>>>> On 9 May 2011 21:54, Alex Katebi <alex.katebi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>>>>>> > If my Rails server has been sitting idle for a while, it does not >>>>>>> respond to >>>>>>> > new requests. >>>>>>> > What is the best way to troubleshoot something like that. >>>>>>> > I am using Rails 3.0.7 in development. >>>>>>> >>>>>>> Is there anything in development.log when you submit the request (or >>>>>>> already there indicating a problem before the request)? What about >>>>>>> in >>>>>>> the server terminal window? >>>>>>> >>>>>>> Colin >>>>>>> >>>>>>> -- >>>>>>> You received this message because you are subscribed to the Google >>>>>>> Groups "Ruby on Rails: Talk" group. >>>>>>> To post to this group, send email to >>>>>>> rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>>>>> To unsubscribe from this group, send email to >>>>>>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>>>>> For more options, visit this group at >>>>>>> http://groups.google.com/group/rubyonrails-talk?hl=en. >>>>>>> >>>>>>> >>>>>> -- >>>>>> You received this message because you are subscribed to the Google >>>>>> Groups "Ruby on Rails: Talk" group. >>>>>> To post to this group, send email to >>>>>> rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>>>> To unsubscribe from this group, send email to >>>>>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>>>> For more options, visit this group at >>>>>> http://groups.google.com/group/rubyonrails-talk?hl=en. >>>>>> >>>>> >>>>> -- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "Ruby on Rails: Talk" group. >>>>> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org >>>>> . >>>>> To unsubscribe from this group, send email to >>>>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>>> For more options, visit this group at >>>>> http://groups.google.com/group/rubyonrails-talk?hl=en. >>>>> >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Ruby on Rails: Talk" group. >>>> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>> To unsubscribe from this group, send email to >>>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>> For more options, visit this group at >>>> http://groups.google.com/group/rubyonrails-talk?hl=en. >>>> >>> >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Talk" group. >> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-talk?hl=en. >> > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Wed, May 11, 2011 at 7:26 AM, Alex Katebi <alex.katebi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I think I have found a good solution for my background tasks. > > http://kr.github.com/beanstalkd/ > > http://railscasts.com/episodes/243-beanstalkd-and-stalker > > It''s exactly what I need, and it seems to be a simple and popular solution. >Thanks for sharing... I had not seen this and good to know about> > > > > > > On Tue, May 10, 2011 at 11:43 AM, Alex Katebi <alex.katebi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote: > >> >> >> On Tue, May 10, 2011 at 11:01 AM, David Kahn <dk-rfEMNHKVqOwNic7Bib+Ti1W1rNmOCjRP@public.gmane.org>wrote: >> >>> >>> >>> On Tue, May 10, 2011 at 9:56 AM, David Kahn <dk-rfEMNHKVqOwNic7Bib+Ti1W1rNmOCjRP@public.gmane.org>wrote: >>> >>>> >>>> >>>> On Tue, May 10, 2011 at 9:45 AM, Alex Katebi <alex.katebi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote: >>>> >>>>> I have restarted the server but not the computer. I am doing something >>>>> abnormal. Off of a request I start some external program as sub processes. >>>>> It takes about one second to start those sub processes. >>>> >>>> >>>> Maybe you could post your code. One thing you might want to look at is >>>> if you can start it using another thread -- >>>> >>> I avoided using Threads since I wanted my operations to be atomic. >> >>> especially if you have something which is apparently volatile. I call >>>> terminal commands all the time from my code, so itself should not be a >>>> problem. One way to do this could be delayed_job but you can probably do it >>>> much more simply using a new thread. See: >>>> http://www.ruby-doc.org/core/classes/Thread.html >>>> >>> >>> this looks pretty good as an intro to threading, if it turns out that >>> this is the correct route to go: >>> http://rubylearning.com/satishtalim/ruby_threads.html >>> >>> I guess though if your process is important you will have to add some >>> handling in the case of failure if it were to happen. >>> >>> >>>> >>>> >>>>> How long are we allowed to delay the sending of a respond? Is there a >>>>> better way do this in Rails way? This problem is intermittent. >>>>> >>>>> On Tue, May 10, 2011 at 10:29 AM, David Kahn < >>>>> dk-rfEMNHKVqOwNic7Bib+Ti1W1rNmOCjRP@public.gmane.org> wrote: >>>>> >>>>>> >>>>>> >>>>>> On Tue, May 10, 2011 at 9:25 AM, Alex Katebi <alex.katebi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote: >>>>>> >>>>>>> >>>>>>> I see nothing any where. >>>>>>> >>>>>> >>>>>> To clarify, on your server terminal window, you see no output when you >>>>>> try to access a page? And of course the page does not load, I assume. It is >>>>>> probably not this if you are seeing nothing at all on the terminal, but >>>>>> sometimes if I forget to remove a debugger line and still am running the >>>>>> server in --debugger mode then of course it hangs. >>>>>> >>>>>> Otherwise, other obvious quations: have you restarted the server? As >>>>>> well, restarted your computer? >>>>>> >>>>>> >>>>>>> >>>>>>> On Mon, May 9, 2011 at 4:58 PM, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>wrote: >>>>>>> >>>>>>>> On 9 May 2011 21:54, Alex Katebi <alex.katebi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>>>>>>> > If my Rails server has been sitting idle for a while, it does not >>>>>>>> respond to >>>>>>>> > new requests. >>>>>>>> > What is the best way to troubleshoot something like that. >>>>>>>> > I am using Rails 3.0.7 in development. >>>>>>>> >>>>>>>> Is there anything in development.log when you submit the request (or >>>>>>>> already there indicating a problem before the request)? What about >>>>>>>> in >>>>>>>> the server terminal window? >>>>>>>> >>>>>>>> Colin >>>>>>>> >>>>>>>> -- >>>>>>>> You received this message because you are subscribed to the Google >>>>>>>> Groups "Ruby on Rails: Talk" group. >>>>>>>> To post to this group, send email to >>>>>>>> rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>>>>>> To unsubscribe from this group, send email to >>>>>>>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>>>>>> For more options, visit this group at >>>>>>>> http://groups.google.com/group/rubyonrails-talk?hl=en. >>>>>>>> >>>>>>>> >>>>>>> -- >>>>>>> You received this message because you are subscribed to the Google >>>>>>> Groups "Ruby on Rails: Talk" group. >>>>>>> To post to this group, send email to >>>>>>> rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>>>>> To unsubscribe from this group, send email to >>>>>>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>>>>> For more options, visit this group at >>>>>>> http://groups.google.com/group/rubyonrails-talk?hl=en. >>>>>>> >>>>>> >>>>>> -- >>>>>> You received this message because you are subscribed to the Google >>>>>> Groups "Ruby on Rails: Talk" group. >>>>>> To post to this group, send email to >>>>>> rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>>>> To unsubscribe from this group, send email to >>>>>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>>>> For more options, visit this group at >>>>>> http://groups.google.com/group/rubyonrails-talk?hl=en. >>>>>> >>>>> >>>>> -- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "Ruby on Rails: Talk" group. >>>>> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org >>>>> . >>>>> To unsubscribe from this group, send email to >>>>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>>> For more options, visit this group at >>>>> http://groups.google.com/group/rubyonrails-talk?hl=en. >>>>> >>>> >>>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Ruby on Rails: Talk" group. >>> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> To unsubscribe from this group, send email to >>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> For more options, visit this group at >>> http://groups.google.com/group/rubyonrails-talk?hl=en. >>> >> >> > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Wed, May 11, 2011 at 11:05 AM, David Kahn <dk-rfEMNHKVqOwNic7Bib+Ti1W1rNmOCjRP@public.gmane.org>wrote:> > > On Wed, May 11, 2011 at 7:26 AM, Alex Katebi <alex.katebi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote: > >> I think I have found a good solution for my background tasks. >> >> http://kr.github.com/beanstalkd/ >> >> http://railscasts.com/episodes/243-beanstalkd-and-stalker >> >> It''s exactly what I need, and it seems to be a simple and popular >> solution. >> > > Thanks for sharing... I had not seen this and good to know about >Sure! And thanks to Railscasts new and improved website that lists subject categories .> > >> >> >> >> >> >> >> On Tue, May 10, 2011 at 11:43 AM, Alex Katebi <alex.katebi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote: >> >>> >>> >>> On Tue, May 10, 2011 at 11:01 AM, David Kahn <dk-rfEMNHKVqOwNic7Bib+Ti1W1rNmOCjRP@public.gmane.org>wrote: >>> >>>> >>>> >>>> On Tue, May 10, 2011 at 9:56 AM, David Kahn <dk-rfEMNHKVqOwNic7Bib+Ti1W1rNmOCjRP@public.gmane.org>wrote: >>>> >>>>> >>>>> >>>>> On Tue, May 10, 2011 at 9:45 AM, Alex Katebi <alex.katebi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote: >>>>> >>>>>> I have restarted the server but not the computer. I am doing something >>>>>> abnormal. Off of a request I start some external program as sub processes. >>>>>> It takes about one second to start those sub processes. >>>>> >>>>> >>>>> Maybe you could post your code. One thing you might want to look at is >>>>> if you can start it using another thread -- >>>>> >>>> I avoided using Threads since I wanted my operations to be atomic. >>> >>>> especially if you have something which is apparently volatile. I call >>>>> terminal commands all the time from my code, so itself should not be a >>>>> problem. One way to do this could be delayed_job but you can probably do it >>>>> much more simply using a new thread. See: >>>>> http://www.ruby-doc.org/core/classes/Thread.html >>>>> >>>> >>>> this looks pretty good as an intro to threading, if it turns out that >>>> this is the correct route to go: >>>> http://rubylearning.com/satishtalim/ruby_threads.html >>>> >>>> I guess though if your process is important you will have to add some >>>> handling in the case of failure if it were to happen. >>>> >>>> >>>>> >>>>> >>>>>> How long are we allowed to delay the sending of a respond? Is there a >>>>>> better way do this in Rails way? This problem is intermittent. >>>>>> >>>>>> On Tue, May 10, 2011 at 10:29 AM, David Kahn < >>>>>> dk-rfEMNHKVqOwNic7Bib+Ti1W1rNmOCjRP@public.gmane.org> wrote: >>>>>> >>>>>>> >>>>>>> >>>>>>> On Tue, May 10, 2011 at 9:25 AM, Alex Katebi <alex.katebi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote: >>>>>>> >>>>>>>> >>>>>>>> I see nothing any where. >>>>>>>> >>>>>>> >>>>>>> To clarify, on your server terminal window, you see no output when >>>>>>> you try to access a page? And of course the page does not load, I assume. It >>>>>>> is probably not this if you are seeing nothing at all on the terminal, but >>>>>>> sometimes if I forget to remove a debugger line and still am running the >>>>>>> server in --debugger mode then of course it hangs. >>>>>>> >>>>>>> Otherwise, other obvious quations: have you restarted the server? As >>>>>>> well, restarted your computer? >>>>>>> >>>>>>> >>>>>>>> >>>>>>>> On Mon, May 9, 2011 at 4:58 PM, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>wrote: >>>>>>>> >>>>>>>>> On 9 May 2011 21:54, Alex Katebi <alex.katebi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>>>>>>>> > If my Rails server has been sitting idle for a while, it does not >>>>>>>>> respond to >>>>>>>>> > new requests. >>>>>>>>> > What is the best way to troubleshoot something like that. >>>>>>>>> > I am using Rails 3.0.7 in development. >>>>>>>>> >>>>>>>>> Is there anything in development.log when you submit the request >>>>>>>>> (or >>>>>>>>> already there indicating a problem before the request)? What about >>>>>>>>> in >>>>>>>>> the server terminal window? >>>>>>>>> >>>>>>>>> Colin >>>>>>>>> >>>>>>>>> -- >>>>>>>>> You received this message because you are subscribed to the Google >>>>>>>>> Groups "Ruby on Rails: Talk" group. >>>>>>>>> To post to this group, send email to >>>>>>>>> rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>>>>>>> To unsubscribe from this group, send email to >>>>>>>>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>>>>>>> For more options, visit this group at >>>>>>>>> http://groups.google.com/group/rubyonrails-talk?hl=en. >>>>>>>>> >>>>>>>>> >>>>>>>> -- >>>>>>>> You received this message because you are subscribed to the Google >>>>>>>> Groups "Ruby on Rails: Talk" group. >>>>>>>> To post to this group, send email to >>>>>>>> rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>>>>>> To unsubscribe from this group, send email to >>>>>>>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>>>>>> For more options, visit this group at >>>>>>>> http://groups.google.com/group/rubyonrails-talk?hl=en. >>>>>>>> >>>>>>> >>>>>>> -- >>>>>>> You received this message because you are subscribed to the Google >>>>>>> Groups "Ruby on Rails: Talk" group. >>>>>>> To post to this group, send email to >>>>>>> rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>>>>> To unsubscribe from this group, send email to >>>>>>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>>>>> For more options, visit this group at >>>>>>> http://groups.google.com/group/rubyonrails-talk?hl=en. >>>>>>> >>>>>> >>>>>> -- >>>>>> You received this message because you are subscribed to the Google >>>>>> Groups "Ruby on Rails: Talk" group. >>>>>> To post to this group, send email to >>>>>> rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>>>> To unsubscribe from this group, send email to >>>>>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>>>> For more options, visit this group at >>>>>> http://groups.google.com/group/rubyonrails-talk?hl=en. >>>>>> >>>>> >>>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Ruby on Rails: Talk" group. >>>> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>> To unsubscribe from this group, send email to >>>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>> For more options, visit this group at >>>> http://groups.google.com/group/rubyonrails-talk?hl=en. >>>> >>> >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Talk" group. >> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-talk?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Maybe Matching Threads
- Did rails or shoulda go insane on the inflection of 'taxes'?
- Rails 3 Active Record query returns "undefined method `loaded?' for #<Array:0x126a4c>"
- Is apostrophe (') something special in a regex if at end?
- Date parse - month and day reversed
- Why Ruby on Rails?