It works fine when I start a single instance of mongrel or thin. But when I use thin cluster or passenger, some ajax is really slow, takes about 2 minutes to complete. Any sugestion? By the way, I tried passenger for nginx and nginx + thin cluster.
What does your production log say? How many ms does it take to render your request? -- Posted via http://www.ruby-forum.com/.
It looks that the request has problems reach a thin instance, as soon as it reaches the thin instance, the request completes quickly. The production log says it took about 150000ms to complete the request. But not all the request has the problem, some of them complete within half a second which is normal. I''m guessing that nginx has problems dispatching the request to a thin or passenger instance. Has any body encountered this problem before? On Oct 26, 1:22 am, Wouter de Bie <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> What does your production log say? How many ms does it take to render > your request? > -- > Posted viahttp://www.ruby-forum.com/.
On Sun, Oct 25, 2009 at 6:28 PM, phoenix <zht.phoenix-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > It looks that the request has problems reach a thin instance, as soon > as it reaches the thin instance, the request completes quickly. The > production log says it took about 150000ms to complete the request. > But not all the request has the problem, some of them complete within > half a second which is normal. I''m guessing that nginx has problems > dispatching the request to a thin or passenger instance. Has any body > encountered this problem before? > >Is this a local or remote deployment? In any case, I would do the following: 1) check your connection to the internet 2) check with your New Relic or other performance monitoring to track the issue 3) re-check the overall configuration of the system 3) reboot nginx and thin servers and see if the problem still persists 4) check with the hosting company 5) do testing in production mode on you local system using the same remote configuration to see if the issue exists Good luck, -Conrad> On Oct 26, 1:22 am, Wouter de Bie <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > wrote: > > What does your production log say? How many ms does it take to render > > your request? > > -- > > Posted viahttp://www.ruby-forum.com/. > > >--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
first, I''m sure my connection to the internet is ok. And the problem exist after i restart nginx and thin, and it is repeatable. I did tested on my local machine with the same configuration, it works fine. I used ubuntu 8.10 on my local machine, but the server runs on freebsd 7.2, so maybe there''s some difference. On Oct 26, 10:12 am, Conrad Taylor <conra...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Sun, Oct 25, 2009 at 6:28 PM, phoenix <zht.phoe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > It looks that the request has problems reach a thin instance, as soon > > as it reaches the thin instance, the request completes quickly. The > > production log says it took about 150000ms to complete the request. > > But not all the request has the problem, some of them complete within > > half a second which is normal. I''m guessing that nginx has problems > > dispatching the request to a thin or passenger instance. Has any body > > encountered this problem before? > > Is this a local or remote deployment? In any case, I would do the > following: > > 1) check your connection to the internet > 2) check with your New Relic or other performance monitoring to track the > issue > 3) re-check the overall configuration of the system > 3) reboot nginx and thin servers and see if the problem still persists > 4) check with the hosting company > 5) do testing in production mode on you local system using the same remote > configuration to see if the issue exists > > Good luck, > > -Conrad > > > On Oct 26, 1:22 am, Wouter de Bie <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > > wrote: > > > What does your production log say? How many ms does it take to render > > > your request? > > > -- > > > Posted viahttp://www.ruby-forum.com/.
On Sun, Oct 25, 2009 at 7:30 PM, phoenix <zht.phoenix-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > first, I''m sure my connection to the internet is ok. >You''re sure but did you check it.> And the problem exist after i restart nginx and thin, and it is > repeatable. >I did tested on my local machine with the same configuration, it works> fine. >I used ubuntu 8.10 on my local machine, but the server runs on freebsd> 7.2, so maybe there''s some difference. > >It''s not really the same configuration if you''re using binaries built for Linux locally and FreeBSD binaries remotely. In theory, they would be the same but in practice they may not be. Did you check with your hosting company? What do the logs say for both nginx and thin? What''s the performance like without Javascript enabled? -Conrad> On Oct 26, 10:12 am, Conrad Taylor <conra...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > On Sun, Oct 25, 2009 at 6:28 PM, phoenix <zht.phoe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > It looks that the request has problems reach a thin instance, as soon > > > as it reaches the thin instance, the request completes quickly. The > > > production log says it took about 150000ms to complete the request. > > > But not all the request has the problem, some of them complete within > > > half a second which is normal. I''m guessing that nginx has problems > > > dispatching the request to a thin or passenger instance. Has any body > > > encountered this problem before? > > > > Is this a local or remote deployment? In any case, I would do the > > following: > > > > 1) check your connection to the internet > > 2) check with your New Relic or other performance monitoring to track > the > > issue > > 3) re-check the overall configuration of the system > > 3) reboot nginx and thin servers and see if the problem still persists > > 4) check with the hosting company > > 5) do testing in production mode on you local system using the same > remote > > configuration to see if the issue exists > > > > Good luck, > > > > -Conrad > > > > > On Oct 26, 1:22 am, Wouter de Bie <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > > > wrote: > > > > What does your production log say? How many ms does it take to render > > > > your request? > > > > -- > > > > Posted viahttp://www.ruby-forum.com/. > > >--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I got the problem solved! It turned out to be a directory access problem. I used texlive for math formular editing, and the access mod for directory that contains these executables is 777. After I changed it to 755, the problem disapeared. I overlooked a warning in my log, which says: ''world writable directory /xxx/xxx''. And I didn''t expect this would cause such weird behavior, I don''t see much connection here.. I wasted a lot of time on this and it really taught me a lesson! Thanks for all your kind help. You are a very nice man!