Perlbal::Manual::Debugging - Perlbalのデバッグ
Perlbal 1.78.
perlbalには二つのデバッグの方法があります。
そのうちの一つは管理コンソールを使う方法で、もう一つはデバッグメッセージを使う方法です。
管理サービスをセットアップする必要があり、欲しい情報を全てdumpするようにします。
このプロセスの包括的なドキュメントは the Perlbal::Manual::Management の manpage で見つけることができます。
環境変数PERLBAL_DEBUG
の値を 0 から 4 の間で設定することで、Perlbalがダンプするデバッグメッセージの量を制御することができます。
PERLBAL_DEBUG = 0 # デバッグしない
PERLBAL_DEBUG = 4 # 全てをデバッグする
PERLBAL_DEBUG
を 1 に設定することで、基本的なデバッグを有効にすることができます:
PERLBAL_DEBUG = 1
The following debugging messages are turned on:
Backend $self is done; closing...
を出力します。
Client ($self) closing backend ($backend)
HTTP parse failure: $reason
出力します。socket upgraded to SSL!
デバッグレベルを2に設定することで、level 1からの全てのメッセージを全て取得する。
PERLBAL_DEBUG = 2
その他にも幾つか受け取るでしょう:
Backend $self is writeable!
を出力します。
BackendHTTP: handle_response
を出力します。
Backend $self is readable!
を出力します。
BACKEND event_err
を出力します。
ClientHTTPBase::setup_keepalive($self)
を出力します。
REPROXY SSL done
を出力します。
REPROXY Sent: $sent
を出力します。
All writing done to $self
を出力します。
Perlbal::ClientProxy closed
を出力し、その後に again
と saying $reason
があるかも知れません。
ClientProxy::client_disconnected
を出力します。
Got from fast queue, in front of $backlog others
を出力します。
Backend requesting client, got PRIORITY = $cp-
{fd}.>を出力します。
Backend requesting client, got low priority = $cp-
{fd}.> を出力します。
Perlbal::Socket::read_headers($self) is_res=$is_res
を出力します。
PERLBAL_DEBUG = 3
デバッグレベルを3に設定することで、level 1 と 2 の全てのメッセージに加えて、以下を受け取るでしょう:
writing response headers to client
を出力します。
content_length=VALUE
および remain=VALUE
を出力します。それらの値は定義されていない場合は undef
です。
done detaching
を出力します。
service's persist_client = $persist_client
を出力します。
content-length
or it's a head request, as we're doing a keep alive the Perlbal::ClientHTTPBase manpage prints doing keep-alive to client
doing connection: close
を出力します。
ClientProxy::backend_finished
を出力します。
ClientProxy::http_response_sent -- resetting state
を出力します。
ClientProxy::event_write
を出力します。
unstalling backend
を出力します。
ClientProxy::event_read
を出力します。
no headerreading.
を出力します。
disabling reads.
reading $read_size bytes (VALUE bytes remain)
, where VALUE bytes remain
can be <undef>
read $len bytes
を出力します。
done_reading = $done_reading, backend = BACKEND
を出力します。BACKEND
は undef
の場合もありえます。
already responded.
を出力します。クライアントがデータの送信を続ける場合は、 the Perlbal::ClientProxy manpage は already responded [2]
を出力し、読み込みを諦めます。
got a backend. sending write to it.
を出力します。
no backend. read_ahead = $self-
{read_ahead}.>を出力します。
bureason = $self-
{bureason}>を出力します。
finally requesting a backend
を出力します。
client disconnected
を出力します。
\r\n
を削除する必要がある場合は、 the Perlbal::Socket manpage は throwing away leading \r\n
を出力します。
can't find end of headers
を出力します。
pre-parsed headers: [$hstr]
を出力します。
pushing back $len bytes after header
bogus headers
を出力します。
got valid headers
を出力します。
draining readbuf from $self to $dest: [$$bref]
を出力します。
デバッグレベルを4に設定することで、レベル1から3までの全てのメッセージを取得することができます。
更に、 write
が再定義され、write
が呼ばれるときにはいつも最初にwrite($self, <$clen>"$content") from ($pkg, $filename, $line)
が出力されます。
PERLBAL_DEBUG = 4
the Perlbal::Manual::Configuration manpage, the Perlbal::Manual::Management manpage.