Malloc error on LiteSpeed

#1
Hello,

I have a simple php script just calling ffmpeg to convert a video. The mp4 file being converted is just 1.9M. The issue here is that when litespeed is used, it generates the following error:

malloc of size 7088768 failed Video encoding failed [libx264 @ 0x73d7040] final ratefactor: 31.70 [aac @ 0x73dca00] Qavg: 2900.727 [aac @ 0x73dca00] 2

If I switch the webserver ti Apache, the same code/script works flawlessly. Just to mention it takes a second to just execute due to small file. The same code works fine when checked from php command line, its just Litespeed that generates the error. I have already increased litespeed memory limits following https://docs.litespeedtech.com/cp/cpanel/503-error/#litespeed-php-process-memory but the error persists. PHP memory limit is already set to unlimited. Can anyone advise what can be the possible reason for malloc error on just litespeed ?
 

Pong

Administrator
Staff member
#3
There was a ticket associated with this issue, basically limited by external app soft and hard momory_limit, should not set both to "0", instead, set it to larger number as Gary suggested. Also, LSWS doesn't necessarily need an external app to work, but if some PHP has been defined in an external app, changing settings in PHP won't be enough. related external app memory_limit will need to be increaced.
 
Top