[SOLVED] REST API request does not reply until shell script is done |
Hi All,
we are using REST API module by Chris Kacerguis. This is the code: PHP Code: public function getAllInformation_put() And the problem we find is that the response is not immediately sent and it waits for the reboot script to be executed (even we try to run it in the background and it has a sleep of 3 secs) So sometimes we get network error by response, although the logic is well executed. Because probably the reboot timing and the set_response is too tight. Any idea about this issue or how we can try to fix it? Thanks a lot in advance.
The client library that makes the request probably has an option for increasing the timeout.
I found the solution to this issue. Related to the way we execute the shell script. If I redirect both stdout and stderr to /dev/null, then background it, everything works fine.
Solution found here: LINK Thanks @ivantcholakov for your suggestion. |
Welcome Guest, Not a member yet? Register Sign In |