What's new
Panelica Community Forum

Welcome to the official Panelica Community Forum — the central hub for server administrators, developers, and hosting professionals. Register a free account today to access technical discussions, product announcements, feature requests, and direct support from the Panelica team. Be part of the growing community shaping the future of server management.

Panelia updates delete custom upload limits

EvilTater

New member
Beta Access
We’ve repeatedly encountered an issue where Panelica updates or configuration regeneration appear to reset a domain’s custom Nginx upload limit.

Our configured limits were:

Nginx client_max_body_size: 1100M<br>PHP upload_max_filesize: 1024M<br>PHP post_max_size: 1100M<br>ModSecurity SecRequestBodyLimit: 1153433600
Uploads worked with those settings. However, the generated Nginx configuration later reverted to:

client_max_body_size 64M;
The reset affected both HTTP and HTTPS server blocks. PHP and ModSecurity retained their configured limits, but Nginx’s lower limit prevented a 75 MB file from uploading.

Restoring client_max_body_size to 1100M, validating the configuration, and reloading the customer Nginx service resolved the issue. An 80 MB multipart HTTPS request then passed successfully.

This regression has happened repeatedly. We suspect an update or configuration rebuild, but have not confirmed the exact trigger.

Could the Panelica team investigate and clarify:

  1. What process could reset a custom upload limit to 64M?
  2. Where should administrators configure domain limits so they survive updates, PHP version changes, and configuration rebuilds?
  3. Can the update process preserve existing administrator-defined settings and back up configurations before replacing them?
  4. Can this behavior be covered by a regression test?
If generated configuration files are intentionally replaced, please provide a documented, persistent method for custom settings that works consistently with the panel.

To clarify, this concerns server configuration settings being overwritten, not uploaded user files being changed or deleted.

Thank you.
 
Thank you for taking the time to write this up so precisely — the exact values, the fact that PHP and ModSecurity kept their settings while only Nginx reverted, and that it affected both the HTTP and HTTPS blocks. That detail narrows the search a great deal, and it is the difference between us guessing and us looking in the right place.

You are asking the right questions, and we are not going to answer them from memory. We are investigating this properly: tracing every path that writes a customer's Nginx configuration, and checking the startup repairs that run on every panel restart, so we can tell you exactly which one replaced your value rather than offering you a theory.

We will come back to this thread with:

  1. what actually resets the limit, named precisely,
  2. where an administrator can set it so it survives updates, PHP version changes and configuration rebuilds,
  3. what we are changing so a value you set is not replaced by a regeneration, and
  4. the regression test that keeps it from coming back.

Our position on the principle is simple: a setting an administrator deliberately changed should not be silently overwritten by the panel. If our configuration generator is doing that, it is our defect to fix, not a workaround for you to maintain.

In the meantime, your fix (restoring the value, validating, reloading the customer Nginx service) is the right one, and nothing else on the server is affected.

We will report back here.
 
We said we would come back with four answers rather than a theory. Here they are, and the fix is already out.

It is fixed in panelica-server 1.0.598, released on 16 November, and it is in 1.0.599 as well — so the current stable channel has it. Updating the panel is enough; there is nothing to switch on.

1. What was resetting your limit

The generated vhost always wrote its own client_max_body_size, taken from that domain's PHP post_max_size. nginx refuses a second copy of that directive in one context — "client_max_body_size" directive is duplicate — and your custom configuration is included into the same server block. So the one setting an administrator most often needs to raise was the one the custom-config editor could not carry: saving it failed validation and was rolled back.

That left only the generated file itself, and that file is rewritten by any regeneration — an SSL issue or renewal, a PHP version or limit change, an alias edit, a web-server switch, and several repairs that run when the backend starts. None of them announced it. That is why it looked random and why it kept coming back.

Your reading was right, by the way: PHP and ModSecurity kept their values because they are stored elsewhere. Only the nginx line was regenerated.

2. Where to set it so it survives

Two places, both permanent now:

  • The site's own nginx configuration — .system/conf/vhost_nginx.conf. Put client_max_body_size 1100M; there. The generated vhost now leaves the directive out when your file provides it, so your value is the only one and it survives every regeneration. This is the one to use when you want nginx higher than PHP.
  • The domain's PHP tab — post_max_size. The generated value follows it and is re-applied on every regeneration, so it persists too.

What still does not persist, by design, is editing the generated vhost by hand. It is generated; the next regeneration wins.

3. What we changed

  • The generated vhost skips its own client_max_body_size when the site's own nginx file sets it. Commented-out examples do not count, and every file the vhost_nginx.conf* include pulls in is checked, not just the first.
  • The same rule applies to subdomains.
  • When a regeneration is about to lower a limit that was raised by hand, the panel now writes a line to the log naming the old value, the new one and where to set it so it sticks. The silence was half the problem.

4. The regression test

Tests now pin each of those: the detector against a real include file, a second file in the glob, a commented-out line, a sibling subdomain's file, and the lowering warning across unit conversions (1G versus 1024M is not a reduction; 2G to 128M is). The on-disk template also carries a marker, so a server that updates from an older version has its template refreshed instead of silently keeping the old behaviour.

How it was verified

Not on a developer's laptop. We measured it on a real server, through the real regeneration path, before and after:

  • No custom file: the generated limit is written exactly as before — no change for anyone who was not affected.
  • Custom file with client_max_body_size 1100M;: the generated line is omitted, nginx -t passes, and the running configuration carries 1100M.
  • Regenerated twice more, as an SSL or PHP change would: the value is still there.
  • Commented-out directive: correctly ignored, the generated line stays — otherwise a comment would have dropped the site to nginx's 1m default.
  • A hand-raised 2G being lowered: the new log line appears and names where to put the value.
  • Repeated independently on a second account and domain.

We also checked the obvious failure next door: if you put the directive in two of your own included files, nginx still refuses the duplicate — but the panel validates before reloading, keeps the previous configuration and tells you the exact file and line, so the site stays up.

Thank you for the report. You gave us the exact values, you noticed that PHP and ModSecurity were untouched while only nginx reverted, and you said it had happened repeatedly — that is what pointed us at the generator instead of at your configuration. It was our bug, and you should not have had to find it.
 
Back
Top