Luis Lavena
2006-Nov-24 03:22 UTC
[Mongrel] [ANN] Mongrel Service 0.3.0, native services for you!
Hi folks, For the past weeks I have been working in solve the problems with mongrel_service and its *crazy* behavior related to standard mongrel_rails. Job made this more slow than usual, but here we are: a beta release. * What''s New? - This version of mongrel_service replaces mongrel_service ruby script with a binary, pre-built executable coded using ServiceFB framework [1] in FreeBASIC. - The "change" will be transparent for you, you only need to remove/install the service again and you''re done. The binary will be copied/updated automatically for you. This works with any mongrel_rails version installed. - With this we are trying to solve: a) weird problems when starting/stopping the service, say goodbye to that. b) unique codebase for fix things (mongrel_rails) instead of bunch of scripts. c) provide a simulation environment to report bugs or problems, something not easy when running as service. * How to install and use? - Download the gem file from this url: http://mmediasys.com/releases/mongrel_service-0.3.0-mswin32.gem (62KB) - Install it > gem install mongrel_service-0.3.0-mswin32.gem - Create a new service as usual: > mongrel_rails service::install -N myservice - Start it using "net" > net start myservice VERY IMPORTANT: don''t use this in production. * What''s planned? - Add clustering functionality. Provide from the same service code, launch N child ruby process to be balanced. Magical processor affinity for each member of the cluster (cpu affinity is disabled right now). - Add process monitoring. This functionality will relaunch the ruby process for the service in case it crash due segmentation faults or non recoverable errors in your rails application. - Complete removal of win32-service dependency - we still use this for install/remove procedures, but will be removed in following days. * How to test and report issues? This new version works encapsulating mongrel_rails script, so if your applications fails I''m almost 100% sure that will crash no matter if it run as service or a normal script. Please remember that when installing the service, its set to run using LocalService account. Use Service Control Manager from Administrative Tools to change that. 1) Try starting your application using plain mongrel_rails command. 2) If that works, use mongrel service console simulation: (example) > c:\ruby\bin\mongrel_service.exe console single -c "c:\path to my app" -p 4000 -e production - This will start the ruby process in the same way as the service. 3) If still doesn''t work, report the problem in the tracker and attach servicefb.log and mongrel_service.log files located in your ruby\bin folder including details of OS, Service Pack, and the command line used by the service. Please excuse the length of this mail but wanted to be detailed as possible. [1] ServiceFB : http://opensvn.csie.org/servicefb/trunk/README -- Luis Lavena Multimedia systems - Leaders are made, they are not born. They are made by hard effort, which is the price which all of us must pay to achieve any goal that is worthwhile. Vince Lombardi
Jan Svitok
2006-Nov-24 10:39 UTC
[Mongrel] [ANN] Mongrel Service 0.3.0, native services for you!
On 11/24/06, Luis Lavena <luislavena at gmail.com> wrote:> Hi folks, > > For the past weeks I have been working in solve the problems with > mongrel_service and its *crazy* behavior related to standard > mongrel_rails. > > Job made this more slow than usual, but here we are: a beta release. > > * What''s New? > > - This version of mongrel_service replaces mongrel_service ruby script > with a binary, pre-built executable coded using ServiceFB framework > [1] in FreeBASIC. > > - The "change" will be transparent for you, you only need to > remove/install the service again and you''re done. The binary will be > copied/updated automatically for you. This works with any > mongrel_rails version installed. > > - With this we are trying to solve: > a) weird problems when starting/stopping the service, say goodbye to that. > b) unique codebase for fix things (mongrel_rails) instead of bunch of scripts. > c) provide a simulation environment to report bugs or problems, > something not easy when running as service. > > > * How to install and use? > > - Download the gem file from this url: > http://mmediasys.com/releases/mongrel_service-0.3.0-mswin32.gem (62KB) > > - Install it > > gem install mongrel_service-0.3.0-mswin32.gem > > - Create a new service as usual: > > mongrel_rails service::install -N myservice > > - Start it using "net" > > net start myservice > > VERY IMPORTANT: don''t use this in production. > > > * What''s planned? > > - Add clustering functionality. Provide from the same service code, > launch N child ruby process to be balanced. Magical processor affinity > for each member of the cluster (cpu affinity is disabled right now). > > - Add process monitoring. This functionality will relaunch the ruby > process for the service in case it crash due segmentation faults or > non recoverable errors in your rails application. > > - Complete removal of win32-service dependency - we still use this for > install/remove procedures, but will be removed in following days. > > > * How to test and report issues? > > This new version works encapsulating mongrel_rails script, so if your > applications fails I''m almost 100% sure that will crash no matter if > it run as service or a normal script. > > Please remember that when installing the service, its set to run using > LocalService account. Use Service Control Manager from Administrative > Tools to change that. > > 1) Try starting your application using plain mongrel_rails command. > > 2) If that works, use mongrel service console simulation: (example) > > c:\ruby\bin\mongrel_service.exe console single -c "c:\path to my > app" -p 4000 -e production > > - This will start the ruby process in the same way as the service. > > 3) If still doesn''t work, report the problem in the tracker and attach > servicefb.log and mongrel_service.log files located in your ruby\bin > folder including details of OS, Service Pack, and the command line > used by the service. > > > Please excuse the length of this mail but wanted to be detailed as possible. > > [1] ServiceFB : http://opensvn.csie.org/servicefb/trunk/READMEI tried to download the gem, it says ERROR installing gem: blabla: string contains null byte. I suspected the problem is that you serve the gem as text/plain, but the md5sum is the same whether I downloaded it on unix or on windows (c275f1c0480161458490187b8bcf7c68).
Luis Lavena
2006-Nov-24 11:58 UTC
[Mongrel] [ANN] Mongrel Service 0.3.0, native services for you!
On 11/24/06, Jan Svitok <jan.svitok at gmail.com> wrote:> On 11/24/06, Luis Lavena <luislavena at gmail.com> wrote:[snip]> > I tried to download the gem, it says ERROR installing gem: blabla: > string contains null byte. > > I suspected the problem is that you serve the gem as text/plain, but > the md5sum is the same whether I downloaded it on unix or on windows > (c275f1c0480161458490187b8bcf7c68).Fixed, was a bad upload. Tested at home but firefox served me the cached download instead. Please excuse the problems and try downloading it again. -- Luis Lavena Multimedia systems - Leaders are made, they are not born. They are made by hard effort, which is the price which all of us must pay to achieve any goal that is worthwhile. Vince Lombardi
Jan Svitok
2006-Nov-24 12:44 UTC
[Mongrel] [ANN] Mongrel Service 0.3.0, native services for you!
On 11/24/06, Luis Lavena <luislavena at gmail.com> wrote:> On 11/24/06, Jan Svitok <jan.svitok at gmail.com> wrote: > > On 11/24/06, Luis Lavena <luislavena at gmail.com> wrote: > [snip] > > > > I tried to download the gem, it says ERROR installing gem: blabla: > > string contains null byte. > > > > I suspected the problem is that you serve the gem as text/plain, but > > the md5sum is the same whether I downloaded it on unix or on windows > > (c275f1c0480161458490187b8bcf7c68). > > Fixed, was a bad upload. Tested at home but firefox served me the > cached download instead. > > Please excuse the problems and try downloading it again.Thanks, it works now (it''s installed, not started yet).