473,388 Members | 1,327 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

what is the pid when running php in FASTCGI server mode

I have replaced apache with nginx and now run php in FASTCGI server
mode like this:

PHP_FCGI_CHILDREN=6 php -b 127.0.0.1:9086 -c /my/php/ini/path

nginx reverse proxies to php and this works great!

Now I want to monitor the php processes using monit but it requires a
pid file. Here's the question. How do I generate these pid files? I
would like them to be /var/run and be in the form of:

php.9086.pid
where the number is the port the php process is bound to.

Thank you for any insight into this problem.

ebeard.

Oct 5 '07 #1
3 1620

"ebeard" <ec*******@gmail.comwrote in message
news:11**********************@o3g2000hsb.googlegro ups.com...
>I have replaced apache with nginx and now run php in FASTCGI server
mode like this:

PHP_FCGI_CHILDREN=6 php -b 127.0.0.1:9086 -c /my/php/ini/path

nginx reverse proxies to php and this works great!

Now I want to monitor the php processes using monit but it requires a
pid file. Here's the question. How do I generate these pid files? I
would like them to be /var/run and be in the form of:

php.9086.pid
where the number is the port the php process is bound to.
the webserver is 'bound' to a port. php is a deferred application spun off
of the webserver.
Oct 5 '07 #2
On Oct 5, 5:28 pm, "Steve" <no....@example.comwrote:
"ebeard" <ecbear...@gmail.comwrote in message

news:11**********************@o3g2000hsb.googlegro ups.com...
I have replaced apache with nginx and now run php in FASTCGI server
mode like this:
PHP_FCGI_CHILDREN=6 php -b 127.0.0.1:9086 -c /my/php/ini/path
nginx reverse proxies to php and this works great!
Now I want to monitor the php processes using monit but it requires a
pid file. Here's the question. How do I generate these pid files? I
would like them to be /var/run and be in the form of:
php.9086.pid
where the number is the port the php process is bound to.

the webserver is 'bound' to a port. php is a deferred application spun off
of the webserver.
in this case it is not bound to the webserver. php is started up
separately and the server, nginx, reverse proxies to the php process
running.
Oct 5 '07 #3
On 5 Oct, 23:18, ebeard <ecbear...@gmail.comwrote:
On Oct 5, 5:28 pm, "Steve" <no....@example.comwrote:
"ebeard" <ecbear...@gmail.comwrote in message
news:11**********************@o3g2000hsb.googlegro ups.com...
>I have replaced apache with nginx and now run php in FASTCGI server
mode like this:
PHP_FCGI_CHILDREN=6 php -b 127.0.0.1:9086 -c /my/php/ini/path
nginx reverse proxies to php and this works great!
Now I want to monitor the php processes using monit but it requires a
pid file. Here's the question. How do I generate these pid files? I
would like them to be /var/run and be in the form of:
php.9086.pid
where the number is the port the php process is bound to.
the webserver is 'bound' to a port. php is a deferred application spun off
of the webserver.

in this case it is not bound to the webserver. php is started up
separately and the server, nginx, reverse proxies to the php process
running.
There's nothing to stop you dropping the file from PHP - but this will
only occur when PHP is servicing a request, therefore not suitable for
your purposes. Also, you'd need to determine if PHP maintains the same
processes after starting in fast CGI mode - AFAIK thats not a
requirement.

I suggest you find a different way to solve the problem not using
monit.

C.

Oct 7 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: walterbyrd | last post by:
I understand that Python has them, but PHP doesn't. I think that is because mod_php is built into apache, but mod_python is not usually in apache. If mod_python was built into apache, would...
4
by: turnstyle | last post by:
Hi all, I seem to be having some weird problems with PHP on IIS7, and now I wonder -- is anybody here running PHP on IIS7? Thanks! -Scott
3
by: Gilles Ganault | last post by:
Hello I just read this article on running web apps in SCGI, and was wondering... - if it's possible to run PHP apps this way: I only know of running them in plain CGI mode (ie. the interpreter...
1
by: Ivan Voras | last post by:
Hi, Is there a straightforward way to convert an XML-RPC server application (written for SimpleXMLRPCServer) to use WSGI so that it can be used as s fastcgi server? By "straightforward" I mean...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.