Re: [Mongrel] [ANN] Mongrel 0.3.15 PR -- All The Fixes Good For You
Hi, On Mit 15.11.2006 18:20, Zed A. Shaw wrote: [snipp] CGI WRAPPER PLANS When you get this new version (and read the ChangeLog) you'll see mention of a BMH implementation. This is the Boyer-Moore-Horspool algorithm for finding one string in another: http://en.wikipedia.org/wiki/Boyer%E2%80%93Moore%E2%80%93Horspool_algorithm I took the above code (which I guess is alright) and modified the hell out of it so that you can pass successive chunks of the haystack and it'll find all the needles ultra fast even across chunk boundaries. My initial performance measurements puts it at about 3.84G/second. Yes, as in 26 seconds to process 100G of data with 99000 mime boundaries in it. Commence the arguing. Cool, we have used also the BMH for awffull[1] and was also impressed how fast this algo work ;-) I have compared it whith FJS (http://cgjennings.ca/fjs) and it looks for our issue not so fast, but it could also be a implemention problem ;-) Regards Aleks [1] http://www.stedee.id.au/awffull ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
[Mongrel] OSX requires sudo for using ports 1024
I assume some of you have run into this error before when trying to run mongrel on port 80 (or another port 1024) in OSX: $ mongrel_rails start -p 80 ** Starting Mongrel listening at 0.0.0.0:80 /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.14/lib/mongrel/tcphack.rb:12:in `initialize_without_backlog': Permission denied - bind(2) (Errno::EACCES) from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.14/lib/mongrel/tcphack.rb:12:in `initialize' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.14/lib/mongrel.rb:536:in `initialize' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.14/lib/mongrel/configurator.rb:128:in `listener' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.14/bin/mongrel_rails:96:in `cloaker_' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.14/lib/mongrel/configurator.rb:51:in `initialize' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.14/bin/mongrel_rails:83:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.14/lib/mongrel/command.rb:211:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.14 /bin/mongrel_rails:235 from /usr/local/bin/mongrel_rails:18 Mongrel runs without sudo on all other ports 1024 otherwise. Anyone have the reason that these ports require sudo? Matt -- -- Matt Pelletier http://www.eastmedia.com -- EastMedia http://www.informit.com/title/0321483502 -- The Mongrel Book http://identity.eastmedia.com -- OpenID, Identity 2.0 ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] [ANN] Mongrel 0.3.15 PR -- All The Fixes Good For You
On Thu, 16 Nov 2006 09:57:27 +0100 Aleksandar Lazic [EMAIL PROTECTED] wrote: Hi, On Mit 15.11.2006 18:20, Zed A. Shaw wrote: [snipp] Cool, we have used also the BMH for awffull[1] and was also impressed how fast this algo work ;-) I have compared it whith FJS (http://cgjennings.ca/fjs) and it looks for our issue not so fast, but it could also be a implemention problem ;-) Hadn't heard of FJS, but the BMH main property I was interested in was the ability to feed it sequential chunks and with a slight change still find the search string across chunk boundaries. For example, if two packets came in chopped like this: asdfas|adfasfd.. Where the | is the break, then most implementations can't detect the search string. That being said, I'm pretty sure the code can be improved on. If anyone can make it faster or better feel free to go ahead. Just keep the properties in the current implementation of being able to feed chunks and still find the search string in them arbitrarily. -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] OSX requires sudo for using ports 1024
On 16.11.2006, at 19.37, Matt Pelletier wrote: Mongrel runs without sudo on all other ports 1024 otherwise. Anyone have the reason that these ports require sudo? I think it is pretty common to require sudo to run on privileged ports. I guess it might be because otherwise any user could start acting as the web server in the internet (assuming the port is not blocked by a firewall). //jarkko -- Jarkko Laine http://jlaine.net http://dotherightthing.com http://www.railsecommerce.com http://odesign.fi smime.p7s Description: S/MIME cryptographic signature ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
[Mongrel] Monrel Woes on Solaris x86
Greetings, I need some help... please be gentle :-) MY SETUP: Solaris-X86, ruby-1.8.4, Apache-2.2.0, Mongrel-0.3.13.4, MySql-4.1.10a I am using the typical setup with apache proxying request to mongrel with mod_proxy_balancer. Currently, I am only running a single instance of mongrel behind the proxy. I am also using the following gems with this app: capistrano (1.2.0) daemons (1.0.2) gem_plugin (0.2.1) mongrel (0.3.13.4, 0.3.13.3) mysql (2.7) needle (1.3.0) rails (1.1.6) ruby-net-ldap (0.0.4) NOTE: My MySql server is running on a different machine than Mongrel. THE PROBLEM The problem, is that after a period of inactivity Mongrel just stops responding. I believe the problem has to do with MySql as mentioned in the FAQ. I've confirmed this--I think--by creating a dummy app that doesn't use MySql for any of the page requests. In this instance, after long periods of inactivity Mongrel works without any problems. WHAT I'VE TRIED: 1) After 20 minutes of inactivity, I try to load the page in the browser. The browser just hangs and eventually times out. I then ssh'd to the machine and did a (curl localhost:50042), mongrel does not respond. I can see that mongrel is still running if I to a (ps -A). Running (top) shows that mongrel is consuming around 34M of memory and using no .01% CPU. I'm running mongrel in development mode, yet no entries are making it to (deveopment.log). I'm also running mongrel in debug_mode and no entries are being added to any of the log files in the mongrel_debug directory. BTW, I am running mongrel on port 50042 because this is the port I've been given permission to run Mongrel on. 2) After hitting mongrel with a bunch of (curl locahost:50042) calls, I did (lsof -i -P | grep CLOSE_WAIT) and here is the output: mongrel_r 5522 agile6u IPv4 0xa02b8e00 0t617 TCP localhost:50042-localhost:51299 (CLOSE_WAIT) curl 20784 agile4u IPv4 0xb10832000t0 TCP webfarm-dev.Berkeley.EDU:51330-webfarm-dev.Berkeley.EDU:80 (CLOSE_WAIT) curl 20785 agile4u IPv4 0xb9477a000t0 TCP webfarm-dev.Berkeley.EDU:51333-webfarm-dev.Berkeley.EDU:80 (CLOSE_WAIT) curl 20788 agile4u IPv4 0xb1025c000t0 TCP webfarm-dev.Berkeley.EDU:51339-webfarm-dev.Berkeley.EDU:80 (CLOSE_WAIT) curl 20798 agile4u IPv4 0xa02b9a000t0 TCP webfarm-dev.Berkeley.EDU:51345-webfarm-dev.Berkeley.EDU:80 (CLOSE_WAIT) curl 20799 agile4u IPv4 0xb945be000t0 TCP webfarm-dev.Berkeley.EDU:51348-webfarm-dev.Berkeley.EDU:80 (CLOSE_WAIT) curl 20805 agile4u IPv4 0xb0d7ae000t0 TCP webfarm-dev.Berkeley.EDU:51357-webfarm-dev.Berkeley.EDU:80 (CLOSE_WAIT) NOTE: I do not have access to the root account, my user name is agile. I'm not even sure what (lsof) is telling me here, so if someone could give me a hint, or point me to a url with a good overview, that would be killer. 3) After checking the logs (which show nothing) and running (lsof) I tried to shut mongrel down with (mongrel_rails mongrel::stop -p pids/mongrel.pid I get the response Sending TERM to Mongrel at PID 5522...Done. However, when I check the log directory the mongrel.pid file is still there and (ps -A) verifies that mongrel is still running. I called the shutdown method 4 more times and on the 4th try mongrel finally stops. I then checked the monrel.log file and found the following: Thu Nov 16 09:21:00 PST 2006: Reaping 1 threads for slow workers because of 'shutdown' Thread #Thread:0x8d54f50 run is too old, killing. Waiting for 1 requests to finish, could take 60 seconds. 4) I tried adding ActiveRecord::Base.verification_timeout = 14400 to my rails environment.rb file, as per the FAQ, this had no effect. MOVING FORWARD I'm not really sure where to go from here. Like I said, I have a strong suspicion that MySql is the culprit, but I'm not sure how to fix the problem. If anyone could give me some advice on what to try next, I would really appreciate it. Regards, Steven ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] OSX requires sudo for using ports 1024
On UNIX-derived systems, ports below 1024 are privileged and can only be accessed as root. On Nov 16, 2006, at 11:37 AM, Matt Pelletier wrote: I assume some of you have run into this error before when trying to run mongrel on port 80 (or another port 1024) in OSX: $ mongrel_rails start -p 80 ** Starting Mongrel listening at 0.0.0.0:80 /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.14/lib/mongrel/ tcphack.rb:12:in `initialize_without_backlog': Permission denied - bind(2) (Errno::EACCES) from /usr/local/lib/ruby/gems/1.8/gems/mongrel- 0.3.14/lib/ mongrel/tcphack.rb:12:in `initialize' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.14/lib/ mongrel.rb:536:in `initialize' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.14/lib/ mongrel/configurator.rb:128:in `listener' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.14/bin/ mongrel_rails:96:in `cloaker_' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.14/lib/ mongrel/configurator.rb:51:in `initialize' from /usr/local/lib/ruby/gems/1.8/gems/mongrel- 0.3.14/bin/ mongrel_rails:83:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.14/lib/ mongrel/command.rb:211:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.14/bin/ mongrel_rails:235 from /usr/local/bin/mongrel_rails:18 Mongrel runs without sudo on all other ports 1024 otherwise. Anyone have the reason that these ports require sudo? Matt -- -- Matt Pelletier http://www.eastmedia.com -- EastMedia http://www.informit.com/title/0321483502 -- The Mongrel Book http://identity.eastmedia.com -- OpenID, Identity 2.0 ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] OSX requires sudo for using ports 1024
I assume some of you have run into this error before when trying to run mongrel on port 80 (or another port 1024) in OSX: $ mongrel_rails start -p 80 ** Starting Mongrel listening at 0.0.0.0:80 /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.14/lib/mongrel/tcphack.rb:12:in `initialize_without_backlog': Permission denied - bind(2) (Errno::EACCES) from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.14/lib/mongrel/tcphack.rb:12:in `initialize' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.14/lib/mongrel.rb:536:in `initialize' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.14/lib/mongrel/configurator.rb:128:in `listener' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.14/bin/mongrel_rails:96:in `cloaker_' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.14/lib/mongrel/configurator.rb:51:in `initialize' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.14/bin/mongrel_rails:83:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.14/lib/mongrel/command.rb:211:in `run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.14 /bin/mongrel_rails:235 from /usr/local/bin/mongrel_rails:18 Mongrel runs without sudo on all other ports 1024 otherwise. Anyone have the reason that these ports require sudo? This is the way it is on all unixes... ports under 1024 tend to be well known. 25 for smtp, 80 for http. So the OS won't let you use that port unless you are root so that joe-random-user can't start up some subversive web server on that port... -philip ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users