Page 1 of 1

PHP5 + SOAP: Keeping connections alive?

Posted: Sat May 24, 2008 2:17 pm
by micha42
Hello!

I have a big problem: I built a PHP application which uses php5's built in SOAP. Several successive calls are issued to the same 'object', but this makes everything painfully slow. One SOAP call takes 1 - 5 seconds for processing. I found out the problem is that even though I'm using the setPersistence option, the connection is opened and the php server app initialized again for every call.

How can I keep the php server application running when I create the php server object, so that subsequent calls will be issued over the same connection to the same instance of the server application?

I read about the Connection: keep-alive header which does this - but how do I get this working in the php5 built-in SOAP implementation?

Or do you know any other SOAP implementation for PHP5 where connections can be kept alive?

Any help would be hugely appreciated. Thank you!

Re: PHP5 + SOAP: Keeping connections alive?

Posted: Sat May 24, 2008 4:37 pm
by Ambush Commander
To do that, you would have to daemonize PHP, which is usually difficult to do.