curl-and-php
Slow connect using curl on windows
From: <maillist_at_izone.at>
Date: Fri, 14 Jan 2005 10:38:54 +0100
Date: Fri, 14 Jan 2005 10:38:54 +0100
Hi,
i've got some troubles with very slow connectionsetup
when using cURL with php on windows.
My setup uses an Apache 1.3.33 with modssl and php-4.3.10RC2
on the Server Side. The client is an Win2k3 Server with
PHP 4.3.8 an the bundled CURL Lib.
Now, when connecting to the Server using an Browser
the ssl_engine_log shows following:
---- [14/Jan/2005 10:21:18 22424] [info] Connection to child 0 established (...) [14/Jan/2005 10:21:18 22424] [info] Seeding PRNG with 512 bytes of entropy [14/Jan/2005 10:21:18 22424] [trace] OpenSSL: Handshake: start [14/Jan/2005 10:21:18 22424] [trace] OpenSSL: Loop: before/accept initialization [14/Jan/2005 10:21:18 22424] [trace] OpenSSL: Loop: SSLv3 read client hello A [14/Jan/2005 10:21:18 22424] [trace] OpenSSL: Loop: SSLv3 write server hello A [14/Jan/2005 10:21:18 22424] [trace] OpenSSL: Loop: SSLv3 write certificate A [14/Jan/2005 10:21:18 22424] [trace] OpenSSL: Loop: SSLv3 write server done A [14/Jan/2005 10:21:18 22424] [trace] OpenSSL: Loop: SSLv3 flush data [14/Jan/2005 10:21:18 22424] [trace] OpenSSL: Loop: SSLv3 read client key exchange A [14/Jan/2005 10:21:18 22424] [trace] OpenSSL: Loop: SSLv3 read finished A [14/Jan/2005 10:21:18 22424] [trace] OpenSSL: Loop: SSLv3 write change cipher spec A [14/Jan/2005 10:21:18 22424] [trace] OpenSSL: Loop: SSLv3 write finished A [14/Jan/2005 10:21:18 22424] [trace] OpenSSL: Loop: SSLv3 flush data [14/Jan/2005 10:21:18 22424] [trace] Inter-Process Session Cache: request=SET status=OK id=0A5CAC9684A3E50469A082F2E0BF6CA59BAB2BDE93A6BCBB4EDE42414ED765C1 timeout=300s (session caching) [14/Jan/2005 10:21:18 22424] [trace] OpenSSL: Handshake: done [14/Jan/2005 10:21:18 22424] [info] Connection: Client IP: xxx, Protocol: SSLv3, Cipher: RC4-MD5 (128/128 bits) --- This process takes less than a second. Now, when i use cURL the following is logged: --- [14/Jan/2005 10:28:41 22426] [info] Connection to child 2 established (...) [14/Jan/2005 10:28:41 22426] [info] Seeding PRNG with 512 bytes of entropy [14/Jan/2005 10:28:41 22426] [trace] OpenSSL: Handshake: start [14/Jan/2005 10:28:41 22426] [trace] OpenSSL: Loop: before/accept initialization [14/Jan/2005 10:28:46 22426] [trace] OpenSSL: Loop: SSLv2 read client hello A [14/Jan/2005 10:28:46 22426] [trace] OpenSSL: Loop: SSLv2 write server hello A [14/Jan/2005 10:28:46 22426] [trace] OpenSSL: Loop: SSLv2 read client master key A [14/Jan/2005 10:28:46 22426] [trace] OpenSSL: Loop: SSLv2 server start encryption [14/Jan/2005 10:28:46 22426] [trace] OpenSSL: Loop: SSLv2 write server verify A [14/Jan/2005 10:28:46 22426] [trace] OpenSSL: Loop: SSLv2 read client finished A [14/Jan/2005 10:28:46 22426] [trace] OpenSSL: Loop: SSLv2 write request certificate A [14/Jan/2005 10:28:46 22426] [trace] OpenSSL: Loop: SSLv2 write server finished A [14/Jan/2005 10:28:46 22426] [trace] Inter-Process Session Cache (DBM) Expiry: old: 2, new: 1, removed: 1 [14/Jan/2005 10:28:46 22426] [trace] Inter-Process Session Cache: request=SET status=OK id=843C22865F89C32242E03E2D906350AC timeout=300s (session caching) [14/Jan/2005 10:28:46 22426] [trace] OpenSSL: Handshake: done [14/Jan/2005 10:28:46 22426] [info] Connection: Client IP: xxx, Protocol: SSLv2, Cipher: RC4-MD5 (128/128 bits) --- This needs more than 5 seconds. It seems that there is some kind of Problem here (this needs 5 seconds) [14/Jan/2005 10:28:41 22426] [trace] OpenSSL: Loop: before/accept initialization [14/Jan/2005 10:28:46 22426] [trace] OpenSSL: Loop: SSLv2 read client hello A I already have disabled all verifying CURL options and changed the Cipherlist to RC4-MD5 to match the Browser. I also have generated a random file for curl wich already decreased the delay from 10 to 5 secs. But 5 is also not acceptable. Any ideas ? thanks RainerReceived on 2005-01-14