A WSGI server that handles concurrent requests in separate forked processes. Use :func:`make_server` to create a server instance.
| 878 | |
| 879 | |
| 880 | class ForkingWSGIServer(ForkingMixIn, BaseWSGIServer): |
| 881 | """A WSGI server that handles concurrent requests in separate forked |
| 882 | processes. |
| 883 | |
| 884 | Use :func:`make_server` to create a server instance. |
| 885 | """ |
| 886 | |
| 887 | multiprocess = True |
| 888 | |
| 889 | def __init__( |
| 890 | self, |
| 891 | host: str, |
| 892 | port: int, |
| 893 | app: WSGIApplication, |
| 894 | processes: int = 40, |
| 895 | handler: type[WSGIRequestHandler] | None = None, |
| 896 | passthrough_errors: bool = False, |
| 897 | ssl_context: _TSSLContextArg | None = None, |
| 898 | fd: int | None = None, |
| 899 | ) -> None: |
| 900 | if not can_fork: |
| 901 | raise ValueError("Your platform does not support forking.") |
| 902 | |
| 903 | super().__init__(host, port, app, handler, passthrough_errors, ssl_context, fd) |
| 904 | self.max_children = processes |
| 905 | |
| 906 | |
| 907 | def make_server( |