• Resolved j2fb

    (@j2fb)


    Hi,

    We are having an issue with our WooCommerce store.

    We sell digital downloads of various file sizes (anywhere from 10 MB to 4 GB), and we often get customers complaining that the downloads crashed mid-way and that they are unable to complete the download process.

    It seems the downloads often fail when the file is quite large (for example 1 GB or more). But they don’t fail all the time, so it seems to be dependent on the customers Internet speed (and thus on the duration of the download). Also, after the customer complains, we manually send a direct download link to the file to the customers, and this always works just fine (this means the problem only occurs with the download links generated by WooCommerce).

    We use the X-Accel-Redirect/X-Sendfile option in WooCommerce to serve downloads (we want to keep this option to keep the file URLs hidden on our server). Our hosting provider is Cloudways on DigitalOcean (4GB ram).

    Has anyone been able to solve this issue? Is it a matter of changing the configuration of PHP on the server, or do we just need to increase our server CPU or RAM?

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hey there, @j2fb! Thanks for contacting us. I’m happy to help you.

    As mentioned in our?guide, WooCommerce itself has no limitation on the maximum file size. So limitations usually come from the host.


    The?PHP memory_limit?and?max_execution_time?settings might indirectly restrict very large downloads, or it could be due to the server’s bandwidth limit.
    Have you checked with your host if there’s anything limiting the download? If you didn’t, please do so they can take a look at this ??

    Please let us know how it goes.

    Have a wonderful day!

    Stef

    (@serafinnyc)

    Hello @j2fb RAM isn’t the real culprit here it’s the CPU in processing your request. Most hosts have a kill switch on all servers to kill a process that takes longer than the time its set to. The server that is. So if you have 30 people on the site requesting access to the same file at the same time. Guess what. Boom. Your down.

    That will crash the server 100%. If you are on a shared hosting account then you really need to upgrade your CPU and your PHP Workers. I’d advise if you’re on 4 CPUs now, then upping that to at least 8 and I would offload any and all assets to a bucket so to not take away any resources.

    I can’t recall what Cloudways has for Workers but I’d be around 6 to 8 on those as well. They may also suggest adding or requiring you upgrade to a REDIS account as well. And I would agree that too.

    Know as your business scales, so do your servers. Think of that scene in The Social Network where he says, we need more servers the site is growing. Same applies to everyone.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.