Spawn-fcgi Pidfile

Jun 16, 2007

I have php running as fastcgi for nginx and I'm trying to setup monit to monitor the php process and restart it when it crashes. The problem is that I can't seem to figure out which pidfile I should have monit look at.

Here's part of my script that starts the spawn-fcgi process:

#!/bin/bash
#
# chkconfig: 345 22 82
# description: The php-cgi spawnr

## ABSOLUTE path to the spawn-fcgi binary
SPAWNFCGI="/usr/local/bin/spawn-fcgi"

## ABSOLUTE path to the PHP binary
FCGIPROGRAM="/etc/lighttpd/php/bin/php"

FCGIPID="/var/run/php-fcgi.pid"

## TCP port to which to bind on localhost
FCGIPORT="1026"

## number of PHP children to spawn
PHP_FCGI_CHILDREN=8

## maximum number of requests a single PHP process can serve before it is restarted
PHP_FCGI_MAX_REQUESTS=1500

I added the FCGIPID (saw it in an example), but it doesn't seem to do anything. I tried creating a pid file but the pid in it doesn't get updated when I start/stop the script.

View 1 Replies


ADVERTISEMENT

Apache + Spawn-fcgi

Apr 14, 2008

I`d like to run php per user using spawn-fcgi (I want to user have own pid file for php process). Is it possible to work? I thing that the way is to add something in VirtualHost file for users something like
spawn-fcgi -f /usr/local/php4/bin/php -P /tmp/$user.pid -s /tmp/$user.sock

Is it possible to do?

I`m using DirectAdmin.

View 2 Replies View Related

Tweak Amount Of Php Process Spawn-fcgi

Apr 5, 2009

Where do I find the file to tweak spawn-fcgi process. I look in lighttpd.conf and php.ini I couldn't find any. I use lighttpd.

View 3 Replies View Related

Too Many Open Files: Couldn't Spawn Child Process

Oct 25, 2008

"Too many open files: couldn't spawn child process"


"Too many open files: couldn't spawn child process". This is what I see in the logs.

I have a CGI application which I can't run anymore because it is giving me a 500 Internal Server Error.

Would disabling the logging on all domains solve this issue? (thinking that too many log files are opened)

I did: cat /proc/sys/fs/file-max and in return I got: 372235.

Then I did echo 350000 > /proc/sys/fs/file-max*, because I thought I have file system limitation or something like that.

The problem starts even right after I reboot the server.

If I hit lsof a lot of files are shown.

The server load is tiny so nothing actually happens.

Would editing the httpd.conf or my.cnf files help ? Should I post the prefork and MPM settings here?

What else should I do to have my CGI application running again?

View 12 Replies View Related

How To Turn Off Fcgi

Jun 1, 2009

how to turn off f-cgi?

Its causing big problem at my friend's site, it often leads to 500, 501 and 502 pages, earlier some one mentioned even fcgi could be reason for the error pages as it might show error page if php file takes longer time to load,

so I would like to to turn off fcgi at his site, he uses hypervm-lxadmin, I couldn't find an option when I searched, may be I have missed it, can u guide me through how to solve this issue

and I would like to know if turning off f-cgi will it cause any problem to the site, such as tech, issue to be fixed

View 5 Replies View Related

API - FCGI, Regarding Load

May 18, 2008

I've been using Apache for a long time, switched to fcgi, went to check load and I see that some sites are using like 10-15% of cpu (dual quad harpertown) for a 10 seconds or so. Wordpress blog which is using 700 mb of traffic per month for example.

Is this normal?

I wasn't been able to see that in the past so really din't knew that.

View 2 Replies View Related

Dispatch.fcgi Kept In Cache

May 21, 2007

I have Django (python framework) on a server, and I have a little problem. The application is kept in cache by FastCGI

When you make changes to your application you have to restart it. Touching the file doesn't solve my problem. The only solution I have is renaming the .fcgi file always, and if you use an orifinal file name, it actually works like before, prooving it's kept in cache.

What would you do? A cron job to remove these files maybe?

View 3 Replies View Related

Apache :: How To Benchmark And Configure FCGI

May 23, 2015

how to benchmark and configure FCGI.

View 4 Replies View Related

Plesk 12.x / Linux :: Cache Lost In Fcgi-php-environment

Oct 11, 2014

Tested with my own comilations as well as the Panda-packages:
- zend opcache configured in php 5.5 and 5.6
- php version assigned to test domains

php-info:
- cache active and running

real-life:
- site loads "normally" on initial load
- cache kicks in on reload - perfect
- 15 seconds later: cache is empty

bottom line: when then php-cgi process ends, the cache is killed too.

Why does it happened? How do I keep the cache persistent? Is it due to cgi/fcgi and fpm would solve it?

View 7 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved