Welcome! Log In Create A New Profile

Advanced

How to make some pool options global?

Posted by Ismet Togay 
Ismet Togay
How to make some pool options global?
April 06, 2010 09:16AM
Hi all,

Thanks to Jerome, I got php5-fpm worked! As I understand, one has to
define pool sections as many as the virtual hosts. Since there are
many options for pool, we have to copy whole pool section block for
each vhost. I want to make many of those options global for any pool
so that I don't have to unnecessarily copy & paste the options I don't
need.

To do this, I put any "pool" section options(except the following)
into the "global_options" section:
<value name="name">domainA</value>
<value name="listen_address">ip:port</value>
<value name="user">userA</value>
<value name="group">groupA</value>

However, it didn't work. When I try to start php-fpm I get the
following errors:
Starting php5-fpm
Warning, unknown setting 'listen_options' in section '/configuration/
global_options'
Warning, unknown setting 'php_defines' in section '/configuration/
global_options'
Warning, unknown setting 'pm' in section '/configuration/
global_options'
Warning, unknown setting 'request_terminate_timeout' in section '/
configuration/global_options'
Warning, unknown setting 'request_slowlog_timeout' in section '/
configuration/global_options'
Warning, unknown setting 'slowlog' in section '/configuration/
global_options'
Warning, unknown setting 'rlimit_files' in section '/configuration/
global_options'
Warning, unknown setting 'rlimit_core' in section '/configuration/
global_options'
Warning, unknown setting 'catch_workers_output' in section '/
configuration/global_options'
Warning, unknown setting 'max_requests' in section '/configuration/
global_options'
Warning, unknown setting 'allowed_clients' in section '/configuration/
global_options'
Warning, unknown setting 'environment' in section '/configuration/
global_options'
done

If there is no way to make them global, then I will have a too big
php5-fpm.conf file since I need to define lots of virtual hosts. It
really makes it hard to maintain and modify the configuration file.
Any suggestions?

My next question is that there is a way to define pool sections in
different files?

Best,
ismet


--
To unsubscribe, reply using "remove me" as the subject.
Re: How to make some pool options global?
April 06, 2010 12:04PM
The new format should support includes I believe.. But that will only
be available with PHP core now - starting with PHP 5.4 or whatever the
next sub-major version is (I don't think 5.3.4 is an option) -
assuming the work is done.

On Apr 6, 2010, at 6:06 AM, Ismet Togay <ismet.togay@gmail.com> wrote:

> Hi all,
>
> Thanks to Jerome, I got php5-fpm worked! As I understand, one has to
> define pool sections as many as the virtual hosts. Since there are
> many options for pool, we have to copy whole pool section block for
> each vhost. I want to make many of those options global for any pool
> so that I don't have to unnecessarily copy & paste the options I don't
> need.
>
> To do this, I put any "pool" section options(except the following)
> into the "global_options" section:
> <value name="name">domainA</value>
> <value name="listen_address">ip:port</value>
> <value name="user">userA</value>
> <value name="group">groupA</value>
>
> However, it didn't work. When I try to start php-fpm I get the
> following errors:
> Starting php5-fpm
> Warning, unknown setting 'listen_options' in section '/configuration/
> global_options'
> Warning, unknown setting 'php_defines' in section '/configuration/
> global_options'
> Warning, unknown setting 'pm' in section '/configuration/
> global_options'
> Warning, unknown setting 'request_terminate_timeout' in section '/
> configuration/global_options'
> Warning, unknown setting 'request_slowlog_timeout' in section '/
> configuration/global_options'
> Warning, unknown setting 'slowlog' in section '/configuration/
> global_options'
> Warning, unknown setting 'rlimit_files' in section '/configuration/
> global_options'
> Warning, unknown setting 'rlimit_core' in section '/configuration/
> global_options'
> Warning, unknown setting 'catch_workers_output' in section '/
> configuration/global_options'
> Warning, unknown setting 'max_requests' in section '/configuration/
> global_options'
> Warning, unknown setting 'allowed_clients' in section '/configuration/
> global_options'
> Warning, unknown setting 'environment' in section '/configuration/
> global_options'
> done
>
> If there is no way to make them global, then I will have a too big
> php5-fpm.conf file since I need to define lots of virtual hosts. It
> really makes it hard to maintain and modify the configuration file.
> Any suggestions?
>
> My next question is that there is a way to define pool sections in
> different files?
>
> Best,
> ismet
>
>
> --
> To unsubscribe, reply using "remove me" as the subject.
Jérôme Loyet
Re: How to make some pool options global?
April 06, 2010 12:30PM
2010/4/6 Ismet Togay <ismet.togay@gmail.com>:
> Hi all,
>
> Thanks to Jerome, I got php5-fpm worked! As I understand, one has to
> define pool sections as many as the virtual hosts. Since there are
> many options for pool, we have to copy whole pool section block for
> each vhost. I want to make many of those options global for any pool
> so that I don't have to unnecessarily copy & paste the options I don't
> need.
>
> To do this, I put any "pool" section options(except the following)
> into the "global_options" section:
> <value name="name">domainA</value>
> <value name="listen_address">ip:port</value>
> <value name="user">userA</value>
> <value name="group">groupA</value>
>
> However, it didn't work. When I try to start php-fpm I get the
> following errors:
> Starting php5-fpm
> Warning, unknown setting 'listen_options' in section '/configuration/
> global_options'
> Warning, unknown setting 'php_defines' in section '/configuration/
> global_options'
> Warning, unknown setting 'pm' in section '/configuration/
> global_options'
> Warning, unknown setting 'request_terminate_timeout' in section '/
> configuration/global_options'
> Warning, unknown setting 'request_slowlog_timeout' in section '/
> configuration/global_options'
> Warning, unknown setting 'slowlog' in section '/configuration/
> global_options'
> Warning, unknown setting 'rlimit_files' in section '/configuration/
> global_options'
> Warning, unknown setting 'rlimit_core' in section '/configuration/
> global_options'
> Warning, unknown setting 'catch_workers_output' in section '/
> configuration/global_options'
> Warning, unknown setting 'max_requests' in section '/configuration/
> global_options'
> Warning, unknown setting 'allowed_clients' in section '/configuration/
> global_options'
> Warning, unknown setting 'environment' in section '/configuration/
> global_options'
> done
>
> If there is no way to make them global, then I will have a too big
> php5-fpm.conf file since I need to define lots of virtual hosts. It
> really makes it hard to maintain and modify the configuration file.
> Any suggestions?

it's in the todo list. I totaly agree with you on this :)

I don't when it'll be done, it's just a matter of time

>
> My next question is that there is a way to define pool sections in
> different files?
>
> Best,
> ismet
>
>
> --
> To unsubscribe, reply using "remove me" as the subject.
>
Re: How to make some pool options global?
April 06, 2010 12:50PM
2010/4/6 Jérôme Loyet <ml@fatbsd.com>:

>> If there is no way to make them global, then I will have a too big
>> php5-fpm.conf file since I need to define lots of virtual hosts. It
>> really makes it hard to maintain and modify the configuration file.
>> Any suggestions?
>
> it's in the todo list. I totaly agree with you on this :)
>
> I don't when it'll be done, it's just a matter of time

If you got includes going wouldn't this be taken care of?


--
To unsubscribe, reply using "remove me" as the subject.
Jérôme Loyet
Re: How to make some pool options global?
April 06, 2010 12:54PM
2010/4/6 Michael Shadle <mike503@gmail.com>:
> 2010/4/6 Jérôme Loyet <ml@fatbsd.com>:
>
>>> If there is no way to make them global, then I will have a too big
>>> php5-fpm.conf file since I need to define lots of virtual hosts. It
>>> really makes it hard to maintain and modify the configuration file.
>>> Any suggestions?
>>
>> it's in the todo list. I totaly agree with you on this :)
>>
>> I don't when it'll be done, it's just a matter of time
>
> If you got includes going wouldn't this be taken care of?
>

it's another (cleaner ?) way to do it. From my mind: you use includes
to separates pools and use reference templates to make default
directives. But I agree that includes can take care of both.

Anyway, if both are made, will it be a problem ?

++ Jerome


--
To unsubscribe, reply using "remove me" as the subject.
Re: How to make some pool options global?
April 06, 2010 12:58PM
2010/4/6 Jérôme Loyet <ml@fatbsd.com>:
> it's another (cleaner ?) way to do it. From my mind: you use includes
> to separates pools and use reference templates to make default
> directives. But I agree that includes can take care of both.
>
> Anyway, if both are made, will it be a problem  ?

The only problem would be the possibility of end user confusion. Think
of how nginx does it for example - there isn't really a global
section, you just use includes.

Includes work fine and allows for infinite types of re-use.

Global options are neat, but could possibly wind up with confusion, or
a mix and match of both. I'd be fine with both but I definitely think
includes -need- to be there. That does solve the problem, just not
maybe as graceful as some users expect.


--
To unsubscribe, reply using "remove me" as the subject.
Dayo
Re: How to make some pool options global?
April 22, 2010 12:44PM
Main thing needed is to allow individual pools to be read in similar
to how most use Nginx. i.e include /somefolder/*.pool.
Not so hot on confusing global options.


--
Subscription settings: http://groups.google.com/group/highload-php-en/subscribe?hl=en
Re: How to make some pool options global?
April 22, 2010 12:48PM
In the new php core version ("svn" ... for 5.3+ only) Jerome just
created a patch that he is committing soon for include support.

On Apr 22, 2010, at 5:19 AM, Dayo <dakanji@gmail.com> wrote:

> Main thing needed is to allow individual pools to be read in similar
> to how most use Nginx. i.e include /somefolder/*.pool.
> Not so hot on confusing global options.
>
>
> --
> Subscription settings: http://groups.google.com/group/highload-php-en/subscribe?hl=en
Jérôme Loyet
Re: How to make some pool options global?
April 22, 2010 01:06PM
2010/4/22 Michael Shadle <mike503@gmail.com>:
> In the new php core version ("svn" ... for 5.3+ only) Jerome just created a
> patch that he is committing soon for include support.

it's been comitted few hours back ago ...

>
> On Apr 22, 2010, at 5:19 AM, Dayo <dakanji@gmail.com> wrote:
>
>> Main thing needed is to allow individual pools to be read in similar
>> to how most use Nginx. i.e include /somefolder/*.pool.
>> Not so hot on confusing global options.
>>
>>
>> --
>> Subscription settings:
>> http://groups.google.com/group/highload-php-en/subscribe?hl=en
>
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 125
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready