简体   繁体   中英

php-fpm freeze user session on ffmpeg exec

I'm have some problem with php-fpm and ffmpeg.

If i'm launching encoding from php just with simple exec, then for this certain user who initiate encoding all other php responses seems like a frozen(timeout or ignored). So for this user site becomes fully unresponsable.

If i'm launching encoding from php but with " & " on the end of command, then all comes fine, encoding still eats cpu but site fully responsible for user.

So maybe there is some docs or info about this behavior so i'm can get why it work this way, so where exactly it gets stuck.

Thank you

If you launch with & on end it detaches the process from the php-fpm process so they run separately. Without it the php process waits on the ffmpeg to finish before returning anything.

If ffmpeg is a long running process and you're using sessions be sure and write the session before running ffmpeg so session won't be locked waiting on this process.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM