mongoose max post filesize override?

35 views
Skip to first unread message

Robert Ross

unread,
Sep 13, 2024, 6:16:29 PM9/13/24
to PHP Desktop
when dropping files into php desktop app, regardless of php.ini settings (seemingly), the server disconnects uploads at roughly the 3gb that is apparently mongoose's default max post size limit.

files below 3gb drop in just fine, but best case scenario with files over 3gb the upload gets terminated with error code:

577 err_connection_aborted

is there a way to override this limit with the webserver itself in settings.json or somewhere that i'm missing?

thanks!
-rob

phpdesktop-chrome_Ush4fdsqGH.png

Andrew Quaye

unread,
Sep 22, 2024, 2:11:38 AM9/22/24
to PHP Desktop
The issue you're encountering stems from the Mongoose web server, which has a default maximum POST size limit of about 3 GB. This is independent of PHP settings, and even if you adjust values in `php.ini`, Mongoose's internal limits will still cause uploads larger than 3 GB to be terminated.

To resolve this issue, you need to modify Mongoose's configuration to override the 3 GB limit. Here's what you can try:

1. Locate the `settings.json` or Mongoose configuration file:
   - This file should be part of your PHP desktop app. If you don't have it, check the Mongoose documentation for where configuration settings can be applied or create one if possible.

2. Increase the max POST size in the configuration:
   - Add or modify the `"max_post_size"` setting in `settings.json` (or the relevant Mongoose config file) to allow larger file uploads. For example:
   
   json
   {
     "max_post_size": "5G"
   }
   ```

3.Restart the server:
   - After making the changes, restart your PHP desktop app to apply the new settings.

4. Alternative solution - Mongoose Upgrade:
   - If you're unable to modify the setting or it doesn't exist in your version, consider updating to a newer version of Mongoose (if you haven't done so already), as newer versions may have better support for configuring such limits.

If these steps don't solve the issue, let me know, and we can explore further configurations or alternatives, like switching to a different lightweight web server if possible.
Reply all
Reply to author
Forward
0 new messages