S
S
Sharov Dmitry2015-07-15 08:58:38
PHP
Sharov Dmitry, 2015-07-15 08:58:38

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

2 answer(s)
C
Chmyaf, 2015-07-15
@Chmyaf

ini_set in default_socket_timeout and connection_timeout in SoapClient options

W
wol_fi, 2015-07-15
@wol_fi

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 question

Ask a Question

731 491 924 answers to any question