Home > Article > Backend Development > PHP passthru execution system command times out?
<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?