curl-and-php
Intermittent Authorize.Net Timouts/Caching
Date: Thu, 14 Aug 2008 12:50:28 -0400
Hello
A website I developed uses Curl and PHP to authorize credit cards via
Authorize.net. While most transactions are processed with 1 second, some are
taking longer and will time out the PHP script after 30 seconds. One thing
I have noticed is that these timeouts seem to occur after a period of
inactivity. What I mean buy this is that there have been no attempted
authorizations over a period of time, say 24 hours or so. It seems that
after this period of inactivity the first transaction times out, yet
subsequent requests are processed almost immediately. It strikes me that
this is some sort of caching thing. It's as if once the connection is made
the first time, subsequent attempts use a stored connection of some sort. I
tired testing this by disabling caching via CURLOPT_FRESH_CONNECT and
CURLOPT_FORBID_REUSE to see if the script would time out, but I could not
get the timeout to repeat. I have also wondered if this is a DNS caching
issue. In any case what I am interested in finding out is how caching works
with CURL and/or if anyone can shed any light on this issue.
I suspect there is some issue with the web host either in how curl is set up
or how their traffic is routed on the server. They seem to have some type of
IP redirection thing happening. If I do a traceroute to the server the
proper ip of the server shows up, but when I connect to an external
database, the IP address that the request is coming from is different. I
might add the version of php/curl is about 3 years old (PHP Version
4.3.11/libcurl/7.11.2 OpenSSL/0.9.7d zlib/1.1.4 ) so that may be an issue.
This is not my server, so I would like to know as much as possible about
this before I speak with the host.
Thanks in advance for any help you can provide
Louise Eggleton
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2008-08-14