PHP5 + SOAP: Keeping connections alive?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
micha42
Forum Newbie
Posts: 1
Joined: Sat May 24, 2008 2:07 pm

PHP5 + SOAP: Keeping connections alive?

Post 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!
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Re: PHP5 + SOAP: Keeping connections alive?

Post by Ambush Commander »

To do that, you would have to daemonize PHP, which is usually difficult to do.
Post Reply