On 01/21/2013 07:32 AM, 松本 亮介 wrote: > Hi Daniel. > > Thank you for your comment. > >> I have tried to compile and install mod_mruby on my own machine to test >> it, but there are too many compiler errors for it to work :( In >> particular, you have a lot of declarations after statements in your >> code, which is not C90 compliant, and needs fixing. There are also some > > Did you built mruby? If you don't build murky, you try to build by bellow > commands. > > - mruby and mod_mruby build > git clone git://github.com/matsumoto-r/mod_mruby.git > cd mod_mruby > git submodule init > git submodule update > cd murby > rake > cd .. > ./configure --with-apxs=/usr/local/apache2222/bin/apxs > --with-apachectl=/usr/local/apache2222/bin/apachectl > make > make install > > - mod_mruby settings > cp -p test/test.mrb /usr/local/apache2222/htdocs/. > vi /usr/local/apache2222/conf/httpd.con > (snip) > LoadModule mruby_module modules/mod_mruby.so > AddHandler mruby-script .mrb > (snip) > /usr/local/apache2222/bin/apachectl start > > - mod_mruby test > http://youraddress/test.mrb > <snip>
Hi again, I did manage to finally get mod_mruby running on my test server, after a lot of tweaking of your source code. In general, you should always compile your development modules using _maintainer mode_. This can be achieved when you configure the httpd source by running ./configure --enable-maintainer-mode. This should also make apxs run using maintainer mode, which will alert you to anything about the code which doesn't sit right with httpd and the standards we have laid out. As for how the module runs, I'll include mod_mruby in my talk a bit, showing how mod_lua compares to it as well as mod_php and mod_perl on httpd 2.4 (yes, mod_perl can be built for 2.4 ;) ). While it shows a good performance - considering Ruby is generally a slow language - it does have serious performance issues once you start upping the concurrency on 2.4. At only 30 concurrent clients, I am getting a lot of disconnects and segmentation faults from mod_mruby, making it plummet down to 150 requests per second for a simple hello world script, and at 500 concurrent clients, it's as low as 50 requests per second, possibly because it crashes the server, which then has to re-spawn new workers all the time. I've uploaded a log of GDB at http://apaste.info/dsFz which you can possibly use to figure out why it's behaving like it does. There also seems to be a lot of other exceptions raised when just calling it with 1 client (mrb_exc_raise). I hope you figure these things out, as mod_mruby is a welcome addition to the http server :). If you can get it to run stable on 2.4/2.5 before ApacheCon, I'd love to try it out again and get some proper performance tests going. With regards, Daniel.