I could not able to Add libraries if i enabled s3fs module. There is some conflict error while storing the .h5p in temp folder and doing unzip. Please check this.

Comments

karthid created an issue. See original summary.

tajakobsen’s picture

A Jira ticket has been created for tracking this issue.

paalj’s picture

Assigned: Unassigned » paalj
Anonymous’s picture

My experience with this is that I had created several H5P nodes before enabling S3FS, later enabled S3FS & set it to take over public files (public://), & it broke the whole site. When navigating to an H5P node the site would freeze & in fact PHP-FPM would go into a death spiral, consuming more & more resources until the EC2 instance it was running on became unresponsive & was replaced by the Elastic Load Balancer. I didn't investigate further, since I disabled S3FS at that point. https://h5ptechnology.atlassian.net/browse/HFP-801?focusedCommentId=2032...

matthew.t’s picture

Hi all,

I am just wondering if there was any success from anyone in making H5P working with S3 using s3fs module?

Thank you,
Matt

sksshed’s picture

We use S3FS with H5P, we are onily using S3 FS for private file storage though.

jukka792’s picture

Same issue with D8, does not work with S3FS module. The site will be broken, and H5P -settings page does not work.
It does not give any errors, only webserver logs shows some Fata PHP errors.

anaconda777’s picture

I guess the reason is this:
https://www.drupal.org/project/s3fs/issues/3022812

At least with D8 you can't use S3FS module with H5P. Not sure about the new 2.0 Beta.

keiserjb’s picture

Running into this problem, wondering if anyone has solved it.

Youcanlearnit’s picture

Has anyone yet been able to user H5P with S3 or R2 ?

Quick glance at H5P's code it appears it is hard coded to use public:// and H5P assumes that public:// is local to the server. H5P make several calls similar to code> \Drupal::service('file_system')->realpath('public://');.

Drupal API documentation for realpath():
Only use this function if you know that the stream wrapper in the URI uses the local file system, and you need to pass an absolute path to a function that is incompatible with stream URIs.
S3FS does not support realpath() as it is a remote stream.

This can only be fixed inside of the H5P module.

keiserjb’s picture

I spent all day trying things that didn't work. I'm running the h5p 2.0.0-alpha2 version in Drupal 9.3.18.

rex.barkdoll’s picture

Could the maintainers update the version of this request for the 2.X version of the module? This is still a relevant problem and shouldn't be forgotten about as we move into the future.

Our situation is that we run a pretty lean server for our website and do our file storage on S3. We managed to max out our server storage by uploading some courses before we realized that this module doesn't follow the best practices - using Drupal's file storage system. I'm having a hard time seeing how H5P can ever be scalable in its current state.

For others looking into this issue, here are some links all relating directly to this problem:
The issue on H5P.org: https://h5p.org/node/1189#comment-48933
The other H5P Drupal.org issue: https://www.drupal.org/project/h5p/issues/2955095
Here's the H5P Jira ticket related to this issue: https://h5ptechnology.atlassian.net/browse/HFP-801

jukka792’s picture

I solved it, just dont use S3 at all. Create your own scalable filesystem, and mount it to your Drupal application servers. Thats maybe not so cheap solution but at least it is not AWS related.