Php never get response If calling an API in python and it takes more than 5 minutes. so I was checking with time.sleep(300) in python, but it works.
I do not know why php not getting response from python while calling an API.
CODE
test.php
<?php
$file_id=1;
$response=exec('python /home/xyz/test.py '.$file_id);
echo $response;
?>
test.py
import os, json
import sys
sleep(300)
#sleep(420)
print "hello"