Browsing articles tagged with "phpfpm - Admins Goodies"
May 11, 2013
tom

How do you restart php-fpm?

I need to reload my php.ini and there’s nothing in the help dialog about restarting it. Asked by Galen Assuming you have the appropriate RC scripts in place, /etc/init.d/php-fpm restart or restart php-fpm or service php-fpm restart or service php5-fpm restart Or whatever the equivalent is on your system. Edited to include suggestion from Matt Winckler. Answered by tylerl Check more discussion of this question. Bookmark on Delicious Digg this post Recommend on Facebook share […]

Continue Reading »
Jan 20, 2013
tom

cannot restart php5-fpm

I’ve made some changes in the .ini files and wanted to restart php5-fpm. /etc/init.d/php5-fpm restart Jan 20 14:25:48.171577 [ERROR] bind() for address ‘/var/lib/php5-fpm/apps.sock’ failed: Address already in use (98) How can I find out what is using this address? I’ve already stopped nginx but that didn’t change anything. Asked by 32bitfloat You can use lsof lsof /var/lib/php5-fpm/apps.sock The output is lines containing the information COMMAND, PID, USER, FD, TYPE, DEVICE, SIZE/OFF, NODE, NAME e.g. lsof […]

Continue Reading »
Jan 15, 2013
tom

Cannot execute PHP file from domain name

Server run on Amazon Linux AMI** (similary to redhat) I follow the installation from Install PHP-FPM, Nginx, & MySQL on EC2 with Amazon Linux AMI It’s work properly if I call directly from server IP address like 174.129.213.152/index.php and I can access other file from my domain correctly like http://gamebiz.asia/robots.txt The problem is when I call php file http://gamebiz.asia or http://gamebiz.asia/index.php their result in blank page. I try change configuration from fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock; to fastcgi_pass […]

Continue Reading »
Jan 3, 2013
tom

How to automatically resume php-fpm?

I am using nginx+php-fpm on Debian Squeeze for a busy server and have had great difficulty to deal with maximum connections being reached. Here the problem is that php processes sometimes just die randomly under high load and leave the server with no php process. Then I need to manually restart php5-fpm service to bring back the server to life. I am wondering how to avoid this to happen, or at least treat the symptoms […]

Continue Reading »
Dec 26, 2012
tom

php5-fpm configuration pm – (node) Process manager settings nodes in more layman terms

I have the following configuration for php-fpm [www] listen = 127.0.0.1:9000 listen.allowed_clients = 127.0.0.1 user = www-data group = www-data pm = dynamic pm.max_children = 50 pm.start_servers = 25 pm.min_spare_servers = 5 pm.max_spare_servers = 35 pm.max_requests = 2500 pm.status_path = /php-status I read this http://php-fpm.org/wiki/Configuration_File Would appreciate a more human explanation of the pm related settings. Eg, what is pm = dynamic ? are there other possible settings for pm = ? pm.max_children sets the […]

Continue Reading »
Dec 24, 2012
tom

Samba share not usable by PHP-FPM?

I have a PHP-FPM and nginx setup that has been working perfectly on Ubuntu Desktop 12.04. The webserver’s files are served from a directory called /www, which is set as the root of the server. Initially, /www was mounted as a VMware shared folder (because the Ubuntu Desktop is running as a guest os). However, due to performance issues with shared folders (seeing a 2 second delay!), I am testing out samba shares. I have […]

Continue Reading »
Dec 20, 2012
tom

nginx and php-fpm – Cannot write PHP error log

I am using Nginx and PHP-FPM on Linux. I am not sure whether the issue is that PHP is not writing to the location specified in the PHP.ini, or if it just isn’t working at all. Some of the logs produced by Nginx and PHP-FPM contain the PHP errors, but they are mixed in with other Nginx log output. When I run phpInfo(), value in the error_log is set to a folder in my home […]

Continue Reading »
Dec 20, 2012
tom

PHP-FPM does not automatically start after reboot

I’m running PHP-FPM and Nginx, occasionally, for whatever reason, I have to reboot the server. Once the server is running again, the nginx service automatically starts, however, PHP-FPM does not. This can be seen when I run the command sudo /etc/init.d/php-fpm restart immediately after a reboot and get the result: $ sudo /etc/init.d/php-fpm restart Stopping php-fpm: [FAILED] Starting php-fpm: [ OK ] Is this expected behaviour? What is the best way to make PHP-FPM automatically […]

Continue Reading »
Oct 23, 2012
tom

how exactly does nginx/php-fpm process requests?

I’m currently testing a new nginx/php-fpm I have setup on a new VPS with 4GB of RAM: from my php-fpm process pool config: pm = static pm.max_children = 10 I have a simple load.php script which has the following simulate a long running mysql query: <?php echo sleep(5); echo “you see me after 5 seconds”; ?> I then throw some load at this script as follows: ab -n 1000 -c 100 http://mydomain.com/load.php When I tail […]

Continue Reading »
Oct 21, 2012
tom

Set global handling for PHP scripts in NGINX + PHP-FPM

I have to define fastcgi_pass for every virtual host. How do I define it global-wise? server { listen 80; server_name www.domain.tld; location / { root /home/user/www.domain.tld; index index.html index.php; } location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /home/user/domain.tld$fastcgi_script_name; include fastcgi_params; }} Asked by Radio Make a file that you can include wherever you need it. For instance: cat > /etc/nginx/php-fpm <<EOF fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; EOF Then […]

Continue Reading »
Pages:123456789»