Answer the question
In order to leave comments, you need to log in
How to limit request time to soap server?
There is a soap server to which data is sent by a php script, but I can’t figure out how to close the connection and terminate the script if the execution is too long (or it can’t reach the server for a long time, the connection doesn’t open), say after 10-15 seconds.
Answer the question
In order to leave comments, you need to log in
ini_set in default_socket_timeout and connection_timeout in SoapClient options
For example, you can do it through a daemon, on the same php. When starting the script, write down the process ID and start time (for example, in the database in a memory table), and the daemon constantly scans the table and kills those processes that have been running for longer than a certain time.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question