Skip to content

WebTop: raise PHP-FPM workers for the WebDAV service #8212

Closed

Description

@gsanchietti

The WebDAV service of WebTop (used by CalDAV/CardDAV clients to sync calendars and contacts) runs with the default PHP-FPM worker settings: at most 5 PHP processes can serve requests at the same time. On busy installations this limit is reached several times every hour, and the system log shows this warning:

webdav[1466256]: [25-Sep-2026 11:49:46] WARNING: [pool www] server reached pm.max_children setting (5), consider raising it

When all 5 workers are busy, new sync requests from phones and desktop clients have to wait, so synchronization becomes slow or times out.

The Z-Push service (ActiveSync) had the same problem in the past and its limit was already raised to 50 workers in build-images.sh. The WebDAV container was never changed.

Proposed solution

Raise the PHP-FPM worker settings of the webtop-webdav container image, in the same way it is done for webtop-z-push in build-images.sh.

These values were tuned on a production installation and no warnings were logged anymore:

pm = dynamic
pm.max_children = 40
pm.start_servers = 20
pm.min_spare_servers = 20
pm.max_spare_servers = 30
pm.max_requests = 500

pm.max_requests = 500 restarts each worker after 500 requests, which limits memory growth of long-running workers.

Alternative solutions

  • Raise the values by hand inside the running container: the change is lost at every module update.
  • Make the values configurable per instance: more flexible, but not needed for now, since the proposed values work well for large and small installations.

Additional context

The proposed WebDAV values are a little different from the current Z-Push ones:

Setting WebDAV (default) WebDAV (proposed) Z-Push (current)
pm.max_children 5 40 50
pm.start_servers 2 20 5
pm.min_spare_servers 1 20 5
pm.max_spare_servers 3 30 35
pm.max_requests 0 (never restart) 500 0 (never restart)

More idle workers (20 at start) use more memory, even on small installations with few users.

See also

Activity

  1. self-assigned this
    on Oct 8, 2026
  2. gsanchietti commented on Oct 8, 2026

    @gsanchietti
    MemberAuthor

    Testing versions: ns8-webtop:1.5.12-testing.1

    Fresh install:

    add-module ghcr.io/nethserver/webtop:1.5.12-testing.1 1
    

    Update an existing instance:

    update-module ghcr.io/nethserver/webtop:1.5.12-testing.1 <instance>
    

    (docs)

    Test case 1: clean install

    1. Install the module with the fresh install command above and configure it.
    2. Open WebTop and check that it loads and you can log in.
    3. Add the calendar and the address book to a phone or a desktop client (CalDAV and CardDAV). Check that both sync.
    4. Open the WebDAV service log. It should show no "server reached pm.max_children" warning.

    Test case 2: update from 1.5.11

    1. Install 1.5.11, then create an event and a contact.
    2. Update to 1.5.12-testing.1 with the update command above.
    3. Check that WebTop still works and the event and contact are still there.
    4. Check that the calendar and address book still sync from the client.
    5. Check that the WebDAV service starts again after the update and its log shows no errors.

    Test case 4: new worker settings are applied

    1. Open a shell in the WebDAV container and look at the PHP-FPM pool file /usr/local/etc/php-fpm.d/www.conf.
    2. Command: runagent -m webtop1 podman exec webdav grep -E "^pm" /usr/local/etc/php-fpm.d/www.conf
    3. Check the options are configured with new values
  3. removed their assignment
    on Oct 8, 2026
  4. added
    testingPackages are available from testing repositories
    on Oct 8, 2026
  5. added this to the NethServer 8.10 milestone on Oct 8, 2026
  6. lucagasparini commented on Oct 9, 2026

    @lucagasparini

    Test cases 1-4: VERIFIED

  7. removed
    testingPackages are available from testing repositories
    on Oct 9, 2026
  8. DavidePrincipi commented on Oct 9, 2026

    @DavidePrincipi
    Member
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    verifiedAll test cases were verified successfully

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions