Re: [Catalyst] Using Catalyst with mod_per or FastCGI on heavy traffic web application
On Fri, Jan 29, 2010 at 06:14:09PM -0800, Bill Moseley wrote: > I don't really see how what server you use effects error messages. Stderr > is stderr. I would never use the canned Apache error responses anyway for > a site. > -- > Bill Moseley Oops, I see did not explain that point clearly. By error messages, I was refering to error messages that visitors to my website see, not the kind that I see in my log. With mod_perl, if your script has an error, for example if your database server goes away, you'll either get the default "Internal Server Error" message, or (hopefully) a customized error message that looks like it's part of your website. Same using fastcgi. But with mod_perl, when you're restarting your application, you're starting the whole web server, so during that time...which can be longer than you expect for a number of reasons...people attempting to reach your site will get browser errors saying your site is down or unreachable. But with fastcgi, the web server keeps running and can serve a static error page while the fastcgi server is not available. And with no perl in the mix, restarting the web server itself takes less time and can be done more gracefully. Adam Mackler ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Using Catalyst with mod_per or FastCGI on heavy traffic web application
Hmm. Perhaps i misunderstand the concept. I was thinking there was the third option of using a psgi server or mod psgi -Original Message- Date: Friday, January 29, 2010 8:50:07 pm To: "catalyst" From: "Hans Dieter Pearcey" Subject: Re: [Catalyst] Using Catalyst with mod_per or FastCGI on heavy traffic web application Excerpts from xenoterrac...@gmail.com's message of Fri Jan 29 20:22:48 -0500 2010: > Enlightening how do you feel about fastcgi vs psgi? This question makes no sense. How do you feel about HTML vs. HTTP? PSGI is an interface for Perl code. FastCGI is an interface for network communications. They aren't in the same problem space, except to the degree that there are FastCGI servers that then run PSGI applications. hdp. ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/ ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Using Catalyst with mod_per or FastCGI on heavy traffic web application
Just so it's not one-sided, I moved from FastCGI to mod_perl some years back. Start up and restart time was one issue, IIRC, but mod_perl was trivial to configure and solved stability issues we were seeing. I never went back, so maybe it's better now. Is there now a manager that will spawn more FastCGI processes based on load? The Catalyst server is used for development. The app knows it's running with that engine and disables the SSL requirements, but logs that the page would be blocked if not in SSL. Starting different configurations is no problem at all. I have an app startup script that generates the httpd.conf file from configuration files at startup time. It's basically start_app --app=foo --mode=testing. The apps have dev, testing, qa, stating, and production modes, so as you can see it's not a big deal. All those are on different machines, but different modes can use different ports, of course, so can be on the same machine. I'm usingCronolog so there's no log rotation/restart needs. mod_perl does seem a bit heavy weight just to serve requests, especially since all we use is the response handler. We also don't use many modules (SSL is not handled by Apache). I've meant to look at other server options, but there's not pressing need. I don't really see how what server you use effects error messages. Stderr is stderr. I would never use the canned Apache error responses anyway for a site. True, Apache can run as only one user. But, that's normally the apache (or whatever) user which has very limited access, which is what you want. So, I don't see a benefit of running as different users. Apps may need to run on multiple machines so only part of the file system need access to would be for temp files. I think mod_perl is daunting to some due to all the possibilities (and default httpd.conf Apache provides) but really the config required to get it to serve a Catalyst app is just a few lines. My entire files are pretty small: $ fgrep -v '#' httpd.conf | grep -v '^$' |grep -v LoadModule | grep -v 'Module>' | wc -l 40 -- Bill Moseley mose...@hank.org ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Using Catalyst with mod_per or FastCGI on heavy traffic web application
Excerpts from xenoterrac...@gmail.com's message of Fri Jan 29 20:22:48 -0500 2010: > Enlightening how do you feel about fastcgi vs psgi? This question makes no sense. How do you feel about HTML vs. HTTP? PSGI is an interface for Perl code. FastCGI is an interface for network communications. They aren't in the same problem space, except to the degree that there are FastCGI servers that then run PSGI applications. hdp. ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Using Catalyst with mod_per or FastCGI on heavy traffic web application
Enlightening how do you feel about fastcgi vs psgi? ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Using Catalyst with mod_per or FastCGI on heavy traffic web application
Well, I'm sure no expert, but that doesn't stop me from having opinions. The reasons I stopped using mod_perl are: safer when perl encounters errors, easier for learning, easier for development, better error messages when restarting production applications, and the ability to have each application run as a different system user. Perhaps the most compelling reason that I stopped using mod_perl is because with both perl and the web server combined in one executable, a problem with perl can cause not only the whole website to go down, but also all the other websites handled by that same webserver to go down as well. Second, setting up staging servers so you can develop without touching your production site is easier using fastcgi. Even having one staging server with mod_perl is difficult. Will you run two whole apaches simultaneously? What if you want to have more than one staging server? Adding more staging servers gets ridiculous fast. (BTW, I know the Catalyst Book says that you're supposed to use the myapp_server.pl for development, but I want to have SSL turned on all the time.) With fastcgi, I literally had dozens of different applications running at once, and they can all crash and burn and the webserver keeps running. In fact, that's how I learned to use Catalyst. For every tutorial I found, I made its own fastcgi process, and then I set up the web server to know about each one. http://myhost.com/alpha was the authorization tutorial, /beta was the CRUD totorial, etc. I could look at and play with any or all of them running at once; it made learning from examples much easier. In addition to making it easier to learn and to development, in the production environment fastcgi has significant advantages as relates to error messages, restarting, and security: I can have two levels of error messages: one is the replacement for the "Internal Server Error" that results from a problem with perl running--the same error you arleady have, for example if your database server crashes, generated by the perl application. But with fastcgi I have another, separate error page that is a nice-looking static page served by the web server when the fasccgi server is not there. So during the time when I am restarting my fastcgi application, visitors see that nice static page rather than getting a browser error message, which is what happens when you restart a server with mod_perl. And as your application(s) grow in size (and number), restarting them takes longer and longer, so that feature becomes more important. Finally, a wonderful benefit of using fastcgi is that each one of my fastcgi applications runs as a separate user, and none of those fastcgi users is the user that the web server runs as. I sleep that much better at night knowing that the web server cannot read the files that have database passwords in them, and so on. Anyway, that's my conclusion after doing things both ways. My current setup is similar to yours: FreeBSD, lighttpd, Catalyst, and PostgreSQL. Adam PS, I'm curious why you're using mysql. Is there a way in which its better than Postgres? On Fri, Jan 29, 2010 at 04:35:10PM +0530, Amit Jha wrote: > Does anyone have any advice on what will the best option mod_perl or > FastCGI or something else. if I have the following > development/production environment for my web application which is a > search engine. > 1. Linux(RHEL5) > 2. Apache 2.2.x > 3. Perl 5.10 > 4. mod_perl 2.0.x > 5. mysql 5.1.x > 6. Catalyst 5.8.x > ___ > List: Catalyst@lists.scsys.co.uk > Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst > Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ > Dev site: http://dev.catalyst.perl.org/ ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] mod_fcgid on win32
Hi, > Ok, so I may be getting somewhere with this, but I can't tell. > > I installed the .dll found here: http://www.fastcgi.com/dist/ and now my > config looks like the following: > > ... > > Any ideas on what I might try next? Have you tried the mod_fastcgi binaries and config example described on catalyst wiki? http://dev.catalystframework.org/wiki/deployment/apache_fastcgi_win32 -- kmx ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] mod_fcgid on win32
Is it still valid? Copyright (c) 1995-1996 Open Market, Inc. -- Best regards, Alex Am Donnerstag, den 28.01.2010, 15:45 +0100 schrieb Hans Dieter Pearcey: > Excerpts from Alexander Hartmaier's message of Thu Jan 28 09:29:42 -0500 2010: > > I've looked *multiple* times for it, but not in the non-free repo. > > Do you know why it is there? > > Probably because it has a weird license: > > http://packages.debian.org/changelogs/pool/non-free/liba/libapache-mod-fastcgi/libapache-mod-fastcgi_2.4.6-1/copyright > > hdp. > > ___ > List: Catalyst@lists.scsys.co.uk > Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst > Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ > Dev site: http://dev.catalyst.perl.org/ *"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"* T-Systems Austria GesmbH Rennweg 97-99, 1030 Wien Handelsgericht Wien, FN 79340b *"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"* Notice: This e-mail contains information that is confidential and may be privileged. If you are not the intended recipient, please notify the sender and then delete this e-mail immediately. *"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"* ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] Using Catalyst with mod_per or FastCGI on heavy traffic web application
Does anyone have any advice on what will the best option mod_perl or FastCGI or something else. if I have the following development/production environment for my web application which is a search engine. 1. Linux(RHEL5) 2. Apache 2.2.x 3. Perl 5.10 4. mod_perl 2.0.x 5. mysql 5.1.x 6. Catalyst 5.8.x Genius at work The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/