Quantcast
Channel: Nginx Forum - Php-fpm Mailing List - English
Viewing all 219 articles
Browse latest View live

PHP-FPM dynamic variable environment unknow (4 replies)

$
0
0
Greetings,

I have installed the latest version of PHP-FPM, Apache and mod_fastcgi.

All is working, except the ENV arn't GLOBAL.
I can get the IP of the visitor with $_SERVER['REMOTE_ADDR'] from a script
PHP, but i can't use this information from my mail wrapper sendmail.pl
wrote in Perl.

Before to use PHP-FPM / FastCGI, i had suphp and all were correct, even
inside my wrapper sendmail.pl in Perl.

When i check my phpinfo(), "Environment" is mostly empty, i have only USER
and HOME.

I know i can fill this part with php-fpm.conf with this :
env[MY_ENV_VAR_1] = 'value1'

and it's working, this variable is global. But how can i set REMOTE_ADDR
which is a dynamic value with the visitor ?

I have tried this :
env[REMOTE_ADDR] = $REMOTE_ADDR

but the variable $REMOTE_ADDR is empty, even if $_SERVER["REMOTE_ADDR"] is
still here, but not in GLOBAL.

I have tried this :
env[REMOTE_ADDR] = $_SERVER["REMOTE_ADDR"]

And $REMOTE_ADDR is still empty.

I have tried again this :
env[REMOTE_ADDR] = $_SERVER["REMOTE-ADDR"]

And $REMOTE_ADDR is always empty, even if $_SERVER["REMOTE_ADDR"] is still
here.

Do you have an idea please ?

--

---
You received this message because you are subscribed to the Google Groups "highload-php-en" group.
To unsubscribe from this group and stop receiving emails from it, send an email to highload-php-en+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

file not found..... (no replies)

$
0
0
Hello,

I installed a joomla on a httpd in /var/www/html and that worked well. I tried to switch to nginx / php-fpm.
When I try mydomain.fr/index.html I've a nginx standard page. When I try the mydomain.fr/index.php I get the "No input file specified." message.

In the nginx logs, I get following:
2013/11/07 23:11:12 [error] 29996#0: *58 FastCGI sent in stderr: "Unable to open primary script: /var/www/html/index.php (No such file or directory)" while reading response header from upstream, client: 88.173.xxx.xxx, server: e-lang.fr, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "mydomain.fr".

I've nothing in the php-fpm logs. The path that generated is good. Php is ran with apache user that has r/x rights on all file hierarchy. Nginx user has also same rights.

Some people of Nginx irc said me that was a "php" problem, but since I've no message and I don't no well any of theses systems, I do not find solution on the net.

Can you help me please ?

What information do you need to better help me ?

Thanks a lot.

Nginx + PHP5-fpm doesn't complete the processing (no replies)

$
0
0
I'm trying to convert from Apache to Nginx, and it's not going too bad. However, there is a problem that I've encountered with our API, which outputs quite a lot of stuff and can take up to 1 second when regenerating the cache. It seems to work ok from time to time, but most of the time the output is truncated to 24296 characters, consistently.

I've tried this script:


<?php

$str = '';
while(strlen($str)<524297){
$str .= strlen($str).'<br />';
}

echo $str;


which outputs the following:

0<br />7<br />14<br />22<br />30<br /> [...etc...] />102284<br />102296<br />1023

A total of 102313 characters, every time. This indicates it could be a memory issue, so I did this instead:


$str = '';
while(strlen($str)<524297){
$str .= memory_get_usage().'<br />';
}

echo $str;


Which gets up to

772616
7726

.. even though php.ini says memory_limit=512M

I wonder if it's a time limit, so I do this instead:


$start = microtime(true);
while(strlen($str)<524297){
$str .= (microtime(true)-$start).'<br />';
}

echo $str;


0.0083520412445068
0.0083539485931396
0.008357048034668

( total of 89793 characters)



The thing I really don't understand, is why, if the string length has not exceeded 524297 characters, does it quit looping and start printing?

Pretty confident that solving this is the only thing holding us back from testing.

Thanks!

Re: php-fpm segfaults and general protection (no replies)

$
0
0
On 11/19/2013 05:38 PM, Radoslav Stefanov wrote:
> Does anyone have any clues what could cause them or how to trace this? It seems there is no impact on user experience, no 500 errors or anything, but I would like to know what is happening.

Sure, see here: https://bugs.php.net/bugs-generating-backtrace.php

--
Wbr,
Antony Dovgal
---
http://pinba.org - realtime profiling for PHP

--

---
You received this message because you are subscribed to the Google Groups "highload-php-en" group.
To unsubscribe from this group and stop receiving emails from it, send an email to highload-php-en+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Re: php-fpm segfaults and general protection (no replies)

$
0
0
Hi,

What is the kernel version?

Have you verified the memories w/ e.g. Memtest?

How busy are these web servers? Is it related to high load or only a few visits cause this?

Regards,

> On 19.11.2013, at 15:38, Radoslav Stefanov <rsarzhar@gmail.com> wrote:
>
> Hello,
>
> I have a few busy web servers using nginx with php-fpm and some of them started getting lots of segfaults and general protection errors in dmesg.
>
> PHP 5.4.21
>
>
>> php-cgi[30676]: segfault at 8048 ip 00007f7485e1be9c sp 00007fffe52d4fe0 error 4 in libsqlite3.so.0.8.6[7f7485dff000+8c000]
>> php-cgi[19623]: segfault at 8048 ip 00007fd54550de9c sp 00007fff2725fbb0 error 4 in libsqlite3.so.0.8.6[7fd5454f1000+8c000]
>> php-cgi[22296]: segfault at 8048 ip 00007f5d643fee9c sp 00007fff5d72f260 error 4 in libsqlite3.so.0.8.6[7f5d643e2000+8c000]
>> php-cgi[23506]: segfault at 8048 ip 00007f08bfd8de9c sp 00007fff09ed7690 error 4 in libsqlite3.so.0.8.6[7f08bfd71000+8c000]
>> php-cgi[24017]: segfault at 8048 ip 00007fde002c4e9c sp 00007fff4465ffa0 error 4 in libsqlite3.so.0.8.6[7fde002a8000+8c000]
>> php-cgi[30035]: segfault at 8048 ip 00007f8932f85e9c sp 00007fff9d9344e0 error 4 in libsqlite3.so.0.8.6[7f8932f69000+8c000]
>> php-cgi[30808]: segfault at 8048 ip 00007f73886c1e9c sp 00007fffa6b795d0 error 4 in libsqlite3.so.0.8.6[7f73886a5000+8c000]
>> php-cgi[31574]: segfault at 8048 ip 00007f8fe9186e9c sp 00007fffb61c78d0 error 4 in libsqlite3.so.0.8.6[7f8fe916a000+8c000]
>> php-cgi[10575]: segfault at 8048 ip 00007f39df86de9c sp 00007fff26905fc0 error 4 in libsqlite3.so.0.8.6[7f39df851000+8c000]
>> php-cgi[15197]: segfault at 8048 ip 00007f9dbb032e9c sp 00007fff18759340 error 4 in libsqlite3.so.0.8.6[7f9dbb016000+8c000]
>> php-cgi[22091]: segfault at 8048 ip 00007f6b50f8ae9c sp 00007fff275850d0 error 4 in libsqlite3.so.0.8.6[7f6b50f6e000+8c000]
>> php-fpm[31211] general protection ip:5b7629 sp:7fffd7958c20 error:0 in php-fpm[400000+34e000]
>> php-fpm[31210] general protection ip:5b7629 sp:7fffd7958c20 error:0 in php-fpm[400000+34e000]
>> php-fpm[31208] general protection ip:5b7629 sp:7fffd7958c20 error:0 in php-fpm[400000+34e000]
>> php-fpm[31499] general protection ip:5b7629 sp:7fffd7958c20 error:0 in php-fpm[400000+34e000]
>> php-fpm[31707] general protection ip:5b7629 sp:7fffd7958c20 error:0 in php-fpm[400000+34e000]
>> php-fpm[6416] general protection ip:5b7629 sp:7fff153e1220 error:0 in php-fpm[400000+34e000]
>> php-fpm[7935] general protection ip:5b7629 sp:7fffb10a3fe0 error:0 in php-fpm[400000+34e000]
>> php-fpm[8175] general protection ip:5b7629 sp:7fffb10a3fe0 error:0 in php-fpm[400000+34e000]
>> php-fpm[7932] general protection ip:5b7629 sp:7fffb10a3fe0 error:0 in php-fpm[400000+34e000]
>> php-fpm[10711] general protection ip:5b7629 sp:7fffb10a3fe0 error:0 in php-fpm[400000+34e000]
>> php-fpm[11425] general protection ip:5b7629 sp:7fffb10a3fe0 error:0 in php-fpm[400000+34e000]
>> php-fpm[7867]: segfault at 0 ip 00007f47e41da6fd sp 00007fffb109e820 error 6 in apc.so[7f47e41c8000+24000]
>> php-cgi[19350]: segfault at 8048 ip 00007fdb29082e9c sp 00007fff27bb2fc0 error 4 in libsqlite3.so.0.8.6[7fdb29066000+8c000]
>
> Does anyone have any clues what could cause them or how to trace this? It seems there is no impact on user experience, no 500 errors or anything, but I would like to know what is happening.
>
> Thanks
>
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups "highload-php-en" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to highload-php-en+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

--

---
You received this message because you are subscribed to the Google Groups "highload-php-en" group.
To unsubscribe from this group and stop receiving emails from it, send an email to highload-php-en+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Re: mod rewrite ? (no replies)

$
0
0
Il giorno 15/nov/2013, alle ore 09:03, kamal Azzi <kamalo114@gmail.com> ha scritto:

> i can't enable mod rewrite in php5-fpm why?

Read nginx log and you’ll find the answer

--

---
You received this message because you are subscribed to the Google Groups "highload-php-en" group.
To unsubscribe from this group and stop receiving emails from it, send an email to highload-php-en+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

php-fpm segfaults and general protection (no replies)

$
0
0
Hello,

I have a few busy web servers using nginx with php-fpm and some of them
started getting lots of segfaults and general protection errors in dmesg.

PHP 5.4.21


php-cgi[30676]: segfault at 8048 ip 00007f7485e1be9c sp 00007fffe52d4fe0
> error 4 in libsqlite3.so.0.8.6[7f7485dff000+8c000]
> php-cgi[19623]: segfault at 8048 ip 00007fd54550de9c sp 00007fff2725fbb0
> error 4 in libsqlite3.so.0.8.6[7fd5454f1000+8c000]
> php-cgi[22296]: segfault at 8048 ip 00007f5d643fee9c sp 00007fff5d72f260
> error 4 in libsqlite3.so.0.8.6[7f5d643e2000+8c000]
> php-cgi[23506]: segfault at 8048 ip 00007f08bfd8de9c sp 00007fff09ed7690
> error 4 in libsqlite3.so.0.8.6[7f08bfd71000+8c000]
> php-cgi[24017]: segfault at 8048 ip 00007fde002c4e9c sp 00007fff4465ffa0
> error 4 in libsqlite3.so.0.8.6[7fde002a8000+8c000]
> php-cgi[30035]: segfault at 8048 ip 00007f8932f85e9c sp 00007fff9d9344e0
> error 4 in libsqlite3.so.0.8.6[7f8932f69000+8c000]
> php-cgi[30808]: segfault at 8048 ip 00007f73886c1e9c sp 00007fffa6b795d0
> error 4 in libsqlite3.so.0.8.6[7f73886a5000+8c000]
> php-cgi[31574]: segfault at 8048 ip 00007f8fe9186e9c sp 00007fffb61c78d0
> error 4 in libsqlite3.so.0.8.6[7f8fe916a000+8c000]
> php-cgi[10575]: segfault at 8048 ip 00007f39df86de9c sp 00007fff26905fc0
> error 4 in libsqlite3.so.0.8.6[7f39df851000+8c000]
> php-cgi[15197]: segfault at 8048 ip 00007f9dbb032e9c sp 00007fff18759340
> error 4 in libsqlite3.so.0.8.6[7f9dbb016000+8c000]
> php-cgi[22091]: segfault at 8048 ip 00007f6b50f8ae9c sp 00007fff275850d0
> error 4 in libsqlite3.so.0.8.6[7f6b50f6e000+8c000]
> php-fpm[31211] general protection ip:5b7629 sp:7fffd7958c20 error:0 in
> php-fpm[400000+34e000]
> php-fpm[31210] general protection ip:5b7629 sp:7fffd7958c20 error:0 in
> php-fpm[400000+34e000]
> php-fpm[31208] general protection ip:5b7629 sp:7fffd7958c20 error:0 in
> php-fpm[400000+34e000]
> php-fpm[31499] general protection ip:5b7629 sp:7fffd7958c20 error:0 in
> php-fpm[400000+34e000]
> php-fpm[31707] general protection ip:5b7629 sp:7fffd7958c20 error:0 in
> php-fpm[400000+34e000]
> php-fpm[6416] general protection ip:5b7629 sp:7fff153e1220 error:0 in
> php-fpm[400000+34e000]
> php-fpm[7935] general protection ip:5b7629 sp:7fffb10a3fe0 error:0 in
> php-fpm[400000+34e000]
> php-fpm[8175] general protection ip:5b7629 sp:7fffb10a3fe0 error:0 in
> php-fpm[400000+34e000]
> php-fpm[7932] general protection ip:5b7629 sp:7fffb10a3fe0 error:0 in
> php-fpm[400000+34e000]
> php-fpm[10711] general protection ip:5b7629 sp:7fffb10a3fe0 error:0 in
> php-fpm[400000+34e000]
> php-fpm[11425] general protection ip:5b7629 sp:7fffb10a3fe0 error:0 in
> php-fpm[400000+34e000]
> php-fpm[7867]: segfault at 0 ip 00007f47e41da6fd sp 00007fffb109e820 error
> 6 in apc.so[7f47e41c8000+24000]
> php-cgi[19350]: segfault at 8048 ip 00007fdb29082e9c sp 00007fff27bb2fc0
> error 4 in libsqlite3.so.0.8.6[7fdb29066000+8c000]
>
>
Does anyone have any clues what could cause them or how to trace this? It
seems there is no impact on user experience, no 500 errors or anything, but
I would like to know what is happening.

Thanks


--

---
You received this message because you are subscribed to the Google Groups "highload-php-en" group.
To unsubscribe from this group and stop receiving emails from it, send an email to highload-php-en+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Re: mod rewrite ? (2 replies)

$
0
0
Il giorno 19/nov/2013, alle ore 12:09, Felipe <linux@portalaces.com> ha scritto:

> Don't worry. We will read your config files and your htaccess file with our crystal ball.

whoa! Where can I buy one?


--

---
You received this message because you are subscribed to the Google Groups "highload-php-en" group.
To unsubscribe from this group and stop receiving emails from it, send an email to highload-php-en+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

[400req/s] php finished executing ,but didn't push output to nginx, (no replies)

$
0
0
my env:
nginx-0.8.45+php-5.3.6(php-fpm)+rhel 5.4

part of nginx conf:
#fastcg config
fastcgi_connect_timeout 5s;
fastcgi_send_timeout 5s;
fastcgi_read_timeout 5s;
fastcgi_buffer_size 4k;
fastcgi_buffers 256 4k;
fastcgi_busy_buffers_size 8k;
fastcgi_temp_file_write_size 16k;
fastcgi_intercept_errors on;
proxy_ignore_client_abort on;
php-fpm config:

pm = dynamic
pm.max_children = 300
pm.min_spare_servers = 25
pm.max_requests = 500
listen = 127.0.0.1:9000

rlimit_files = 102400
request_slowlog_timeout =1s
request_terminate_timeout = 5s
pm.status_path = /php_status


my server will serv 400req/s at peak. i found at that time ,php finished
process the request,but didn't push the output to the nginx
immediately(about 10 seconds,nginx got nothing from upstream(the php-fpm
)), it cause the client abort the request and make nginx responds with 499
error. the server seems at a fine load,enough ram,enough cpu,io is not high.
anyone has this situation?

--

---
You received this message because you are subscribed to the Google Groups "highload-php-en" group.
To unsubscribe from this group and stop receiving emails from it, send an email to highload-php-en+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

mod rewrite ? (1 reply)

$
0
0
i can't enable mod rewrite in php5-fpm why?

--

---
You received this message because you are subscribed to the Google Groups "highload-php-en" group.
To unsubscribe from this group and stop receiving emails from it, send an email to highload-php-en+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Nginx fails to connect to PHP-FPM at 1400-1500 rps (no replies)

$
0
0
Hello!

I have PHP-FPM 5.4.4 running on Debian 7 and Nginx 1.4.1.
At ~1500rps PHP fails to accept new connections, there are lot of
connection in state SYN_SENT or SYN_RECV to tcp port of PHP. In 'normal'
conditions there are only few (or zero) such connection.

Here is my modification over default Debian's sysctl settings:

net.core.rmem_default=16777216
net.core.netdev_max_backlog=262144
net.core.somaxconn=262144

net.ipv4.tcp_syncookies=1
net.ipv4.tcp_max_orphans=262144
net.ipv4.tcp_max_syn_backlog=262144
net.ipv4.ip_local_port_range=1024 65535
net.ipv4.tcp_tw_reuse=1

Here is what I see in 'strace' of PHP worker process during problem period:

23:50:29.413415 write(67, "\1\6\0\1\3k\5\0X-Powered-By:
PHP/5.4.4-14+deb7u5\r\nAccept-Charset: UTF-8\r\nSet-Cookie:
_session=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT;
path=/\r\nSet-Cookie: _id=230486417; expires=Wed, 19-Nov-2014 19:50:29 GMT;
path=/\r\nExpires: Mon, 26 Jul 1997 05:00:00 GMT"..., 904) = 904
23:50:29.413486 shutdown(67, 1 /* send */) = 0
23:50:29.413530 recvfrom(67, "\1\5\0\1\0\0\0\0", 8, 0, NULL, NULL) = 8
23:50:29.413575 recvfrom(67, "", 8, 0, NULL, NULL) = 0
23:50:29.413681 close(67) = 0
23:50:29.413791 setitimer(ITIMER_PROF, {it_interval={0, 0}, it_value={0,
0}}, NULL) = 0
23:50:29.413848 accept(0, {sa_family=AF_INET, sin_port=htons(48538),
sin_addr=inet_addr("192.168.1.2")}, [16]) = 67
23:50:29.413897 time(NULL) = 1384890629
23:50:29.413932 times({tms_utime=230, tms_stime=102, tms_cutime=0,
tms_cstime=0}) = 1780793347
23:50:29.413992 poll([{fd=67, events=POLLIN}], 1, 5000) = 0 (Timeout)
23:50:34.418253 close(67) = 0
23:50:34.418319 accept(0, {sa_family=AF_INET, sin_port=htons(44562),
sin_addr=inet_addr("192.168.1.2")}, [16]) = 67
23:50:34.418389 time(NULL) = 1384890634
23:50:34.418420 times({tms_utime=230, tms_stime=102, tms_cutime=0,
tms_cstime=0}) = 1780793847
23:50:34.418472 poll([{fd=67, events=POLLIN}], 1, 5000) = 1 ([{fd=67,
revents=POLLIN}])
23:50:34.418525 read(67, "\1\1\0\1\0\10\0\0", 8) = 8


Please, note poll() timeout at 23:50:29.413992

So it look like under some conditions PHP either Linux kernel fails to work
correctly with new TCP connections, which are hangs in SYN_RECV or SYN_SENT
state, while PHP fails to get new connection descriptir to perform accept().

I have rlimit_files=128000 both for master process and pool workers, pm is
static, backlog=512.


--

---
You received this message because you are subscribed to the Google Groups "highload-php-en" group.
To unsubscribe from this group and stop receiving emails from it, send an email to highload-php-en+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Understanding the slow log stack trace (2 replies)

$
0
0
Hi,

I'm trying to make sense of the stack trace of PHP-FPM's slow log feature.
But I'm not sure how I should interpret it.

I notice that some of the stack traces in my log start (or actually end,
since the ordering is most recent on top) with a __construct() call, this
confuses me. What does the top item in the list represent?

A) Is it: That specific call took longer than the configured time limit,
the stack simply shows all calls before it
B) Or is it: The entire stack exceeded the time limit, due to the sum of
that call including all previous. The top most call is simply the one going
over the threshold. There might be calls after it, but those are not shown
C) Or is it: This is the entire stack of the request, that in total took
longer than the configured time, no calls came after it.

Stack trace gist: https://gist.github.com/Dynom/156e5fa1217ce527dd39


Thanks for reading.

--

---
You received this message because you are subscribed to the Google Groups "highload-php-en" group.
To unsubscribe from this group and stop receiving emails from it, send an email to highload-php-en+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Can't make Nginx 1.5.7 to work with PHP5-FPM (no replies)

$
0
0
Hello all,

I've installed the last Nginx mainline 5.1.7 on a fresh install of Ubuntu 12.04.3 LTS 64 running PHP5-FPM 5.5.6-1.

My simple problem is that I can't make Nginx to work with PHP5-FPM.

Any request to a PHP file results in a Not found message.

Below are my settings:

etc/nginx/nginx.conf

user nginx;
worker_process 8;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 8192;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log off;
sendfile on;
tcp_nopush on;
keepalive_timeout 64;
gzip on;
gzip_min_length 500;
include /etc/nginx/conf.d/*.conf;
}

etc/ngin/conf.d/default.conf

server {
listen 80;
server_name localhost;
access_log off;
location / {
root /var/www;
index index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /var/www;
}
location ~ \.php$ {
root html
fastcgi_pass 127.0.0.1:9000;
# fastcgi_pass /var/run/php5-fpm.sock;
fastcgi_index index.pp;
fastcgi_parms SCRIPT_FILENAME /scripts$fastcgi_script_name;
include fastcgi_params;
}
}

/etc/php5/fpm/php-fpm.conf

[global]
pid = /var/run/php5-fpm.pid
error_log = /var/log/php5-fpm.log
include=/etc/php5/fpm/pool.d/*.conf

/etc/ph5/fpm/pool.d/www.conf

[www]
user = www-data
group = www-data
listen = 127.0.0.1:9000
; listen = /var/run/php5-fpm.sock
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
chdir = /

Now, whenever I change the listen directive to /var/run/php5-fpm.sock in both /etc/nginx/conf.d/default.conf and /etc/php5/fpm/pool.d/www.conf does not change the problem.

Any help and advice would be truly appreciated since I'm sure I'm wrong somewhere.

TIA.

Offloading PHP-FPM to multiple servers (4 replies)

$
0
0
Hello,

I have a web server that is being overloaded with PHP-FPM requests which is
killing my CPU. I am looking to offload PHP-FPM processing onto multiple
servers with lots of CPU cores. Can someone tell me what all is required
to make this happen, in terms of does the offloading FPM servers need to be
able to see the docroot of the web server? I was thinking a NFS share on
the web server would accomplish this as I would mount the NFS on the FPM
offloading servers.

Is there anything else I am missing that would stop me from simply
deploying some FPM processing servers and using ProxyPass to load balance
the requests to the FPM servers? Is this a common thing people do to serve
up large sites?

Thanks,
Cody

--

---
You received this message because you are subscribed to the Google Groups "highload-php-en" group.
To unsubscribe from this group and stop receiving emails from it, send an email to highload-php-en+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Is each php-fpm pool having their own memory pool? (1 reply)

$
0
0
I am using the PHP 5.5 opcode cache, and set

opcache.memory_consumption=128


1. if I have 4 pools in php-fpm, will each of the 4 pool share 128MB of
cache, or will they own 128M opcache for each pool?

2. If these 4 pools share the same PHP codes library (assume 10MB), do I
need 40MB for opcache since I have 4 pool?


Or any place I can find the information?


Thanks.

--

---
You received this message because you are subscribed to the Google Groups "highload-php-en" group.
To unsubscribe from this group and stop receiving emails from it, send an email to highload-php-en+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

cheapest dedicated server (no replies)

$
0
0
We're offer cheapest dedicated server in U.S.A with No setup fees!

We guarantee the lowest price on Dedicated server hosting, you can read more at:

http://PAservers.com/dedicated-servers.php

---------------------------------------------------
Perfect dedicated servers plan for beginners
2.26 GHz
8 CPU Cores
8GB RAM
2x100GB SATA Hard Drive
2TB Bandwidth

$99/monthly
Order Now

---------------------------------------------------
Advanced dedicated servers package
2.13 GHz
12 CPU Cores
32GB RAM
2x1000GB SATA Hard Drive
5TB Bandwidth

$199.99/monthly
Order Now

---------------------------------------------------
Professional dedicated servers plan

2.0 GHz
32 CPU Cores
128GB RAM
4 x 300GB 10K 2.5" SAS HARD DRIVE
10TB Bandwidth

$699/monthly
Order Now
---------------------------------------------------

More Great deals on Dedicate Server. Please see at:

http://PAservers.com/dedicated-servers.php



ADDITIONAL FEATURES Setup Fee Monthly Fee Requirements / Notes
Remote Reboot Port FREE $9.95 Pass Protected Web Interface
Private LAN FREE $5.00 Private Internal Network
(10) IP Address Block FREE $5.00 (10 IP Addresses)
Class C IP Block (254) FREE $100.00 (254 IP Addresses)
Firewall Security Service FREE $49.95
Fully Managed Service FREE $49.95

____________________________


FEDORA, CENTOS, FREEBSD, DEBIAN, UBUNTU, SLACKWARE - FREE

WINDOWS 2008™ SERVER - WEB EDITION - $14.95/MONTH
WINDOWS 2003™ SERVER - WEB EDITION - $14.95/MONTH
WINDOWS 2003™ SERVER - STANDARD EDITION - $24.95/MONTH
WINDOWS 2003™ SERVER - ENTERPRISE EDITION - $34.95/MONTH


CPANEL™ / WEBHOSTMANAGER™ - (FEDORA, FREEBSD, CENTOS)
UNLIMITED DOMAINS LICENSE - $25.00/MONTH
FANTASTICO DE LUXE ADD-ON - $2.95/MONTH

DIRECTADMIN™ - (FEDORA, FREEBSD, CENTOS)
UNLIMITED DOMAINS LICENSE - $9.95/MONTH

PLESK™ - (FEDORA, FREEBSD, CENTOS, WINDOWS)
30 DOMAIN LICENSE - $14.95/MONTH
100 DOMAIN LICENSE - $19.95/MONTH
UNLIMITED DOMAINS LICENSE - $29.95/MONTH
POWER PACK ADD-ON - $14.95/MONTH

SERVERCP™ - (FEDORA, CENTOS)
UNLIMITED DOMAINS LICENSE - $5.00/MONTH

VIRTUOZZO™ (VPS SOFTWARE) - (FEDORA, CENTOS, WINDOWS)
10 VPS LICENSE - $49.95/MONTH
30 VPS LICENSE - $99.95/MONTH
60 VPS LICENSE - $149.95/MONTH
100 VPS LICENSE - $199.95/MONTH

See more at here:


http://paservers.com/dedicated-servers.php


Contact Sales department for any questions and get a special deals today.

http://paservers.com/submitticket.php?step=2&deptid=1

php-fpm crashes with pac module (no replies)

$
0
0
it's really strange, but when I active APC module, my php-fpm core dump… I dunno how ti fix it, any suggest?

I use FreeBSD 9.1 AMD64 with PHP 5.3.27 compiled by ports

--

---
You received this message because you are subscribed to the Google Groups "highload-php-en" group.
To unsubscribe from this group and stop receiving emails from it, send an email to highload-php-en+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

NGINX failed with php5-fpm perm denied (no replies)

$
0
0
Hi Team,

Today i got a very strange error . In my server i have deployed 3 php web application . which are bult using yii ,laravel php and wordpress frameworks . but one my website is loading very slow. when i see error log .. for every one minute 2 errors are logged .. same error repeated for whole day

Here is the error info

22014/01/08 19:50:15 [crit] 7546#0: *35180 open() "/var/lib/nginx/fastcgi/9/28/0000000289" failed (13: Permission denied) while reading upstream, client: 50.112.95.211, server: www.domainname.com, request: "GET / HTTP/1.0", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "www.domainname.com"
2014/01/08 19:50:33 [crit] 7546#0: *35234 open() "/var/lib/nginx/fastcgi/0/29/0000000290" failed (13: Permission denied) while reading upstream, client: 184.73.237.85, server: www.domainname.com, request: "GET / HTTP/1.0", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "www.domainname.com"
2014/01/08 19:52:15 [crit] 7546#0: *35486 open() "/var/lib/nginx/fastcgi/1/29/0000000291" failed (13: Permission denied) while reading upstream, client: 50.112.95.211, server: www.domainname.com, request: "GET / HTTP/1.0", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "www.domainname.com"
2014/01/08 19:52:32 [crit] 7546#0: *35599 open() "/var/lib/nginx/fastcgi/2/29/0000000292" failed (13: Permission denied) while reading upstream, client: 184.73.237.85, server: www.domainname.com, request: "GET / HTTP/1.0", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "www.domainname.com"
2014/01/08 19:54:16 [crit] 7546#0: *36037 open() "/var/lib/nginx/fastcgi/3/29/0000000293" failed (13: Permission denied) while reading upstream, client: 50.112.95.211, server: www.domainname.com, request: "GET / HTTP/1.0", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "www.domainname.com"

Environment:

Server Software: nginx/1.5.6
operating system: Ubuntu 13.04 (Linux 3.8.0-26-generic)
Fastcgi: php-fpm
php version: PHP 5.5.6-1+debphp.org~raring+2 (cli) (built: Nov 21 2013 14:39:09)
mysql 5.5
laravel : 4.0



Here the strange thing is i am not getting any errors for remaining two websites . if this error raised really due to permission problem .. other websites also should report the same error . but they are not reporting anything ...

i even tried this also

sudo chown www-data.www-data /var/lib/nginx

but after this also same error repeated for same website

2014/01/08 20:21:47 [crit] 18283#0: *214 open() "/var/lib/nginx/fastcgi/1/00/0000000001" failed (13: Permission denied) while reading upstream, client: 50.112.95.211, server: www.domainname.com, request: "GET / HTTP/1.0", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "www.domainname.com"
2014/01/08 20:22:04 [crit] 18283#0: *256 open() "/var/lib/nginx/fastcgi/2/00/0000000002" failed (13: Permission denied) while reading upstream, client: 184.73.237.85, server: www.domainname.com, request: "GET / HTTP/1.0", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "www.domainname.com"


my nginx configuration:

root@localhost:/# cat /etc/nginx/nginx.conf
# -*- mode: nginx; mode: flyspell-prog; ispell-local-dictionary: "american" -*-

### Very basic Nginx configuration.
user www-data;
worker_processes 1;


#user www-data; worker_processes 1;
#user nginx; worker_processes 1;


worker_rlimit_nofile 8192;

events {
worker_connections 8000;
multi_accept on;
accept_mutex on;
}

error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;


http {

proxy_connect_timeout 600s;
proxy_send_timeout 600s;
proxy_read_timeout 600s;
fastcgi_send_timeout 600s;
fastcgi_read_timeout 600s;


include /etc/nginx/mime.types;

default_type application/octet-stream;

# Format for our log files
log_format main '$remote_addr - $remote_user [$time_local] $status '
'"$request" $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';

# Click tracking!
access_log /var/log/nginx/access.log main;

# Hide nginx version
server_tokens off;
client_max_body_size 300m;

# ~2 seconds is often enough for HTML/CSS, but connections in
# Nginx are cheap, so generally it's safe to increase it
keepalive_timeout 20;

# You usually want to serve static files with Nginx
sendfile on;

tcp_nopush on; # off may be better for Comet/long-poll stuff
tcp_nodelay off; # on may be better for Comet/long-poll stuff

# Enable Gzip:
gzip on;
gzip_http_version 1.0;
gzip_comp_level 5;
gzip_min_length 512;
gzip_buffers 4 8k;
gzip_proxied any;
gzip_types
# text/html is always compressed by HttpGzipModule
text/css
text/plain
text/x-component
application/javascript
application/json
application/xml
application/xhtml+xml
application/x-font-ttf
application/x-font-opentype
application/vnd.ms-fontobject
image/svg+xml
image/x-icon;

# This should be turned on if you are going to have pre-compressed copies (.gz) of
# static files available. If not it should be left off as it will cause extra I/O
# for the check. It would be better to enable this in a location {} block for
# a specific directory:
# gzip_static on;

gzip_disable "msie6";
gzip_vary on;

include /etc/nginx/sites-enabled/*;
}







my domain configuration :

server {
server_name domainname.com;
rewrite ^(.*) http://www.domainname.com$1 permanent;
}

server {
#listen 80; ## listen for ipv4; this line is default and implied
#listen [::]:80 default_server ipv6only=on; ## listen for ipv6

root /home/winzest/projets/domainname/public/;
index index.php index.html index.htm;

server_name www.domainname.com;

location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ /index.php?$query_string;
}

# pass the PHP scripts to FastCGI server
location ~ \.php$ {
#
# # With php5-cgi alone:
# fastcgi_pass 127.0.0.1:9005;
# # With php5-fpm:
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param PHP_VALUE "newrelic.appname=Greycampu Main site";
}

# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
location ~ /\.ht {
deny all;
}
}



Additional info :

root@localhost:/var/log# ps -ef | grep nginx
root 7545 1 0 16:18 ? 00:00:00 nginx: master process /usr/sbin/nginx
www-data 7546 7545 0 16:18 ? 00:00:28 nginx: worker process
root 17968 17348 0 19:46 pts/1 00:00:00 grep --color=auto nginx


root@localhost:/var/log# ls -l /var/lib/nginx
total 20
drwx------ 2 www-data root 4096 Jan 8 18:48 body
drwx------ 12 www-data root 4096 Sep 19 22:21 fastcgi
drwx------ 2 www-data root 4096 Sep 19 18:14 proxy
drwx------ 2 www-data root 4096 Sep 19 18:14 scgi
drwx------ 2 www-data root 4096 Sep 19 18:14 uwsgi


root@localhost:/var/log# cat /etc/nginx/nginx.conf
# -*- mode: nginx; mode: flyspell-prog; ispell-local-dictionary: "american" -*-

### Very basic Nginx configuration.
user www-data;
worker_processes 1;



root@localhost:/var/log# ls -l /etc/nginx/
total 76
drwxr-xr-x 2 root root 4096 May 28 2013 conf.d
-rw-r--r-- 1 root root 898 Apr 29 2013 fastcgi_params
-rwxr-xr-x 1 root root 2233 Sep 20 12:02 domainname.com
-rw-r--r-- 1 root root 2258 Apr 29 2013 koi-utf
-rw-r--r-- 1 root root 1805 Apr 29 2013 koi-win
-rw-r--r-- 1 root root 2085 Apr 29 2013 mime.types
-rw-r--r-- 1 root root 5287 Apr 29 2013 naxsi_core.rules
-rw-r--r-- 1 root root 287 Apr 29 2013 naxsi.rules
-rw-r--r-- 1 root root 222 Apr 29 2013 naxsi-ui.conf
drwxr-xr-x 7 root root 4096 Sep 19 18:29 nginx-bp
-rw-r--r-- 1 root root 2169 Oct 15 11:54 nginx.conf
-rw-r--r-- 1 root root 131 Apr 29 2013 proxy_params
-rw-r--r-- 1 root root 465 Apr 29 2013 scgi_params
drwxr-xr-x 2 root root 4096 Oct 22 12:18 sites
drwxr-xr-x 2 root root 4096 Sep 19 16:13 sites-available
drwxr-xr-x 2 root root 4096 Jan 8 13:17 sites-enabled
-rw-r--r-- 1 root root 532 Apr 29 2013 uwsgi_params
-rw-r--r-- 1 root root 3071 Apr 29 2013 win-utf




May i know why i am getting this error ? and how to fix this ?

apparmor support for php-fpm (no replies)

$
0
0
Hello,

about half a year ago I wrote an RFC for php for imlementing apparmor
change_hat functionality to php-fpm
(https://wiki.php.net/rfc/fpm_change_hat,
https://github.com/php/php-src/pull/373). It didn't have much support at
the time (only three votes, but all yes). Since php 5.6 alpha should be
released any day and it would be nice to get in, could anybody here help
with getting the pull request pulled?

Cheers,
Gernot Vormayr

--

---
You received this message because you are subscribed to the Google Groups "highload-php-en" group.
To unsubscribe from this group and stop receiving emails from it, send an email to highload-php-en+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Optimal values for process manager (no replies)

$
0
0
Folks,

I have a couple of servers with php5-fpm using up more RAM than I think it
should be. The process manager settings for both servers are below:

pm.max_children = 10

pm.start_servers = 4

pm.min_spare_servers = 2

pm.max_spare_servers = 6

According to the config file, the default value for *pm.start_servers* is *min_spare_servers
+ (max_spare_servers - min_spare_servers) / 2*

But what is the best value for *pm.min_spare_servers* and
*pm.max_spare_servers* on a server with 512 MB of RAM and 1 CPU?

TIA

--

---
You received this message because you are subscribed to the Google Groups "highload-php-en" group.
To unsubscribe from this group and stop receiving emails from it, send an email to highload-php-en+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Viewing all 219 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>