Performance Issue with Asynchronous PHP-Curl Request -
the objective of following scripts send asynchronous php-curl request server. i've been using "fire , forget" technique in curl request sent server timeout_ms set 100. mainprocess.php proceed delay of 100 milliseconds , sendme.php send curl server c without delaying execution of mainprocess.php script.
i used script (benchmarking.php) print execution time of firing overall procedures.
benchmarking.php
$time_start = microtime(true); php-curl post server b (mainprocess.php) $time_end = microtime(true); $time = $time_end - $time_start; echo $time;
initially, $time low. continuously fire benchmarking.php $time increases. resetting apache server (server b) option in order decrease $time variable again. hence, must have resources or connection handling of php. suggestions or workaround appreciated regards problem.
illustration of procedures.
references fire , forget techniques:
http://www.tsartsaris.gr/how-to-make-asynchronous-post-with-php
http://www.paul-norman.co.uk/2009/06/asynchronous-curl-requests
Comments
Post a Comment