私は行方不明ですが、ここにはあります:HTMLページサイズを8000文字に制限しているのは何ですか?
私たちのWebページのコンテンツのほとんどは、サーバー側のインクルードまたはポストページロードAJAX呼び出しによって生成されるので、HTMLファイルのサイズは一般にかなり小さい。しかし、テストページを作成するときに、複雑なことは何もせずに、ページサイズが8000文字を超えた場合、サーバーはページを転送しないことがわかりました。
これは、例えばファイルです:
<!DOCTYPE html>
<html>
<head>
<title>Rubbish</title>
</head>
<body>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.<br />
を繰り返し、最後の行に16回、合計で17本の完全なラインを与えます。そして、ラインのこの部分を追加:上記
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliq.<br />
</body>
</html>
することとFirefoxとその上のバリエーションのメッセージをロードしないキャラクターのサーバーが突然接続を閉じたため、Safariがページをロードすることはできません "8001の合計でありますクローム最終的な完全停止または他の文字を削除すると、文字数が減少し、ページが期待どおりに読み込まれます。
私は誰も私がこのような簡単なファイルを読み込むことができないのに欠けているものについての手がかりを与えることができますか?
アンサー(種類):mod_deflateであることが明らかになったので、ある程度のグーグル・グーグルの後に、最大サイズを変更する方法が分かっていれば、serverfaultに尋ねました。私はシェルファイルを作成し、オリジナルの8000文字ファイルをサーバーサイドインクルード(SSI)として含めました。これは期待通りに動作します。プレーンなHTMLには限界がありますが、SSIには限界がありませんが、もう気にする時間はありません。
EDIT: 'SetOutputFilter DEFLATE'指示文が削除され、ページがロードされるようになりました。これは実際に問題の原因となっているモジュールが収縮していることを示しています。 'DeflateBufferSize 10000'(または実際には 'DeflateBufferSize 2048')を追加しても、サポートされるサイズに違いはありません。このため、この問題をクローズし、サーバー障害時のモジュールのデフレートについて質問します。
編集:申し訳ありませんが、私たちはFedora 14でApache 2.2.17を使用していることを言及しておきます。これは私のラップトップの仮想マシン上にあるので、外部要因は関係ありません。
EDIT:デバッグするように設定されたログレベルであっても、Apacheエラーログに何も追加されないようにする必要があります。アクセスログには「200」というメッセージが表示されますが、送信される文字数は「 - 」に設定されます。
EDIT:以下はhttpd.confで編集されています。他の設定ファイルはありません。出力が圧縮され、クライアントによって解凍されます。
### Section 1: Global Environment
ServerTokens prod
CoreDumpDirectory /tmp
ServerRoot "/etc/httpd"
PidFile run/httpd.pid
Timeout 120
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5
<IfModule prefork.c>
StartServers 20
MinSpareServers 5
MaxSpareServers 20
ServerLimit 256
MaxClients 256
MaxRequestsPerChild 4000
</IfModule>
<IfModule worker.c>
StartServers 2
MaxClients 150
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>
Listen 80
#SOME LOAD MODULE CONFIG LINES REMOVED
LoadModule include_module modules/mod_include.so
LoadModule env_module modules/mod_env.so
LoadModule ext_filter_module modules/mod_ext_filter.so
LoadModule expires_module modules/mod_expires.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule headers_module modules/mod_headers.so
LoadModule dav_module modules/mod_dav.so
LoadModule status_module modules/mod_status.so
LoadModule info_module modules/mod_info.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule actions_module modules/mod_actions.so
LoadModule cache_module modules/mod_cache.so
LoadModule cgi_module modules/mod_cgi.so
Include conf.d/*.conf
ExtendedStatus Off
User apache
Group apache
### Section 2: 'Main' server configuration
ServerAdmin [email protected]
ServerName www.example.com:80
UseCanonicalName Off
DocumentRoot "/var/www/html"
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory "/var/www/html">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<IfModule mod_userdir.c>
UserDir disabled
</IfModule>
DirectoryIndex index.html index.html.var
AccessFileName .htaccess
<Files ~ "^.ht">
Order allow,deny
Deny from all
</Files>
TypesConfig /etc/mime.types
DefaultType text/plain
<IfModule mod_mime_magic.c>
MIMEMagicFile conf/magic
</IfModule>
HostnameLookups Off
#LOG CONFIG LINES REMOVED
ServerSignature Off
Alias /icons/ "/var/www/icons/"
<Directory "/var/www/icons">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<IfModule mod_dav_fs.c>
DAVLockDB /var/lib/dav/lockdb
</IfModule>
IndexOptions FancyIndexing VersionSort NameWidth=* HTMLTable Charset=UTF-8
#ICON CONFIG LINES REMOVED
ReadmeName README.html
HeaderName HEADER.html
IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
#LANGUAGE CONFIG LINES REMOVED
AddDefaultCharset UTF-8
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl .crl
AddHandler send-as-is asis
AddHandler type-map var
AddOutputFilter INCLUDES .html .xml
AddType application/x-httpd-php .php .html
Alias /error/ "/var/www/error/"
<IfModule mod_negotiation.c>
<IfModule mod_include.c>
<Directory "/var/www/error">
AllowOverride None
Options IncludesNoExec
AddOutputFilter Includes html
AddHandler type-map var
Order allow,deny
Allow from all
LanguagePriority en es de fr
ForceLanguagePriority Prefer Fallback
</Directory>
</IfModule>
</IfModule>
#BROWSER MATCH CONFIG LINES REMOVED
<Location /server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Location>
<Location /server-info>
SetHandler server-info
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Location>
### Section 3: Virtual Hosts
NameVirtualHost *:80
FcgidMaxRequestLen 2000000
FcgidMinProcessesPerClass 5
FcgidIdleTimeout 18000
FcgidIOTimeout 60
TraceEnable Off
SetEnvIf User-Agent ".*MSIE.*" ISIE true
<VirtualHost *:80>
ServerName www.example.com
UseCanonicalName off
DocumentRoot /etc/httpd/www/examples/
DirectoryIndex index.html index.html.var
CheckSpelling on
CheckCaseOnly on
<Directory /etc/httpd/www/examples/>
Options Includes
AllowOverride None
Order Deny,Allow
Allow from all
Header Set Cache-Control "max-age=10"
ExpiresActive On
ExpiresByType text/html "access plus 10 seconds"
ExpiresByType image/gif A259200
ExpiresByType image/jpg A3600
ExpiresByType text/html A259200
ExpiresByType image/ico A259200
SetOutputFilter DEFLATE
</Directory>
<Directory />
Order Deny,Allow
Deny from All
</Directory>
#OTHER DIRECTORY CONFIG LINES REMOVED
</VirtualHost>
ApacheのソースコードにMAX_STRING_LENの定義はありますか?あなたのネットワーク構成は何ですか? – Leopd
これはサーバーの問題です。どのサーバーですか?設定を確認してください。 – SLaks
@Leopd、確かに、明らかに必要なサーバーのバージョン(Apache 2.2.17)を追加しました – blankabout