简体   繁体   中英

Possible to run multiple client connections in PHP SOAP?

I'm running SOAP and I have encountered a 500 internal server error, possibly due to lack of memory resources in a large loop.
Is it possible to run multiple simultaneous connections in SOAP (similar to curl_multi) and is there any examples of this in practise?

My main concern is keeping memory resources low whilst running a large amount of queries.

Is it also possible during output, to output each iteration of the loop as it passes? Currently it loads all of them at the same time.

Not with ext/soap, which is the default PHP SOAP extension. If your SOAP envelope is not that complicated and doesn't change often it might be an idea to use multi_curl and a hand-written SOAP envelope. But be careful not to introduce XML injections along the way (aka use DOMDocument or XMLWriter to create the envelope).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM