Clear all

Videos stored on same server have size limit

3 Posts
2 Users
Posts: 2
Topic starter
New Member
Joined: 1 year ago

I am using links to videos stored on the local server.  If the video file is larger than a certain size a PHP error is generated and the page fails to load.  It looks like the server is trying to load the whole video file into memory to look up information held in the file.  The max size that works is around 14MB.  For now I've lowered the quality to get things to work, but I will be needing to have a video well over 100MB soon.

I can't store the videos on any other site due to privacy issues (and I can't give you access to the site for the same reasons).

Is there anything I can do to resolve the problem?

The line from the log file looks like this (with tweaks to the actual domain name):

[Mon Jan 24 10:30:22.751596 2022] [fcgid:warn] [pid 250780:tid 118010168788736] [client] mod_fcgid: stderr: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 49975240 bytes) in /home/abcdef/ on line 649, referer: 


2 Replies
Posts: 2
Topic starter
New Member
Joined: 1 year ago

Writing this post gave me an idea, which turned out to work.

In wpforoembeds.php on line 389, I added an option to the wp_remote_get call to only fetch at most 10k of the file.  So far this has worked well for me but may not work for all formats. 

I hope this helps clarify the problem and also helps with the solution.

if( $remote_response = wp_remote_get($decoded_url, ['limit_response_size'=>10240]) ){


Posts: 4043
Famed Member
Joined: 8 years ago

Hi @healthyinmind,

Please note that wpForo Embeds addon is not designed for embedding video files. It's an addon for using 3rd party serves URLs like YouTube, SounCloud, Twitter. So please don't put video file URL in posts. Moreover, there is no way to embed a large Video File to post, the file should be loaded by HTML5 video player which is provided by wpForo Advanced Attachments addon.

You should use wpForo Advanced Attachments addon to upload videos and attached to posts.

Scroll to top