ファイル共有 Web サイト (mediafire、hotFile など) を管理していますが、サーバーの 1 つからダウンロードしようとすると問題が発生します。
これは次のようになります: メイン サーバーが 1 つあり、そこに mysql データベースと Web サイト自体があり、ファイルをホストするサーバーが他にもあります。
ダウンロード プロセスは次のようになります。ユーザーは外部サーバーへのリンクを取得します。このページはリモートでメイン サーバーに接続し、データベースに対してクエリを実行します。クエリの後、ダウンロードが開始されます。
これで、サーバーの 1 つを除いて、すべてのダウンロードが正常に機能します。最も奇妙なことは、このサーバーからのダウンロードが機能する場合と機能しない場合があることです。
問題のあるサーバーからのダウンロードの約 70% が機能し、ダウンロードが機能しないのは 30% です。
ダウンロードが機能しない場合のエラー メッセージは次のとおりです。
Connect failed: Lost connection to MySQL server at 'reading authorization packet', system error: 0
は次のmy.cnf
ようになります。
[mysqld]
skip-name-resolve
bulk_insert_buffer_size = 8M
concurrent_insert = 2
connect_timeout = 10
default-storage-engine = MyISAM
innodb_buffer_pool_size=16M
interactive_timeout = 35
join_buffer_size = 2M
key_buffer_size = 192M
local-infile=0
log-error=/var/log/mysql/error.log
log-slow-queries
log-slow-queries=/var/log/mysql/mysql-slow.log
long_query_time=1
max_allowed_packet = 32M
max_connections = 3000
max_heap_table_size = 256M
max_user_connections= 400
max_write_lock_count = 8
myisam_max_sort_file_size = 256M
myisam_sort_buffer_size = 64M
open_files_limit=128K
query_alloc_block_size = 65536
query_cache_limit = 16M
query_cache_size = 128M
query_cache_type = 1
query_prealloc_size = 262144
range_alloc_block_size = 4096
read_buffer_size = 2M
read_rnd_buffer_size = 1M
sort_buffer_size = 2M
table_cache = 48K
thread_cache_size = 512
tmp_table_size = 256M
transaction_alloc_block_size = 4096
transaction_prealloc_size = 4096
wait_timeout = 100
max_connect_errors = 5000
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
どうすれば問題を解決できますか?
どうもありがとうございました。私の英語で申し訳ありません。