fastcgi

Which FastCGI server mode should I choose under Apache?

I am new to FastCGI and looking to use this platform to speed up my existing vanilla CGI (perl) programs. However in reading the FastCGI/Apache FAQ, it appears I can setup my scripts (once converted to use separate initialization/request sections) in the Apache config as one of the following: 1) dynamic 2) static "inside the scope of ...

Looking for a comprehensive list of AOT-compiled programming languages

I am looking for: Fast compilation Multi-platform Good C++ support (probably never going to happen) The reason I am looking for such a list is basically because I want something new for an application I am working on :) TIA ...

How to create an exception folder in a django site?

There are a few folders where I house my django site that I want to be rendered as it would on any other non-django site. Namely, forum (vbulletin) and cpanel. I currently run the site with fastcgi. My .htaccess looks like this: AddHandler application/x-httpd-php5 .htm AddHandler application/x-httpd-php5 .html AddHandler fastcgi-script ...

Django with fastcgi and threads

I have a Django app, which spawns a thread to communicate with another server, using Pyro. Unfortunately, it seems like under fastcgi, multiple versions of this thread are fired off, and a dictionary that should be globally constant within my program, isn't. (Sometimes it has the values I expect, sometimes not) What's the best way to e...

What does "Maximal count of pending signals (120) exceeded" mean?

My Perl web-app, running under Apache mod_fastcgi, frequently gets errors like the following: Maximal count of pending signals (120) exceeded at line 119. I've seen this happen in relation to file uploads but I'm not sure that's the only time it happens. I also get a SIGPIPE right before (or possibly after) I get that error. Any ...

Can not connect to mysql when using FastCGI for PHP under Apache on Windows Vista

I configured PHP to use Apache mod_fcgid. PHP is working, but after changes in configuration I am not able to connect to mysql via php. How to fix this? Any ideas, which can hint me, are very desired! To check mysql connection I use the following php code: error_reporting(E_ALL); $link = mysql_connect('127.0.0.1', 'root', 'password_he...

How do I get killed using Perl FCGI?

I'm having a little problem with nginx and the Perl FCGI module. I have a long operation in my FCGI program that may outlive the server (or the user on the server) on the other end of the Unix socket I'm using to communicate FCGI. I need the FCGI accept() loop in my program to break if the FCGI request is closed. I tried installing INT, ...

Choosing web server software to run PHP from

Hi all, I've been refactoring some code running on a simple LAMP box on my network. I noticed that there really isn't any particular reason why we're using Apache aside from being able to say it's a LAMP setup. I've heard of some other options (lighttpd, nginx, etc.) and was wondering what benefit using these would provide over using Ap...

What's the meaning of maxchildren, maxspare and their relationship in fastcgi and django?

When I read this thread, I am confused by Vinko Vrsalovic's reply At server start you'll get minspare processes, which will keep growing until maxspare (or maxchildren) if more requests are coming. Then, what will happen if the the value of maxspare and maxchildren are different? The server's processes will keep growing unti...

Python + FastCGI

I'm looking for recommendations on a library to use for a FastCGI server in Python. ...

Problem running latex from FastCGI

I have a program which does a system call: latex somefile.latex This runs ok, when I type it directly in the command line, or when i invoke the program via CGI. But when it is using FastCGI, the system call returns: This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009) ---! Must increase the hyph_size (Fatal format file error; I'...

Django site on Nginx+FastCGI goes (504 gateway timeout)

Sometimes my whole Django based site goes into 504 gateway timeout errors so none page can be displayed. Is it possible to write a shell program and cronjob it run every 5 minutes to detect such errors and restart FastCGI process if needed? I'm currently using command below to restart FastCGI in case it's crashed but it doesn't work fo...

Is it better to run Codeignitor on PHP5 with or without FastCGI?

I just signed up for BlueHost and one of their PHP config options is PHP5 (FastCGI). I'm going to start using Codeignitor for as must as I can and was wondering if I should enable FastCGI or now. Sorry if this is in the wrong place (vs serverfault.com) ...

PHP and Django: Nginx, FastCGI and Green Unicorn?

I'm curious... I'm looking to have a really efficient setup for my slice for a client. I'm not an expert with servers and so am looking for good solid resources to help me set this up... It's been recommended to me that using FastCGI for PHP, Green Unicorn (gunicorn) for Django and Nginx for media is a good combination to have PHP and Dj...

How do I save uploaded binary files in a Perl FastCGI program?

My upload function looks like: sub Upload_File{ my ($file, $mime, $description) = @_; my $file_name = param('filename'); my $data; $file = UnTaint($file); if ($mime =~ /text/) { sysopen(VAULT, "$path/$file", O_RDWR | O_EXCL | O_CREAT | O_TEXT) or die "couldn't create $file for R/W: $!\n"; } else { sy...

Settings module not found deploying django on a shared server

I'm trying to deploy my django project on a shared hosting as describe here I have my project on /home/user/www/testa I'm using this script #!/usr/bin/python import sys, os sys.path.append("/home/user/bin/python") sys.path.append('/home/user/www/testa') os.chdir("/home/user/www/testa") os.environ['DJANGO_SETTINGS_MODULE'] = "set...

tons of fpm_children_bury() in php-fpm.log PHP 5.2.13(PHP-FPM 0.5.13) + Nginx 0.7.65

Hi,all My PHP with FastCGI has some unexpected logs, and works slowly. In php-fpm.log, i find tons of NOTICE, as follows, ... Mar 31 15:26:21.964563 [NOTICE] fpm_children_bury(), line 215: child 59658 (pool default) exited with code 0 after 568.697496 seconds from start Mar 31 15:26:21.966770 [NOTICE] fpm_children_make(), line 352: c...

Apache2 php fastcgi, run for each request.

I've installed php fastcgi for Apache2 by this doc: http://library.linode.com/web-servers/apache/php-cgi/ubuntu-9.10-karmic Pages is opening fine. But I don't understand why I can't see php5-cgi process [ > top ] Looks like apache run php5-cgi for each request, but processes should be already run. Could you help me to find the probl...

How do I receive and respond to Ajax requests in Perl?

I have a client-side appliction which submits some data via AJAX POST request (request.open("POST", url, flag)) to my Perl CGI script. How do I retrieve this data with Perl and return some other data (AJAX response)? ...

mod_wsgi daemon mode vs threaded fastcgi

Can someone explain the difference between apache mod_wsgi in daemon mode and django fastcgi in threaded mode. They both use threads for concurrency I think. Supposing that I'm using nginx as front end to apache mod_wsgi. UPDATE: I'm comparing django built in fastcgi(./manage.py method=threaded maxchildren=15) and mod_wsgi in 'daemon' ...