K
K
KorsaR-ZN2014-09-30 21:48:10
PHP
KorsaR-ZN, 2014-09-30 21:48:10

PHP SOAP error (looks like...)?

Good afternoon!
SoapClient on PHP broke, a couple of days ago everything worked like clockwork.
Then something went wrong, I don’t know what exactly, a Google search did not help solve the problems.
It gives an error:
"looks like we got no XML document" , for some reason the server where the request goes sends broken XML to the second request, i.e. not a complete answer.
There is also such an error (rarely):
"E_WARNING SoapClient::__doRequest(): SSL read operation timed out"
I suspect not a complete answer due to the timeout, but I already checked it by increasing it to an hour ...
The code has nothing to do with it, there is already more of it not touched for weeks.
The server where the requests go also works stably according to the local TP.
Server: Debian
PHP: 5.5.17
The server updated packages to stable versions.
The rollback did not help solve the problem :(
Please help, I have been struggling with the problem for almost a whole day, but there is no solution :(

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
KorsaR-ZN, 2014-09-30
@KorsaR-ZN

I solved the problem by adding an option when creating a SoapClient, keep_alive = false (available since 5.4)
Without this option, SoapClient sends a "Connection: Keep-alive" header .
Those. service support apparently was cunning when they said that for their part they did not change anything.
from our side, this code has been working for a year, up to one moment. In total, on the service side, they introduced a limit on the number of active connections, hence the connection plugs.
PS so, everyone who works with SoapClient and if you do not need a permanent connection, then turn it off from harm's way, so as not to lose a working day because of a trifle;)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question