Tag Info

New answers tagged

2

The config you're using is pretty thoroughly hardcoded to expect the root of the site to be the only drupal instance - tons of absolute location blocks: https://github.com/perusio/drupal-with-nginx/blob/D7/apps/drupal/drupal.conf Instead of trying to edit all of that, which makes me cringe just thinking about, I recommend that you make each sub-site its own ...


1

With prefork mod_php you are more or less clueless about RAM/CPU usage of different vhosts. Problem is that all apache processes run under same user, and every process serves all vhosts. So one process can serve vhostA in one moment and vhostB in other. To make the matter worse, with each request served, for apache processes with mod_php RAM usage tends to ...


1

From troubleshooting in the comments, I think this is a bug - the headers coming back from mod_proxy_fcgi seem to be unavailable to mod_headers in any way, and are being combined with the data from mod_headers after it processes. For now, if you need this behavior to work correct, maybe look at nginx or lighttpd, or slapping an HAProxy or Varnish instance ...


1

the fine folks at bitnami helped me figure this out: https://community.bitnami.com/t/mysqld-bin-and-php-fpm-eating-up-all-my-cpu-c3-large/27015/4?u=sysadmin Note you have a lot of PHP-FPM processes that they are consuming resources. You have several options: Configure WordPress php-fpm processes to start automatically when needed. You can add this option ...


2

"I've got plenty of memory and CPU for the load" - clearly you don't. Either you make your current workload fit into the available resource or you expand the resource to fit the workload. "Got OpCache running" - tuning PHP is a bit more involved than jus enabling the cache. It's certainly a starting point, but your next step should be to check that you've ...


0

You can try with these; but I'm not sure if those will help with bunch of CLOSE_WAIT's I've used following to help me with bunch of connections in TIME_WAIT state sysctl -w net.ipv4.tcp_tw_reuse=1 sysctl -w net.ipv4.tcp_tw_recycle=1 Check if there is any benefit when you switch fastcgi_pass to use unix socket instead e.g. fastcgi_pass unix:/tmp/php.sock ...


3

The questions is a little bit strange, it's not clear if you're asking only for PHP or your question is more general. I will give you a brief overview from the PHP side. First, the two protocols: CGI scripts is a way how to run a server side script when a HTTP request comes; this has nothing to do with PHP FastCGI is a "better CGI" - CGI is known to be ...


1

As Hrvoje suggested, Wordpres ->Nginx codex gives examples on most of possible situations (http://codex.wordpress.org/Nginx) In your case, the config file should look like below: server { root /usr/share/nginx/www/oliviataussig; index index.php; server_name oliviataussig.com www.oliviataussig.com; location / { try_files $uri $uri/ ...


2

You installed the wrong packages. You've added the upstream nginx repository to your server, but in this repo the nginx package is simply named nginx. There are no other packages to install; those are Debian-specific (and often confusing). To resolve the problem, remove the packages you installed, then install the nginx package. sudo apt-get purge ...


0

Thanks to all the suggestions in the comments. The following worked for me, eventually: sudo dpkg-reconfigure -plow phpmyadmin Choose tcp/ip and NOT socket. Do a full reconfig. Then reboot the server. For reasons I don't understand, simply restarting the usual services (mysql, nginx, php5-fpm) didn't work. I found the suggestion to reboot over at a ...


2

You need to add listen [IP:]80; inside of the server section in your _includes/XXX.conf file.


1

It turns out we were using invalid Memcached keys in certain situations. This was causing Memcached to die without error and the PHP process was staying alive.


2

Since the php5-fpm process runs as the www-data user, updating the user/group ownership of the wp-content/uploads/ directory solved this. sudo chown -R www-data:www-data wp-content/uploads/ Thanks to AD7six for the helpful comment!


-3

Unable to create directory wp-content/uploads/2014/11. Is its parent directory writable by the server? Its mean you need to set your folder to writable, 755 is not writable. Set your 'uploads' folder to 777, and try to upload new media again.


0

I had a somewhat alike issue when using MPM Event on "Apache 2.4.10-1+deb.sury.org~trusty+1". Switching (back, just as in Apache 2.2) to MPM Worker solved it: a2dismod mpm_event && a2enmod mpm_worker && service apache restart Give it a try (when you're using MPM Event in your setup, of course).


1

The magic happens here: try_files $uri $uri/ /index.php?q=$request_uri; This means that nginx checks first if the requested file or directory exists on the filesystem. If a file does not exist, it passes the request to Joomla, and passing the original URI to the q parameter.


0

You just need to add a variable string to fastcgi_cache_key that represents the user ID. Something like: set $user_key 0; if ($cookie_userid != "") { // you set cookie "userid" via your app set $user_key $cookie_userid; } fastcgi_cache_key $user_key$scheme$host$uri$args; This way, all anonymous users will get $user_key = 0, and the rest of your users ...


0

There is no way to monitor multiple php-fpm pools with one status URL, but it also doesn't make sense to do that. The only reason for creating more php-fpm pools is to separate different services one from each other, so if one service fails, the other one continues to work. Which is the reason why you should monitor each pool separately. If you don't have ...


0

I've resolved the problem. The initial cause of it was in systemd service file for php-fpm /usr/lib/systemd/system/php-fpm.service: [Service] PrivateTmp=true This means that php-fpm could not see /tmp/.s.PGSQL.5432 nor anything else located in /tmp. To resolve the issue I've changed the location for PostgreSQL Unix domain socket file with following steps: ...


0

Developers ways try to decrease php overhead for image processing. try to use less resources for image processing. Use prepared images or change some operations with less performance requirements Admin way use more powerful CPUs


0

Then you are missing the init script /etc/init.d/php5-fpm. Just create it with -rwxr-xr-x permissions. This is for Debian Wheezy #!/bin/sh ### BEGIN INIT INFO # Provides: php-fpm php5-fpm # Required-Start: $remote_fs $network # Required-Stop: $remote_fs $network # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: ...


0

It was memory issue. When memory is out, php-fpm processes freeze, going to swap and actually your webserver are stopped. So, you should know your average memory consumption per 1 php-fpm process. Take memory allocated for all php-fpm processes at peak hours - M take total active processes - P Avg = M / P We have Avg = 30 Mb. So with php-fpm max children = ...


0

Your problem is most likely with your PHP-FPM configuration, because you are using the static process manager with only 8 child processes. Just about any load testing will use up those 8 child processes instantly and beg for more -- when there isn't an idle child process to process the PHP code, you'll get the 502 errors you are seeing. You should switch to ...


0

This means the php part crashed and isn't listening anymore on the unix socket. So nginx won't queue anything as it just can't contact the proxied server to send request to, and at this point, you can easily imagine that requests get processed very fast on nginx's side. If your php server didn't crash, requests would indeed standby regarding ...


0

Are you using php CGI or FPM? You only need one fastcgi_pass directive, but both are uncommented. Try making the index file index.html, and put such a file in the server root. Reload nginx and see if it serves it. Adding PHP complicates things, so make sure nginx itself works first. service nginx configtest is very helpful too. Update: It sounds like you ...


0

Given the part : with a symbolic link to the sites-enabled directory I think that's where you are wrong. In sites-enabled you should have symbolic links towards sites-available configurations and not the opposite because that's where nginx will lookup by default (see nginx.conf). Sharing your nginx.conf could be helpful there.


0

If you won't want to use a CDN and you don't want the cookies issue, You can use Quick Cache which works on Shared Hosting and use Autoptimize for Minifying CSS + JS. I am also using NGINX but I'm running 1.7.7 but if your nginx.conf has the correct settings to gzip, and your virtual hosts file has the correct browser cache settings, you shouldn't have any ...


0

You can determine port by typing # sudo netstat -lntp Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 192.168.16.121:3306 0.0.0.0:* LISTEN 1427/mysqld tcp 0 0 127.0.0.1:11211 0.0.0.0:* LISTEN 1722/memcached tcp 0 ...


0

Here is an example how to do that. http://stackoverflow.com/questions/9578628/redirecting-a-subdomain-with-a-regular-expression-in-nginx server { server_name ~^(?<subdomain>\w+)\.domainA\.com$; root /home/user/sites/example/$subdomain/html; location / { rewrite ^ https://$subdomain.domainB.com$request_uri permanent; ...



Top 50 recent answers are included