From buyaos4aigauais at yahoo.com Wed May 2 02:47:51 2012 From: buyaos4aigauais at yahoo.com (Rick) Date: Wed, 2 May 2012 10:47:51 +0800 Subject: =?GB2312?B?RGlnaXRhbCBQaG90byBFZGl0aW5nIFNlcg==?= =?GB2312?B?dmljZXMgLSBQaG90byBDdXRvdXQgLSBQaA==?= =?GB2312?B?b3RvIFJldG91Y2hpbmc=?= Message-ID: You are receiving this email because we wish you to use our digital photo editing services. We are a China based Imaging Professionals. We offer basic and advanced digital photo Editing services and solutions like photo Cutout, morphological photo Editing, photoshop photo Editing, satellite photo Editing, color photo Editing and vector photo Editing using latest techniques. Our mainly services are: 1. Photo Cutout 2. Photo Enhancement 3. Photo Retouching 4. Vector Conversion 5. Pop Art 6. Images Masking 7. Clipping Path 8. Photo Restoration 9. Web Design Looking forward to work for you! Best regards, Rick Ramtuenaisma Imaging Professionals Contact: contactrick at yeah.net ------------------------------------------------- This e-mail (and any attachments) is confidential and may contain personal views which are not the views of us. unless specifically stated. If you have received it in error, please delete it from your system, do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately. UNSUBSCRIBE INSTRUCTIONS If you do not wish to receive our newsletter, pls send address to imremove at yeah.net for remove. Before printing think about the Environment. From flippedootninja at gmail.com Wed May 2 16:30:58 2012 From: flippedootninja at gmail.com (Pico Aeterna) Date: Wed, 2 May 2012 09:30:58 -0700 Subject: Socket errors and nginx 502 gateway errors In-Reply-To: <20120429191825.GA14919@dcvr.yhbt.net> References: <20120428215904.GA6524@dcvr.yhbt.net> <20120429191825.GA14919@dcvr.yhbt.net> Message-ID: Eric, Thanks for your help. Was able to isolate the problem to a geoip gem. I appreciate the tips and debugging help. Thanks Will On Sun, Apr 29, 2012 at 12:18 PM, Eric Wong wrote: > Pico Aeterna wrote: >> reaped # worker=9 >> /var/www/domain/releases/20120427011507/app/controllers/application_controller.rb:172: >> [BUG] Segmentation fault > > OK, something (most likely your app) is causing Ruby to segfault. > This is completely unrelated to nginx, so it'll be easier to hit > unicorn directly to diagnose this. > > Since you're new to debugging, I'll try to walk you through dealing > with core dumps: > > * Enable core dumps in the same shell process before starting unicorn > ?(ulimit -c unlimited && unicorn -c /path/to/config ...) > > * On Linux, /proc/sys/kernel/core_* sysctls control where your core dumps > ?are created. > > And when you get a core dump (a "core" or core.$PID file), you can run > gdb on it: > > ? gdb /path/to/ruby /path/to/core > > Make sure you're using the same ruby binary that unicorn is using. > Ruby should be compiled with debugging symbols ('-g' or '-ggdb') by > default, but if not, you'll probably want to recompile. > >> 7369 ?writev(31, [{"GET >> /widget/looks.js?id=1172821&thumbs=3&source=my_looks&gender=both&align=center&r=1320622693&hash=36189f21135680efbe2d076d0b56bb06 >> HTTP/1.0\r\nX-Forwarded >> -For: 83.9.20.243, 83.9.20.243\r\nHost: domain.nu\r\nConnection: >> close\r\nUser-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) >> AppleWebKit/534.55.3 (KHTML, like Gecko) Version/5.1.5 >> Safari/534.55.3\r\nAccept: */*\r\nReferer: >> http://www.xxxxx.com/\r\nAccept-Language: pl-PL\r\nAccept-Encoding: >> gzip, deflate\r\nCookie: >> __utma=78941577.1641012066.1319789648.1325094074.1325949868.3; >> __utmz=78941577.1325949868.3.3.utmcsr=xxxx.com|utmccn=(referral)|utmcmd=referral|utmcct=/l.php; >> __gads=ID=269c5cea8f09aea0:T=1319789648:S=ALNI_MaqwdMaIFS5I3FeqLnv86oivdVDuA; >> __qca=P0-1390452860-1319789648200\r\n\r\n", 745}], 1) = 7457369 > >> Using the following I was able to get a 200 response >> >> req='GET / HTTP/1.1\r\nHost: domain.com\r\n\r\n' >> printf "$req" | socat - UNIX:/var/www/domain/shared/sockets/unicorn.sock > > OK, I think your printf request needs to more closely match what nginx > is sending to trigger the segfault. ?I would add/remove > headers/parameters you see above until things start segfaulting. > > With socat, you may also want to wait a bit for the response for > slower endpoints: > > ?(printf "$req"; sleep $SECONDS) | socat - ... > > Otherwise socat will disconnect immediately after its written to > the socket without waiting for a response. > > (a better, but complicated way would be to setup a FIFO as the > ?integration tests in unicorn do). > > If you're familiar with Rack::Mock*, you may also want to isolate this > to just a Rack application. ?It's likely the segfault can be triggered > for your app without unicorn, too. > >> Sorry but i'm new to debugging Unicorn. ?Hopefully some of this is helpful. > > It is helpful. ?Debugging unicorn isn't different than debugging > anything else. ?The most important is to understand the problem, and > that's done by isolating variables to get a small, reproducible test > case. > _______________________________________________ > Unicorn mailing list - mongrel-unicorn at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-unicorn > Do not quote signatures (like this one) or top post when replying From adam.ffa at gmail.com Wed May 2 19:15:48 2012 From: adam.ffa at gmail.com (adam k) Date: Wed, 2 May 2012 12:15:48 -0700 Subject: unicorn + sleep = long wake up loading time In-Reply-To: <20120428044003.GA10474@dcvr.yhbt.net> References: <20120428044003.GA10474@dcvr.yhbt.net> Message-ID: > unicorn is likely getting swapped out or a backend connection > (e.g. database connection) is getting timed out due to > inactivity. I looked up the answers to the questions you asked and they led me to applications being swapped out. I added more ram and everything is running well. Thank you for helping me. From adam.ffa at gmail.com Thu May 3 18:24:51 2012 From: adam.ffa at gmail.com (adam k) Date: Thu, 3 May 2012 11:24:51 -0700 Subject: unicorn + sleep = long wake up loading time In-Reply-To: <20120428044003.GA10474@dcvr.yhbt.net> References: <20120428044003.GA10474@dcvr.yhbt.net> Message-ID: > unicorn is likely getting swapped out or a backend connection > (e.g. database connection) is getting timed out due to > inactivity. I looked up the answers to the questions you asked and they led me to applications being swapped out. I added more ram and everything is running well. Thank you for helping me. From vlad at yotpo.com Tue May 8 12:14:26 2012 From: vlad at yotpo.com (Vladislav Shub) Date: Tue, 8 May 2012 15:14:26 +0300 Subject: An Issue with max request uri length Message-ID: Hi, I have a unicorn server that receives a long http GET request and i got 414 Request-URI Too Long. After looking around I have found that it's hard coded to 15k ( global_variables.h:65 DEF_MAX_LENGTH(REQUEST_URI, 1024 * 15);) the question is what is the main reason for this restriction and can it be overwritten by some configuration and if not can you please patch it to work with a configuration? Thanks,; Vladislav Shub From normalperson at yhbt.net Tue May 8 19:13:48 2012 From: normalperson at yhbt.net (Eric Wong) Date: Tue, 8 May 2012 12:13:48 -0700 Subject: An Issue with max request uri length In-Reply-To: References: Message-ID: <20120508191348.GA3516@dcvr.yhbt.net> Vladislav Shub wrote: > Hi, > I have a unicorn server that receives a long http GET request and i > got 414 Request-URI Too Long. > After looking around I have found that it's hard coded to 15k ( > global_variables.h:65 DEF_MAX_LENGTH(REQUEST_URI, 1024 * 15);) the > question is what is the main reason for this restriction This restriction reduces vectors for attacks (hash collision, memory exhaustion/fragmentation and most importantly: things we have yet to think of). > and can it be overwritten by some configuration and if not can you > please patch it to work with a configuration? I'm against adding configuration parameters hardly anybody needs or uses. Its more things in the documentation (too much documentation/options is confusing for users). This restriction has been in more widely deployed servers (e.g. mongrel/thin) for many years before unicorn and hardly anybody has an issue with it. Why do you need to such a long URI? Do you expect users to follow such long URLs? How often do you actually see such long URLs from other applications, perhaps your app is doing something wrong? Given the prevalence/popularity of URL shorteners, perhaps using shorter URLs in the first place is a good idea :) From kig at wanelo.com Wed May 9 06:18:55 2012 From: kig at wanelo.com (Konstantin Gredeskoul) Date: Tue, 8 May 2012 23:18:55 -0700 Subject: unicorn 4 does not compile on Joyent (SmartOS/Solaris) due to raindrops dependency Message-ID: Dear unicorn developer list, I did a quick search online and couldn't find many reports, but I thought I'd find out anyway. Joyent cloud is a pretty awesomely fast cloud running on Solaris derivative (SmartOS). Pretty much the entire ruby stack, including imagemagick (the perennial nightmare) build without problems with ruby 1.9.3, as does unicorn up until version 3.7.0. However, the raindrops dependency introduced in 4.0 breaks raindrops (and therefore unicorn 4) on SmartOS. The fact that the compilation breaks in the file named "linux_inet_diag.c" makes me believe that perhaps the authors may not have anticipated usage beyond Linux, or there may be some other reason. In any case, it would be great to be able to run latest unicorn on SmartOS, so if anyone has any suggestion please let me know how. In the meantime we are running on 3.7.0. Best regards, Konstantin > uname -a SunOS demo001.dev 5.11 joyent_XXXX i86pc i386 i86pc Solaris > file .rvm/rubies/ruby-1.9.3-p194/bin/ruby .rvm/rubies/ruby-1.9.3-p194/bin/ruby: ELF 64-bit LSB executable AMD64 Version 1, dynamically linked, not stripped > gem install raindrops Fetching: raindrops-0.8.0.gem (100%) Building native extensions. ?This could take a while... ERROR: ?Error installing raindrops: ? ? ? ? ERROR: Failed to build gem native extension. ? ? ? ? /home/wanelo/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb checking for mmap() in sys/mman.h... yes checking for munmap() in sys/mman.h... yes checking for mremap() in sys/mman.h... no checking for getpagesize() in unistd.h... yes checking for rb_thread_blocking_region()... yes checking for rb_thread_io_blocking_region()... yes checking for GCC 4+ atomic builtins... yes creating Makefile make compiling linux_inet_diag.c linux_inet_diag.c:1:0: error: CPU you selected does not support x86-64 instruction set linux_inet_diag.c:1:0: error: CPU you selected does not support x86-64 instruction set make: *** [linux_inet_diag.o] Error 1 Gem files will remain installed in /home/kig/.rvm/gems/ruby-1.9.3-p194/gems/raindrops-0.8.0 for inspection. Results logged to /home/kig/.rvm/gems/ruby-1.9.3-p194/gems/raindrops-0.8.0/ext/raindrops/gem_make.out From normalperson at yhbt.net Wed May 9 07:02:29 2012 From: normalperson at yhbt.net (Eric Wong) Date: Wed, 9 May 2012 07:02:29 +0000 Subject: unicorn 4 does not compile on Joyent (SmartOS/Solaris) due to raindrops dependency In-Reply-To: References: Message-ID: <20120509070229.GA26345@dcvr.yhbt.net> Konstantin Gredeskoul wrote: > However, the raindrops dependency introduced in 4.0 breaks raindrops > (and therefore unicorn 4) on SmartOS. > > The fact that the compilation breaks in the file named > "linux_inet_diag.c" makes me believe that perhaps the authors may not > have anticipated usage beyond Linux, or there may be some other That file is Linux-specific, but the rest of raindrops (and unicorn) works on FreeBSD, OpenBSD and probably others. I have every expectation it'd work on SmartOS[1] > > uname -a > SunOS demo001.dev 5.11 joyent_XXXX i86pc i386 i86pc Solaris ^^^^ > > file .rvm/rubies/ruby-1.9.3-p194/bin/ruby > .rvm/rubies/ruby-1.9.3-p194/bin/ruby: ELF 64-bit LSB executable > AMD64 Version 1, dynamically linked, not stripped ^^^^^ Are you running a mixed 32-bit/64-bit installation? Can you check the build system isn't picking the wrong compiler or compiler flags? > make > compiling linux_inet_diag.c > linux_inet_diag.c:1:0: error: CPU you selected does not support x86-64 > instruction set That's odd, the first line is just #include You can try emptying/removing that file completely? (maybe linux_tcp_diag.c, too). Your env shouldn't define the __linux__ macro. The linux_* files is wrapped with an #ifdef __linux__, so those files shouldn't even be compiled on other OSes. The portable part of raindrops does use CPU-specific atomics (which GCC or libatomic_ops provides). Ruby 1.9.3 itself uses these instructions, too. [1] - SmartOS seems to be Free Software, so I can actually support it :) From kig at wanelo.com Wed May 9 07:11:30 2012 From: kig at wanelo.com (Konstantin Gredeskoul) Date: Wed, 9 May 2012 00:11:30 -0700 Subject: unicorn 4 does not compile on Joyent (SmartOS/Solaris) due to raindrops dependency In-Reply-To: <20120509070229.GA26345@dcvr.yhbt.net> References: <20120509070229.GA26345@dcvr.yhbt.net> Message-ID: Eric, awesome and thanks for replying! I'll email you privately to chase this down. K On Wed, May 9, 2012 at 12:02 AM, Eric Wong wrote: > Konstantin Gredeskoul wrote: >> However, the raindrops dependency introduced in 4.0 breaks raindrops >> (and therefore unicorn 4) on SmartOS. >> >> The fact that the compilation breaks in the file named >> "linux_inet_diag.c" makes me believe that perhaps the authors may not >> have anticipated usage beyond Linux, or there may be some other > > That file is Linux-specific, but the rest of raindrops (and unicorn) > works on FreeBSD, OpenBSD and probably others. ?I have every expectation > it'd work on SmartOS[1] > >> > uname -a >> SunOS demo001.dev 5.11 joyent_XXXX i86pc i386 i86pc Solaris > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ^^^^ > >> > file .rvm/rubies/ruby-1.9.3-p194/bin/ruby >> .rvm/rubies/ruby-1.9.3-p194/bin/ruby: ? ELF 64-bit LSB executable >> AMD64 Version 1, dynamically linked, not stripped > ?^^^^^ > > Are you running a mixed 32-bit/64-bit installation? > Can you check the build system isn't picking the wrong compiler > or compiler flags? > >> make >> compiling linux_inet_diag.c >> linux_inet_diag.c:1:0: error: CPU you selected does not support x86-64 >> instruction set > > That's odd, the first line is just #include > > You can try emptying/removing that file completely? ?(maybe > linux_tcp_diag.c, too). > > Your env shouldn't define the __linux__ macro. ?The linux_* files is > wrapped with an #ifdef __linux__, so those files shouldn't even > be compiled on other OSes. > > The portable part of raindrops does use CPU-specific atomics > (which GCC or libatomic_ops provides). ?Ruby 1.9.3 itself uses > these instructions, too. > > > [1] - SmartOS seems to be Free Software, so I can actually support it :) > _______________________________________________ > Unicorn mailing list - mongrel-unicorn at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-unicorn > Do not quote signatures (like this one) or top post when replying -- Konstantin Gredeskoul CTO?:: Wanelo Inc cell:?(415) 265 1054 From lfurrea at simplecs.net Wed May 9 19:29:09 2012 From: lfurrea at simplecs.net (Luis Fernando Urrea) Date: Wed, 9 May 2012 13:29:09 -0600 Subject: Unicorn doesn't play nice with Capistrano deployment? In-Reply-To: References: Message-ID: I am having issues when using unicorn with a Capistrano deployment. >From what I have been able to understand Capistrano uses a scheme in wich every release is deployed inside the releases directory under a unique name and if the transaction was successful, creates a symlink named current that will point to that release. So I end up with a deployment directory such as: /home/deployer/apps/sample_app/current Then when I try to start unicorn from the binstubs directory all the unicorn methods look for things in the following path, particularly in the configurator.rb module: /home/deployer/apps/sample_app I haven't been able to fully understand how unicorn sets the working_directory from here: https://github.com/defunkt/unicorn/raw/master/lib/unicorn/configurator.rb But I wanted to check with the community if I am missing something evident due to the noob nature in me. TIA -- O: 2248-2483 C: 8723-2518 From kig at wanelo.com Wed May 9 19:33:15 2012 From: kig at wanelo.com (Konstantin Gredeskoul) Date: Wed, 9 May 2012 12:33:15 -0700 Subject: Unicorn doesn't play nice with Capistrano deployment? In-Reply-To: References: Message-ID: I highly recommend using the gem for this: https://github.com/sosedoff/capistrano-unicorn instead of rolling your own. I typically start unicorn (and any other task) by first doing a CD into the application directory (either release_path or current_path depending on when during your deployment the command runs). When you set this up, please check your config/unicorn/"#{Rails.env}".rb, perhaps that is what's pointing to the wrong path? Hope this helps K On Wed, May 9, 2012 at 12:29 PM, Luis Fernando Urrea wrote: > I am having issues when using unicorn with a Capistrano deployment. > >From what I have been able to understand Capistrano uses a scheme in > wich every release is deployed inside the releases directory under a > unique name and if the transaction was successful, creates a symlink > named current that will point to that release. > > So I end up with a deployment directory such as: > > /home/deployer/apps/sample_app/current > > Then when I try to start unicorn from the binstubs directory all the > unicorn methods look for things in the following path, particularly in > the configurator.rb module: > > /home/deployer/apps/sample_app > > I haven't been able to fully understand how unicorn sets the > working_directory from here: > > https://github.com/defunkt/unicorn/raw/master/lib/unicorn/configurator.rb > > But I wanted to check with the community if I am missing something > evident due to the noob nature in me. > > TIA > > > -- > O: 2248-2483 > C: 8723-2518 > _______________________________________________ > Unicorn mailing list - mongrel-unicorn at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-unicorn > Do not quote signatures (like this one) or top post when replying -- Konstantin Gredeskoul CTO?:: Wanelo Inc cell:?(415) 265 1054 From rob at roberocity.com Wed May 9 19:47:47 2012 From: rob at roberocity.com (Rob Sutherland) Date: Wed, 9 May 2012 14:47:47 -0500 Subject: Unicorn doesn't play nice with Capistrano deployment? In-Reply-To: References: Message-ID: I'm going to a bit off your topic but for good reason. I was finally annoyed by capistrano for other reasons and went with a simple git based deployment. I setup my remote repo to post to a url in the app when a commit happens. The action of that URL is summed up in this gist: https://gist.github.com/2648267 I also use this because I can make changes on github directly or on the server and commit the changes to cause the same code refresh and worker restart. It's also nice that the app on the server is an actual git repo. I don't have experience with the capistrano-unicorn gem; that gem may be more of what you're looking for. On Wed, May 9, 2012 at 2:29 PM, Luis Fernando Urrea wrote: > I am having issues when using unicorn with a Capistrano deployment. > >From what I have been able to understand Capistrano uses a scheme in > wich every release is deployed inside the releases directory under a > unique name and if the transaction was successful, creates a symlink > named current that will point to that release. > > So I end up with a deployment directory such as: > > /home/deployer/apps/sample_app/current > > Then when I try to start unicorn from the binstubs directory all the > unicorn methods look for things in the following path, particularly in > the configurator.rb module: > > /home/deployer/apps/sample_app > > I haven't been able to fully understand how unicorn sets the > working_directory from here: > > https://github.com/defunkt/unicorn/raw/master/lib/unicorn/configurator.rb > > But I wanted to check with the community if I am missing something > evident due to the noob nature in me. > > TIA > > > -- > O: 2248-2483 > C: 8723-2518 > _______________________________________________ > Unicorn mailing list - mongrel-unicorn at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-unicorn > Do not quote signatures (like this one) or top post when replying -- Rob Sutherland 256.473.3148 From kig at wanelo.com Wed May 9 19:57:44 2012 From: kig at wanelo.com (Konstantin Gredeskoul) Date: Wed, 9 May 2012 12:57:44 -0700 Subject: Unicorn doesn't play nice with Capistrano deployment? In-Reply-To: References: Message-ID: I like the simplicity of your git hook deployment solution, but the simplicity is also it's limitation. If you are running say 2 clusters of 10 app servers, need to do rolling deploys without downtime, stop/start things like resque, solr, memcached all in the right order to allow for the site to continue functioning while it's happening, then you'd probably be very happy that capistrano exists :) Also, what about production-only configuration, such as production db connection params, credentials to various other services, maybe even a payment gateway? I would highly discourage from checking these into your source code repo for obvious reasons. For a single host environment i don't think it really matters, but for anything bigger than that, capistrano is pretty awesome. I've used it for many years, and most recently capified a green field rails project. It took about an hour. Anyway, I am not married to capistrano, but I do think it's a great tool that solves a very large pain in a consistent and programmable way, and is certainly worth a try. K On Wed, May 9, 2012 at 12:47 PM, Rob Sutherland wrote: > I'm going to a bit off your topic but for good reason. I was finally > annoyed by capistrano for other reasons and went with a simple git > based deployment. > > I setup my remote repo to post to a url in the app when a commit > happens. The action of that URL is summed up in this gist: > https://gist.github.com/2648267 > > I also use this because I can make changes on github directly or on > the server and commit the changes to cause the same code refresh and > worker restart. It's also nice that the app on the server is an actual > git repo. > > I don't have experience with the capistrano-unicorn gem; that gem may > be more of what you're looking for. > > > > > On Wed, May 9, 2012 at 2:29 PM, Luis Fernando Urrea > wrote: >> I am having issues when using unicorn with a Capistrano deployment. >> >From what I have been able to understand Capistrano uses a scheme in >> wich every release is deployed inside the releases directory under a >> unique name and if the transaction was successful, creates a symlink >> named current that will point to that release. >> >> So I end up with a deployment directory such as: >> >> /home/deployer/apps/sample_app/current >> >> Then when I try to start unicorn from the binstubs directory all the >> unicorn methods look for things in the following path, particularly in >> the configurator.rb module: >> >> /home/deployer/apps/sample_app >> >> I haven't been able to fully understand how unicorn sets the >> working_directory from here: >> >> https://github.com/defunkt/unicorn/raw/master/lib/unicorn/configurator.rb >> >> But I wanted to check with the community if I am missing something >> evident due to the noob nature in me. >> >> TIA >> >> >> -- >> O: 2248-2483 >> C: 8723-2518 >> _______________________________________________ >> Unicorn mailing list - mongrel-unicorn at rubyforge.org >> http://rubyforge.org/mailman/listinfo/mongrel-unicorn >> Do not quote signatures (like this one) or top post when replying > > > > -- > > Rob Sutherland > 256.473.3148 > _______________________________________________ > Unicorn mailing list - mongrel-unicorn at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-unicorn > Do not quote signatures (like this one) or top post when replying -- Konstantin Gredeskoul CTO?:: Wanelo Inc cell:?(415) 265 1054 From rob at roberocity.com Wed May 9 20:05:44 2012 From: rob at roberocity.com (Rob Sutherland) Date: Wed, 9 May 2012 15:05:44 -0500 Subject: Unicorn doesn't play nice with Capistrano deployment? In-Reply-To: References: Message-ID: Great points. Most of what I do are simple deployments. I haven't experimented with memcached, etc. that would benefit from a capistrano style deployment. This also works better in Sinatra than in Rails for limiting downtime because the restart is typically quicker. For most of what I do Capistrano is too much. So I like the simplicity here. For production only configuration I don't have that checked into source control. It exists on the server only and ignored in the .gitignore file (as does most of my custom development config). There are some things in source control that gets pushed to the server - such as tests, etc. And just to be clear, I'm not anti Capistrano. I just like to keep things as simple as possible. For a large system the git hook won't work. But for a small system Capistrano is (typically) too much. On Wed, May 9, 2012 at 2:57 PM, Konstantin Gredeskoul wrote: > I like the simplicity of your git hook deployment solution, but the > simplicity is also it's limitation. > > If you are running say 2 clusters of 10 app servers, need to do > rolling deploys without downtime, stop/start things like resque, solr, > memcached all in the right order to allow for the site to continue > functioning while it's happening, then you'd probably be very happy > that capistrano exists :) > > Also, what about production-only configuration, such as production db > connection params, credentials to various other services, maybe even a > payment gateway? ?I would highly discourage from checking these into > your source code repo for obvious reasons. > > For a single host environment i don't think it really matters, but for > anything bigger than that, capistrano is pretty awesome. ?I've used it > for many years, and most recently capified a green field rails > project. It took about an hour. > > Anyway, I am not married to capistrano, but I do think it's a great > tool that solves a very large pain in a consistent and programmable > way, and is certainly worth a try. > > K > > > > On Wed, May 9, 2012 at 12:47 PM, Rob Sutherland wrote: >> I'm going to a bit off your topic but for good reason. I was finally >> annoyed by capistrano for other reasons and went with a simple git >> based deployment. >> >> I setup my remote repo to post to a url in the app when a commit >> happens. The action of that URL is summed up in this gist: >> https://gist.github.com/2648267 >> >> I also use this because I can make changes on github directly or on >> the server and commit the changes to cause the same code refresh and >> worker restart. It's also nice that the app on the server is an actual >> git repo. >> >> I don't have experience with the capistrano-unicorn gem; that gem may >> be more of what you're looking for. >> >> >> >> >> On Wed, May 9, 2012 at 2:29 PM, Luis Fernando Urrea >> wrote: >>> I am having issues when using unicorn with a Capistrano deployment. >>> >From what I have been able to understand Capistrano uses a scheme in >>> wich every release is deployed inside the releases directory under a >>> unique name and if the transaction was successful, creates a symlink >>> named current that will point to that release. >>> >>> So I end up with a deployment directory such as: >>> >>> /home/deployer/apps/sample_app/current >>> >>> Then when I try to start unicorn from the binstubs directory all the >>> unicorn methods look for things in the following path, particularly in >>> the configurator.rb module: >>> >>> /home/deployer/apps/sample_app >>> >>> I haven't been able to fully understand how unicorn sets the >>> working_directory from here: >>> >>> https://github.com/defunkt/unicorn/raw/master/lib/unicorn/configurator.rb >>> >>> But I wanted to check with the community if I am missing something >>> evident due to the noob nature in me. >>> >>> TIA >>> >>> >>> -- >>> O: 2248-2483 >>> C: 8723-2518 >>> _______________________________________________ >>> Unicorn mailing list - mongrel-unicorn at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/mongrel-unicorn >>> Do not quote signatures (like this one) or top post when replying >> >> >> >> -- >> >> Rob Sutherland >> 256.473.3148 >> _______________________________________________ >> Unicorn mailing list - mongrel-unicorn at rubyforge.org >> http://rubyforge.org/mailman/listinfo/mongrel-unicorn >> Do not quote signatures (like this one) or top post when replying > > > > -- > > Konstantin Gredeskoul > CTO?:: Wanelo Inc > cell:?(415) 265 1054 > _______________________________________________ > Unicorn mailing list - mongrel-unicorn at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-unicorn > Do not quote signatures (like this one) or top post when replying -- Rob Sutherland 256.473.3148 From normalperson at yhbt.net Wed May 9 20:07:30 2012 From: normalperson at yhbt.net (Eric Wong) Date: Wed, 9 May 2012 20:07:30 +0000 Subject: Unicorn doesn't play nice with Capistrano deployment? In-Reply-To: References: Message-ID: <20120509200730.GC6078@dcvr.yhbt.net> Luis Fernando Urrea wrote: > I am having issues when using unicorn with a Capistrano deployment. > >From what I have been able to understand Capistrano uses a scheme in > wich every release is deployed inside the releases directory under a > unique name and if the transaction was successful, creates a symlink > named current that will point to that release. Correct. > So I end up with a deployment directory such as: > > /home/deployer/apps/sample_app/current > > Then when I try to start unicorn from the binstubs directory all the > unicorn methods look for things in the following path, particularly in > the configurator.rb module: > > /home/deployer/apps/sample_app > > I haven't been able to fully understand how unicorn sets the > working_directory from here: > > https://github.com/defunkt/unicorn/raw/master/lib/unicorn/configurator.rb Just put the following line at the top of your config file: working_directory "/home/deployer/apps/sample_app/current" When I used Capistrano, I would start unicorn inside the "current" directory to avoid that config line: cd /home/deployer/apps/sample_app/current unicorn -c $PWD/config/unicorn.conf.rb That said, I don't deploy with Capistrano anymore. I package apps into gem/rpm/deb/any-other-packaging-system for multi-machine deployments, and use a git checkout for single-instance deployments. From normalperson at yhbt.net Fri May 11 01:12:17 2012 From: normalperson at yhbt.net (Eric Wong) Date: Thu, 10 May 2012 18:12:17 -0700 Subject: [raindrops] testers on 32-bit FreeBSD wanted Message-ID: <20120511011217.GB24952@dcvr.yhbt.net> Since unicorn users are raindrops users, I'd appreciate it if 32-bit FreeBSD users can give this a try. Thanks! ref: http://mid.gmane.org/20120510215457.GA11961 at dcvr.yhbt.net Eric Wong wrote: > I've just pushed this out to master on git://bogomips.org/raindrops > > The original check for "i386" arch was causing builds on SmartOS > to fail. > > Also available as a prerelease gem (0.8.0.5.g71f8): > > gem install --pre raindrops > > >From 71f80afdbcb45245a01ee2c278ebda692587e92a Mon Sep 17 00:00:00 2001 > From: Eric Wong > Date: Thu, 10 May 2012 14:49:39 -0700 > Subject: [PATCH] extconf: better check for GCC atomic builtins > > Attempting to test for CMPXCHG on x86 should allow this check to > fail on i386 systems. We also won't need try_run as a result, > enabling cross-compilation. The configure.in check in Ruby > 1.9.3 does something similar and that's far more widely used > than raindrops is. > --- > ext/raindrops/extconf.rb | 15 ++++++--------- > 1 file changed, 6 insertions(+), 9 deletions(-) > > diff --git a/ext/raindrops/extconf.rb b/ext/raindrops/extconf.rb > index 9f5de95..447a90a 100644 > --- a/ext/raindrops/extconf.rb > +++ b/ext/raindrops/extconf.rb > @@ -13,23 +13,20 @@ have_func('rb_thread_blocking_region') > have_func('rb_thread_io_blocking_region') > > checking_for "GCC 4+ atomic builtins" do > + # we test CMPXCHG anyways even though we don't need it to filter out > + # ancient i386-only targets without CMPXCHG > src = < int main(int argc, char * const argv[]) { > - volatile unsigned long i = 0; > + unsigned long i = 0; > + __sync_lock_test_and_set(&i, 0); > + __sync_lock_test_and_set(&i, 1); > __sync_add_and_fetch(&i, argc); > __sync_sub_and_fetch(&i, argc); > return 0; > } > SRC > > - if try_run(src) > - # some systems target GCC for i386 and don't get the atomic builtins > - # when building shared objects > - arch = `#{CONFIG['CC']} -dumpmachine`.split(/-/)[0] > - if arch == "i386" && $CFLAGS !~ /\b-march=/ > - $CFLAGS += " -march=i486 " > - end > - > + if try_link(src) > $defs.push(format("-DHAVE_GCC_ATOMIC_BUILTINS")) > true > else > -- > Eric Wong From normalperson at yhbt.net Sat May 12 06:05:46 2012 From: normalperson at yhbt.net (Eric Wong) Date: Sat, 12 May 2012 06:05:46 +0000 Subject: [raindrops] testers on 32-bit FreeBSD wanted In-Reply-To: <20120511011217.GB24952@dcvr.yhbt.net> References: <20120511011217.GB24952@dcvr.yhbt.net> Message-ID: <20120512060546.GB7159@dcvr.yhbt.net> Eric Wong wrote: > Since unicorn users are raindrops users, I'd appreciate it if > 32-bit FreeBSD users can give this a try. Thanks! I've tested on a i386 FreeBSD 9.0 install I made and seems fine. Not sure about FreeBSD 7.0, though, but that's pretty ancient... Anyways, raindrops 0.8.1 is out. Changes: This release fixes a build problem found under a current SmartOS. This release also runs successfully on FreeBSD 9.0 under both x86-64 and i386. There are also documentation updates from Aman Gupta and a test suite fix from Jeremy Evans for OpenBSD. raindrops fully supports unicorn on recent versions of FreeBSD, OpenBSD, SmartOS, and possibly other Free Software systems. Portability reports and fixes for Free Software systems is greatly appreciated at raindrops at librelist.org Non-Free systems will never be supported. raindrops requires the Linux 2.6.18 or later for full functionality (which unicorn does not require). Future releases will take advantage of the unix_diag functionality found in the Linux 3.3 (and later) kernels. * http://raindrops.bogomips.org/ * raindrops at librelist.org * git://bogomips.org/raindrops.git * http://raindrops.bogomips.org/NEWS.atom.xml From tim at lossen.de Mon May 14 20:17:57 2012 From: tim at lossen.de (Tim Lossen) Date: Mon, 14 May 2012 22:17:57 +0200 Subject: unicorn <3 Message-ID: <20AECF49-DCCD-4D79-9578-2A22AFF7478A@lossen.de> hey, i am a big unicorn fan -- i have been running it in production since late 2010, and it is happily handling (literally) billions of backend requests for a popular facebook game. i also <3 unicorns in general ..... so i decided to make an awesome t- shirt, sporting the "Angry Unicorn" that you may remember from github error pages. i hope some of you might like it as well: http://n3rdshirt.com (please note that i am running this project like a "kickstarter for t- shirts" -- the tee will only be produced if 48 or more people want one, as the overhead for a gorgeous 8-color screen print would be much too high, otherwise.) cheers tim -- http://tim.lossen.de From aaron at ktheory.com Mon May 14 21:11:00 2012 From: aaron at ktheory.com (Aaron Suggs) Date: Mon, 14 May 2012 17:11:00 -0400 Subject: unicorn <3 In-Reply-To: <20AECF49-DCCD-4D79-9578-2A22AFF7478A@lossen.de> References: <20AECF49-DCCD-4D79-9578-2A22AFF7478A@lossen.de> Message-ID: On Monday, May 14, 2012 at 4:17 PM, Tim Lossen wrote: > i also <3 unicorns in general ..... so i decided to make an awesome t- > shirt, > sporting the "Angry Unicorn" that you may remember from github error > pages. Do you have the right to the use the angry unicorn image? Would love to have an angry unicorn t-shirt; but not if it's infringing on what I assume is Github's property. (see https://github.com/blog/517-unicorn) -Aaron Suggs From tim at lossen.de Mon May 14 21:26:27 2012 From: tim at lossen.de (Tim Lossen) Date: Mon, 14 May 2012 23:26:27 +0200 Subject: unicorn <3 In-Reply-To: References: <20AECF49-DCCD-4D79-9578-2A22AFF7478A@lossen.de> Message-ID: <46C1B4E9-F3A0-4C9A-8C06-547F67F542C5@lossen.de> On 2012-05-14, at 11:11 PM, Aaron Suggs wrote: > On Monday, May 14, 2012 at 4:17 PM, Tim Lossen wrote: >> i also <3 unicorns in general ..... so i decided to make an awesome >> t- >> shirt, sporting the "Angry Unicorn" that you may remember from >> github error >> pages. > > Do you have the right to the use the angry unicorn image? > > Would love to have an angry unicorn t-shirt; but not if it's > infringing on what I assume is Github's property. (see https://github.com/blog/517-unicorn) > hi aaron, right, maybe i should have made this clear. i asked github -- they told me the unicorn is available from istockphoto (for a fee, naturally): http://www.istockphoto.com/stock-illustration-7264775-unicorn.php if the quorum is met, i will purchase an "extended license (items for resale)" from istockphoto for $133, so we can all proudly wear our unicorns without infringing on anybody's rights :) cheers tim -- http://tim.lossen.de From Mailer-Daemon at cnri-mx.cnri.reston.va.us Mon May 21 14:07:48 2012 From: Mailer-Daemon at cnri-mx.cnri.reston.va.us (Mail Delivery System) Date: Mon, 21 May 2012 10:07:48 -0400 Subject: Mail delivery failed: returning message to sender Message-ID: *********************** InterScan VirusWall 6 has detected an item that contains a virus in this message. Please contact the administrator for further information. *********************** This message was created automatically by mail delivery software. A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed: guido at cnri.reston.va.us Unknown user ------ This is a copy of the message, including all the headers. ------ ------ The body of the message is 40335 characters long; only the first ------ 16384 or so are included here. Return-path: Received: from exim by cnri-mx.cnri.reston.va.us with spam-scanned (Exim 4.66) (envelope-from ) id 1SWTGK-0003Pe-VJ for guido at cnri.reston.va.us; Mon, 21 May 2012 10:07:07 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1-cnri1 (2010-03-16) on cnri-mx.cnri.reston.va.us X-Spam-Flag: YES X-Spam-Level: ********* X-Spam-Status: Yes, score=9.8 required=5.0 tests=BASE64_LENGTH_79_INF,BAYES_50, FORGED_MUA_OUTLOOK,FSL_UA,FSL_XM_419,MSOE_MID_WRONG_CASE,SPF_FAIL, TO_NO_BRKTS_MSFT autolearn=no version=3.3.1-cnri1 X-Spam-Report: * 0.0 FSL_XM_419 Old OE version in X-Mailer only seen in 419 spam * 3.0 SPF_FAIL SPF: sender does not match SPF record (fail) * [SPF failed: Please see http://www.openspf.org/Why?s=mfrom;id=mongrel-unicorn%40rubyforge.org;ip=38.100.138.144;r=cnri-mx.cnri.reston.va.us] * 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.4983] * 1.5 BASE64_LENGTH_79_INF BODY: BASE64_LENGTH_79_INF * 0.0 FSL_UA FSL_UA * 2.6 MSOE_MID_WRONG_CASE MSOE_MID_WRONG_CASE * 0.0 TO_NO_BRKTS_MSFT To: misformatted and supposed Microsoft tool * 1.9 FORGED_MUA_OUTLOOK Forged mail pretending to be from MS Outlook Received: from ehs6.handle.net ([38.100.138.144]) by cnri-mx.cnri.reston.va.us with esmtps (TLSv1:AES256-SHA:256) (Exim 4.66) (envelope-from ) id 1SWTFj-0003OL-8p for guido at cnri.reston.va.us; Mon, 21 May 2012 10:06:27 -0400 Received: from [122.176.79.5] (helo=rubyforge.org) by ehs6.handle.net with esmtp (Exim 4.63) (envelope-from ) id 1SWSfB-0004VP-Kg for guido at cnri.reston.va.us; Mon, 21 May 2012 09:28:47 -0400 From: mongrel-unicorn at rubyforge.org To: guido at cnri.reston.va.us Subject: Delivery reports about your e-mail Date: Mon, 21 May 2012 18:58:13 +0530 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0009_7A94E84E.4227AC9E" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-ACL-Warn: match sbl-xbl.spamhaus.org Message-Id: X-ENGLISH: Subject contains some English characters This is a multi-part message in MIME format. ------=_NextPart_000_0009_7A94E84E.4227AC9E Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit The original message was received at Mon, 21 May 2012 18:58:13 +0530 from rubyforge.org [69.92.226.179] ----- The following addresses had permanent fatal errors ----- guido at cnri.reston.va.us ----- Transcript of session follows ----- ... while talking to 167.21.132.4: >>> RCPT To: <<< 550 5.1.1 ... Invalid recipient ------=_NextPart_000_0009_7A94E84E.4227AC9E Content-Type: text/plain; name="ATTACHMENT_BLOCKING_document_zip.TXT" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="ATTACHMENT_BLOCKING_document_zip.TXT" Original attachment (document.zip) was Deleted. A virus was detected and removed from the original attachment. You can safely save or delete this replacement attachment. From ruth.martin at premiumlinkadvertising.com Wed May 23 12:08:41 2012 From: ruth.martin at premiumlinkadvertising.com (Ruth Martin) Date: Wed, 23 May 2012 16:08:41 +0400 Subject: Quick question about bogomips.org Message-ID: Hello, I'm interested in placing a text link on your page: http://unicorn.bogomips.org/TUNING.html. The link would point to a page on a website that is relevant to your page and may be useful to your site visitors. We would be happy to compensate you for your time if it's something we're able to work out. The best way to reach me is through a direct response to this email. This will help me get back to you about the right link request. Please let me know if you're interested, and if not thanks for your time. Cheers! Ruth Martin | Premium Media Marketer | p +1 619 573 6848 Premium Link Ads | Win-win link solutions http://www.premiumlinkadvertising.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee, you should not disseminate, distribute or copy this email. Please notify the sender immediately if you have received this email by mistake and delete this email from your system.
Unsubscribe From manuel.valente at gmail.com Wed May 23 13:29:23 2012 From: manuel.valente at gmail.com (Manuel Valente) Date: Wed, 23 May 2012 15:29:23 +0200 Subject: [Suggestion] Add upstream param to listen statement Message-ID: <4FBCE633.6060909@gmail.com> Hi, It would be nice to be able to reject all incoming requests to unicorn if they do not originate from our upstream http server. An additional parameter to the listen statement is perhaps the best way to achieve this : server.listen(addr, :tries => -1, :delay => 5, :backlog => 128, :upstream => '10.0.0.1') This param could be a string or an array of IP addresses. I read the documentation but did not find any way to achieve this. Best regards, -- Manuel Valente prixing.fr From normalperson at yhbt.net Wed May 23 18:50:22 2012 From: normalperson at yhbt.net (Eric Wong) Date: Wed, 23 May 2012 18:50:22 +0000 Subject: [Suggestion] Add upstream param to listen statement In-Reply-To: <4FBCE633.6060909@gmail.com> References: <4FBCE633.6060909@gmail.com> Message-ID: <20120523185022.GA30532@dcvr.yhbt.net> Manuel Valente wrote: > Hi, > > It would be nice to be able to reject all incoming requests to > unicorn if they do not originate from our upstream http server. > > An additional parameter to the listen statement is perhaps the best > way to achieve this : > > server.listen(addr, :tries => -1, :delay => 5, :backlog => 128, > :upstream => '10.0.0.1') > > This param could be a string or an array of IP addresses. iptables (or whatever firewall module that comes with your OS) is far more efficient than anything in userspace for rejecting IPs entirely. You can also do this in middleware by checking env["REMOTE_ADDR"]. I'll sometimes do something like this to reject certain HTTP methods (/POST/PUT/DELETE), but let GET/HEAD requests through: # totally untested code for Rack middleware: class Rejector def new(app, bad_ips) @bad_ips = bad_ips @app = app end def call(env) case env["REQUEST_METHOD"] when "POST", "DELETE", "PUT" return [ 403, {}, [] ] if @bad_ips.include?(env["REMOTE_ADDR"]) end @app.call(env) end end ---------- config.ru -------------- require 'set' require 'rejector' use Rejector, Set.new("10.0.0.1") run YourApp.new Instead of Set, you can also check out rpatricia for netmasks: http://www.goto.info.waseda.ac.jp/~tatsuya/rpatricia/ From undp2012award at sohu.com Sat May 26 11:17:14 2012 From: undp2012award at sohu.com (UNDP 2012 PROMO) Date: Sat, 26 May 2012 11:17:14 GMT Subject: Dear Winner(320,000GBP) Message-ID: YOU HAVE BEEN GRANTED 320,000GBP IN UNDP 2012 AWARD PROGRAM, TO CLAIM CONTACT MR. PERRY ZUMA AT undp963 at gmail.com AND PROVIDE HIM WITH YOUR 1. NAME, 2. ADRESS, 3.SEX, 4.TEL NO, 5.AGE 6.WIN NO:UN320HN Congratulation!! Regards Mrs Rosemary Holland UNITED NATION DEVELOPMENT PROGRAM From chuasdkaos78uasajina at msn.com Thu May 31 00:58:12 2012 From: chuasdkaos78uasajina at msn.com (Rick) Date: Thu, 31 May 2012 08:58:12 +0800 Subject: =?GB2312?B?RGlnaXRhbCBQaG90byBFZGl0aW5nIFNlcg==?= =?GB2312?B?dmljZXMgLSBQaG90byBDdXRvdXQgLSBQaA==?= =?GB2312?B?b3RvIFJldG91Y2hpbmc=?= Message-ID: <27ca28fd-85ea-4f05-b4c4-8f1dc803e318@SRVMES02.hussor.local> You are receiving this email because we wish you to use our digital photo editing services. We are a China based Imaging Professionals. We offer basic and advanced digital photo Editing services and solutions like photo Cutout, morphological photo Editing, photoshop photo Editing, satellite photo Editing, color photo Editing and vector photo Editing using latest techniques. Our strength in providing Editing solutions for digital images like photo masking, photo re-touching, back ground cleaning & cloning, sharpening & restoration of color, all this derive from our vast experience. Our dedicated team of highly skilled and experienced professionals serves the photo Editing requirements of our clients. An in house quality checking mechanism assures value addition and delivers perfect job. Our team can deliver your job overnight or in time bounded fashion irrespective of job size. Our mainly services are: 1. Photo Cutout 2. Photo Enhancement 3. Photo Retouching 4. Vector Conversion 5. Pop Art 6. Images Masking 7. Clipping Path 8. Photo Restoration 9. Web Design Photo Editing Services: Our Photo Editing services includes advanced photo cutouts/clippings, balancing brightness / contrast in an image, repair of minor scratches, creases, minor dust, and spot removal to removal of major scratches, cracks, creases, and stains in all areas. We also repair seriously faded/damaged photographs and make it print ready. Best regards, Rick Toeagursm Imaging Professionals Contact: ibwallace at yeah.net ------------------------------------------------- This e-mail (and any attachments) is confidential and may contain personal views which are not the views of us. unless specifically stated. If you have received it in error, please delete it from your system, do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately. UNSUBSCRIBE INSTRUCTIONS If you do not wish to receive our newsletter, pls send address to imremove at yeah.net for remove. Before printing think about the Environment.