ワニスターペンテイン - VCLの適用に失敗しました
-
13-12-2019 - |
質問
Magento-の指示に従って、ステージングサイトにワニスターピンティンをインストールしました。ターピントンWiki 。
私たちのサイトは、Ubuntu 14.04、Nginx、Varnish-4.0.3m、ターペンタインv0.6.5、Magento 1.9.2。
これらはDAEMON_OPTS
/etc/default/varnish
です。
DAEMON_OPTS="-a :80 \
-T localhost:6082 \
-f /etc/varnish/default.vcl \
-S /etc/varnish/secret \
-p cli_buffer=16384 \
-p feature=+esi_ignore_other_elements \
-p vcc_allow_inline_c=on \
-s malloc,256m"
.
Turpentineモジュールを正常にインストールして、\n
が追加された、URLブラックリストとデバッグ情報を有効にして、Secret Vicish認証キーの設定を実際に変更します。
設定を保存しようとしたとき、私はベローエラーを得ました:
Failed to apply the VCL to 127.0.0.1:6082: Got unexpected response code from Varnish: 106 Message from VCC-compiler: directors are now in directors VMOD. ('input' Line 27 Pos 1) director default round-robin { ########---------------------- Running VCC-compiler failed, exited with 2 VCL compilation failed
.
これは、ターペンタインの生成GeneratiCodeTagCodeファイルを生成するものです。
vcl 4.0;
C{
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include <pthread.h>
static pthread_mutex_t lrand_mutex = PTHREAD_MUTEX_INITIALIZER;
void generate_uuid(char* buf) {
pthread_mutex_lock(&lrand_mutex);
long a = lrand48();
long b = lrand48();
long c = lrand48();
long d = lrand48();
pthread_mutex_unlock(&lrand_mutex);
sprintf(buf, "frontend=%08lx%04lx%04lx%04lx%04lx%08lx",
a,
b & 0xffff,
(b & ((long)0x0fff0000) >> 16) | 0x4000,
(c & 0x0fff) | 0x8000,
(c & (long)0xffff0000) >> 16,
d
);
return;
}
}C
import std;
director default round-robin {
{
.backend = {
.host = "127.0.0.1";
.port = "8080";
.first_byte_timeout = 300s;
.between_bytes_timeout = 300s;
}
}
}
director admin round-robin {
{
.backend = {
.host = "127.0.0.1";
.port = "8080";
.first_byte_timeout = 21600s;
.between_bytes_timeout = 21600s;
}
}
.
var/default.vcl
からcustom_include.vcl
ファイルを作成していないように、これを修正することができました
cp app/code/community/Nexcessnet/Turpentine/misc/version-4.vcl app/code/community/Nexcessnet/Turpentine/misc/custom_include.vcl
.
しかし、私が設定を保存しようとすると、新しいエラーが発生しました:
Failed to apply the VCL to 127.0.0.1:6082: Varnish data to write over length limit by 749 characters
.
version-4.vcl
の-p cli_buffer=16384
に設定したDAEMON_OPTS
に関連しているようです。私がこれを増やしてみると、まだ同じエラーが得られますが、異なる限界で得られます。
Failed to apply the VCL to 127.0.0.1:6082: Varnish data to write over length limit by 8941 characters.
.
ニス用の/etc/default/varnish
またはmagento/var/log/
には何もありません。私は、CLI_Bufferに問題があるかどうかを確認するためにワニス管理者を起動しましたが、注意事項は何も見られませんでした。
$ sudo varnishadm
varnish> param.show cli_buffer
200
cli_buffer
Value is: 16k [bytes]
Default is: 8k
Minimum is: 4k
Size of buffer for CLI command input.
You may need to increase this if you have big VCL files and use
the vcl.inline CLI command.
NB: Must be specified with -p to have effect.
.
アドバイスの提案をお待としています。
解決 2
私は私が見つけた修正を適用して Github Ticket 915/ a>。
最初のオフの最初のエラーが誤解を招くように、私が作成したファイルを削除しました。
rm app/code/community/Nexcessnet/Turpentine/misc/custom_include.vcl
.
それから私は Devel Branch Magentoプロジェクト Github Ticket 915
Turpintine Config / Applyを保存すると、エラーメッセージが表示されません。
このサイトは多大なスピードを上げていないようですが、それが想定されているようにワニスが働いていることをどのように確実にすることができますか。
アップデート Hyniste AVGが0より大きい場合、VarishStatを実行してVarishistatを実行していることを確認できました。
他のヒント
共有をありがとう。devel
ブランチから最新バージョンをインストールして、非常に似た問題を修正しました。Navishがキャッシュされているかどうかを確認するには、サーバーにアクセスできる場合は、次のいずれかのVARISHTOPコマンドを使用できます。
/usr/bin/varnishtop -i RxURL
/usr/bin/varnishtop -i RxHeader -C -I \^HOST
.