Answer the question
In order to leave comments, you need to log in
Nginx main page long loading: "Primary script unknown"?
Hello! After recent updates, WordPress began to notice that the main page took a very long time to load (maybe it was like this before, but I didn’t notice). By turning off plugins, I found evil - Crayon Syntax Highlighter. With the plug-in enabled, the page is generated in 2.5 seconds, with it disabled - 600 ms
. I use the nginx + php-fpm bundle, Ubuntu 12.04 LTS OS. Get into the nginx logs:
2014/04/19 08:23:14 [error] 852#0: *47798 FastCGI sent in stderr:
"Primary script unknown" while reading response header from upstream, client: 195.122.252.29, server: master.virmandy.net, request: "GET
//engine/init.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "master.virmandy.net"
2014/04/19 11:44:27 [error]
855#0: *48379 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 195.122.252.29, server:
master.virmandy.net, request: "GET //engine/init.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host:
"master.virmandy.net"
2014/04/19 21:10:56 [error] 856#0: *52391 FastCGI sent in stderr: "PHP message: PHP Warning: touch(): Unable to
create file /home/wollk/master/www/wp-content/plugins/crayon-syntax-highlighter/log.txt because Permission denied in
/home/wollk/master/www/wp-content/plugins/crayon-syntax-highlighter/crayon_settings_w" while reading upstream, client: 195.88.72.203,
server: master.virmandy.net, request: "GET /wp-admin/options-general.php?page=crayon_settings HTTP/1.1", upstream:
"fastcgi://unix:/var/run/php5-fpm.sock:", host: "master.virmandy.net", referrer: "http://master.virmandy.net/wp-admin/plugins.php"
2014/04/19 21:10:56 [error] 856#0: *52391 FastCGI sent in stderr: "p.class.php on line 1180" while reading upstream, client: 195.88.72.203,
server: master.virmandy.net, request: "GET /wp-admin/options-general.php?page=crayon_settings HTTP/1.1", upstream:
"fastcgi://unix:/var/run/php5-fpm.sock:", host: "master.virmandy.net", referrer: "http://master.virmandy.net/wp-admin/plugins.php"
2014/04/19 23:50:47 [error] 856#0: *54136 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream,
client: 94.23.204.157, server: master.virmandy.net, request: "GET /nosuichfile.php HTTP/1.1", upstream:
"fastcgi://unix:/var/run/php5-fpm.sock:", host: "185.22.60.25"
2014/04/19 23:50:47 [error] 856#0: *54136 FastCGI sent in stderr: "Primary
script unknown" while reading response header from upstream, client: 94.23.204.157, server: master.virmandy.net, request: "GET
/noxdir/nosuichfile.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "185.22.60.25"
server {
listen 80;
server_name master.virmandy.net;
client_max_body_size 16M;
root /home/wollk/master/www;
index index.html index.htm index.php;
location / {
try_files $uri $uri/ /index.php;
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question