[ic] mod_interchange and Apache MaxClients
Ron Phipps
rphipps at reliant-solutions.com
Thu Nov 17 18:15:50 EST 2005
> From: interchange-users-bounces at icdevgroup.org
[mailto:interchange-users-
> bounces at icdevgroup.org] On Behalf Of Kevin Walsh
> Sent: Thursday, November 17, 2005 12:34 PM
>
> I'm thinking about the PSP hanging issue and how that could effect
things
> and I'm lead to believe that the following is happening:
>
> 1. User submits a request that causes a call to the PSP to be
> made.
>
> 2. The PSP is taking its sweet time, so IC waits for a response.
>
> 3. 10 seconds later, mod_interchange gives up and resubmits the
> user's request. This compounds the problem.
>
> 4. Loop back to #2 ten times, with a two second delay between
> attempts.
>
> The above will probably wind up eating a lot of sockets, and also
munch
> its way through your processes leading to the problems reported.
>
> I believe the following, posted earlier in this thread, is a symptom
> of the later failures, rather than the initial cause:
>
> >
> > [Thu Nov 10 20:15:11 2005] [error] [client x.x.x.x] Malformed header
> > return by Interchange:
> > [Thu Nov 10 20:15:11 2005] [error] [client x.x.x.x] Premature end of
> > script headers: /home/xxxxxx/public_html/favicon.ico
> >
>
> Can you check your logs to see if you can spot anything that looks
like
> "Failed to select the response header."
I see errors like this:
[Tue Nov 15 08:12:09 2005] [error] (104)Connection reset by peer: access
to /noi-05.html failed for x.x.x.x, reason: error sending headers to
client
Is that what you were looking for?
> I could be wrong, but the above sounds plausible.
>
> Possible workarounds, if you find the above error message.
>
> 1. Upgrade Interchange. Upgrade it now! See the wget comments.
>
> 1.1. Upgrade everything else while you're at it. I see people are
> still using Red Hat 7 and Perl 5.6 for some reason.
>
> 2. Add "ConnectTries 1" to the mod_interchange <Location>
> parameters in your Apache configuration. This will cause the
> initial timeout to force a failure, rather than retry the
request.
>
> 3. Increase the mod_interchange timeout. This can only be done by
> editing mod_interchange.c, to increase the IC_DEFAULT_TIMEOUT
> definition, and recompiling mod_interchange.so. Perhaps I
should
> make that configurable in the Apache config.
So perhaps we should make the IC_DEFAULT_TIMEOUT to be the payment
gateway timeout + a couple seconds?
> Give the above a try and see if any of it works.
This all sounds plausible. We switched from the Verisign PfPro (uses an
exe) to a custom Payment provider probably 1-2 months ago. I wrote the
custom module to use LWP::UserAgent + Crypt::SSLeay, with the default
timeout (30 seconds?). Can LWP::UserAgent + Crypt::SSLeay be effected
in a similar way that Net::SSLeay is? Or is LWP::UserAgent free of
those problems?
If someone comes back and says switching to the wget method solves the
problem for them then I will rewrite the module to use wget and see if
it solves our issue as well. Is this pointing to some bigger issue?
Perhaps the way that mod_interchange handles timeouts? Or is this just
par for the course when a process takes too long to return?
Thanks!
-Ron
More information about the interchange-users
mailing list