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

PHP passthru execution system command times out?

WBOY
Release: 2016-10-17 09:12:14
Original
1582 people have browsed it
<code>        passthru('cd ' . config("log")["analyse_dir"] . ' &&  ' . config("log")["python"] .' '. config("log")["analyse_file"] . ' >> ' . config("log")["analyse_log"], $ret);
        if ($ret == 0) {
</code>
Copy after login

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?

Related labels:
php
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template