⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 267354 in webkit


Ignore:
Timestamp:
Sep 21, 2020, 12:31:35 PM (6 years ago)
Author:
commit-queue@webkit.org
Message:

Increase the maximum number of open files for wpt's servers
https://bugs.webkit.org/show_bug.cgi?id=215829

Patch by Sam Sneddon <Sam Sneddon> on 2020-09-21
Reviewed by Youenn Fablet.

macOS has a much lower limits than other OSes by default, and the iOS bots often run into it with their level of parallel test execution. This bumps the limit for each wptserve process up to 2048, which is double the limit on Debian, and should probably be safe.

  • web-platform-tests/tools/serve/serve.py:

(ServerProc.create_daemon):

Location:
trunk/LayoutTests/imported/w3c
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r267333 r267354  
     12020-09-21  Sam Sneddon  <gsnedders@apple.com>
     2
     3        Increase the maximum number of open files for wpt's servers
     4        https://bugs.webkit.org/show_bug.cgi?id=215829
     5
     6        Reviewed by Youenn Fablet.
     7
     8        macOS has a much lower limits than other OSes by default, and the iOS bots often run into it with their level of parallel test execution. This bumps the limit for each wptserve process up to 2048, which is double the limit on Debian, and should probably be safe.
     9
     10        * web-platform-tests/tools/serve/serve.py:
     11        (ServerProc.create_daemon):
     12
    1132020-09-20  Sam Weinig  <weinig@apple.com>
    214
  • trunk/LayoutTests/imported/w3c/web-platform-tests/tools/serve/serve.py

    r262312 r267354  
    99import os
    1010import platform
     11import resource
    1112import signal
    1213import socket
     14import subprocess
    1315import sys
    1416import threading
     
    417419    def create_daemon(self, init_func, host, port, paths, routes, bind_address,
    418420                      config, **kwargs):
     421        if sys.platform == "darwin":
     422            # on Darwin, NOFILE starts with a very low limit (256), so bump it up a little
     423            # by way of comparison, Debian starts with a limit of 1024, Windows 512
     424            maxfilesperproc = int(subprocess.check_output(
     425                ["sysctl", "-n", "kern.maxfilesperproc"]
     426            ).strip())
     427            soft, hard = resource.getrlimit(resource.RLIMIT_NOFILE)
     428            # 2048 is somewhat arbitrary, but gives us some headroom for wptrunner --parallel
     429            # note that it's expected that 2048 will be the min here
     430            new_soft = min(2048, maxfilesperproc, hard)
     431            if soft < new_soft:
     432                resource.setrlimit(resource.RLIMIT_NOFILE, (new_soft, hard))
    419433        try:
    420434            self.daemon = init_func(host, port, paths, routes, bind_address, config, **kwargs)
Note: See TracChangeset for help on using the changeset viewer.