Hi all, This issue has been resolved (by chance or luck, not sure which) however I wanted to get the list''s feedback on what might have happened... Our Rails app stopped working on one of our machines this afternoon with no apparent reason. The pages loaded, but all of our AJAX requests failed to return data. To make matters stranger, it worked on another box, even after clearing the browser cache. Eventually after restarting the server a few times we managed to break it on both boxes. From there, restarting the server intermittently made the application work and broke it again. We tried checking out an older revision and running the server script from it, however this did nothing to fix the issue. Finally, we checked out the earliest revision and restarted the server, at which point the application worked, and subsequent revisions began to work as well. I can only assume that this has something to do with the Webrick server, however I can''t for the life of me figure out what happened. Any ideas? Thanks, Ben
Ben Jackson wrote:> I can only assume that this has something to do with the Webrick > server, however I can''t for the life of me figure out what happened. > Any ideas?Well, you are using Webrick. Sometimes it seems that webrick caches files even after they were changed and I need to restart webrick. Webrick is a small, ruby HTTP server. It is relatively new software. There are bound to be problems with it. For a production environment, I would choose something different, more mature. Webrick is very handy to use in the development process though. - Adam
>Well, you are using Webrick. Sometimes it seems that webrick caches >files even after they were changed and I need to restart webrick. > > >Any way to turn off the caching?>Webrick is a small, ruby HTTP server. It is relatively new software. >There are bound to be problems with it. For a production environment, I >would choose something different, more mature. >That''s cool, we''re using TextDrive to deploy.>Webrick is very handy to >use in the development process though. > >Why? -- Ben Jackson Diretor de Desenvolvimento INCOMUM Design & Conceito ben-p14LI7ZcAE/pVLaUnt/cCQC/G2K4zDHf@public.gmane.org http://www.incomumdesign.com
Ben Jackson wrote:>> Webrick is very handy to >> use in the development process though. > > Why?Zero configuration, fast restart, easy debugging (with breakpoint.rb) -- Best regards, Alexey Verkhovsky Ruby Forum: http://ruby-forum.org (moderator) RForum: http://rforum.andreas-s.net (co-author) Instiki: http://instiki.org (maintainer)
On Thursday 05 May 2005 06:53 pm, Ben Jackson wrote:> >Well, you are using Webrick. Sometimes it seems that webrick caches > >files even after they were changed and I need to restart webrick. > > Any way to turn off the caching? >Good question. I spent a few hours bashing me head because it caches session across webrick instances (i.e., a restart didn''t help). David
Sure, because the session values are stored in files in the /tmp directory. Dave On 5/5/05 5:28 PM, "David Corbin" <dcorbin-wmGZ+vDKSyrZJqsBc5GL+g@public.gmane.org> wrote:> Good question. I spent a few hours bashing me head because it caches session > across webrick instances (i.e., a restart didn''t help).
David Corbin wrote:>On Thursday 05 May 2005 06:53 pm, Ben Jackson wrote: > > >>>Well, you are using Webrick. Sometimes it seems that webrick caches >>>files even after they were changed and I need to restart webrick. >>> >>> >>Any way to turn off the caching? >> >> >> > >Good question. I spent a few hours bashing me head because it caches session >across webrick instances (i.e., a restart didn''t help). > >You have to either delete the /tmp/ruby_sess* files, or remove the session cookie in the browser. But I don''t know how to turn off caching. It *should* work since it suppose to be based on file mtime, but in my experience, sometimes the server just runs the wrong files like it didn''t see me saving the file. The only way for me to fix that was to restart webrick. Webrick documentation is available at: http://www.ruby-doc.org/ . Click on std-lib to get to http://www.ruby-doc.org/stdlib/ where you should find webrick in the menu on the left. - Adam
>You have to either delete the /tmp/ruby_sess* files, or remove the >session cookie in the browser. > >But I don''t know how to turn off caching. It *should* work since it >suppose to be based on file mtime, but in my experience, sometimes the >server just runs the wrong files like it didn''t see me saving the file. >The only way for me to fix that was to restart webrick. > >Webrick documentation is available at: http://www.ruby-doc.org/ . Click >on std-lib to get to http://www.ruby-doc.org/stdlib/ where you should >find webrick in the menu on the left. > >- Adam > >Interesting. Update: we restarted the server this morning and the app stopped working again. Deleting the /tmp/ruby_sess* files did nothing to resolve the issue.
while not having specifically this ghost in the machine... doing development i have seen issues related to webrick... that started after doing the last rails update.... sometimes the new find syntax would work... sometimes it would return an error... i setup a new rails app structure... copied over the revelent .rb modules and classes that had been created and so far over the last 2 days... no issues... luckily its just a development box... no problems running under servers other than webrick... Ben Jackson wrote:> >> You have to either delete the /tmp/ruby_sess* files, or remove the >> session cookie in the browser. >> >> But I don''t know how to turn off caching. It *should* work since it >> suppose to be based on file mtime, but in my experience, sometimes the >> server just runs the wrong files like it didn''t see me saving the file. >> The only way for me to fix that was to restart webrick. >> >> Webrick documentation is available at: http://www.ruby-doc.org/ . Click >> on std-lib to get to http://www.ruby-doc.org/stdlib/ where you should >> find webrick in the menu on the left. >> >> - Adam >> >> > Interesting. Update: we restarted the server this morning and the app > stopped working again. Deleting the /tmp/ruby_sess* files did nothing > to resolve the issue. > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
On 6-mei-2005, at 1:10, Alexey Verkhovsky wrote:> Ben Jackson wrote: > > >>> Webrick is very handy to >>> use in the development process though. >>> >> >> Why? >> > > Zero configuration, fast restart, easy debugging (with breakpoint.rb)Using AJAX helpers I often get 500 response from WebRick (used it for development), and cannot restart it - only killed. So for now I just switched to FastCGI in development mode and restart it when I change the core files that don''t get reloaded on every request (and starting up FCGI instances is slow - but hey, you have to do it only twice a week...) -- Julian "Julik" Tarkhanov