Home  >  Article  >  Backend Development  >  PHP passthru execution system command times out?

PHP passthru execution system command times out?

WBOY
WBOYOriginal
2016-10-17 09:12:141554browse
<code>        passthru('cd ' . config("log")["analyse_dir"] . ' &&  ' . config("log")["python"] .' '. config("log")["analyse_file"] . ' >> ' . config("log")["analyse_log"], $ret);
        if ($ret == 0) {
</code>

This is echoed in brackets.

cd /MyApp/water/water && /usr/bin/python start_analyse.py >> /MyApp/shy/public/../storage/logs/analyse.log

Then the 504 timeout error is always reported after the api call.
This command is a database analysis and storage operation. Although http reports a 504 error, the log can still be entered and successfully entered into the database.
That is to say, the command was executed successfully.

How to solve this timeout error?

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn