-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
executable file
·40 lines (35 loc) · 1.22 KB
/
app.py
File metadata and controls
executable file
·40 lines (35 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import os
import mod_wsgi.server
"""
app.py is the file that Apache's mod_wsgi is looking for to setup the environment for the WSGI server.
It specifies the entry point seekrServer.py for the WSGI framework to find the Flask application which
should be named "application". See https://www.python.org/dev/peps/pep-0333/ for the WSGI standard
Notes
-----
Most of the default timeouts were increased to accommodate long requests
"""
mod_wsgi.server.start(
'--log-to-terminal',
'--port', '8080',
'--trust-proxy-header', 'X-Forwarded-For',
'--trust-proxy-header', 'X-Forwarded-Port',
'--trust-proxy-header', 'X-Forwarded-Proto',
'--processes', os.environ.get('MOD_WSGI_PROCESSES', '1'),
'--threads', os.environ.get('MOD_WSGI_THREADS', '10'),
'--application-type', 'module',
'--entry-point', 'seekrServer',
'--limit-request-body', '104857600',
'--request-timeout', '600',
'--socket-timeout', '600',
'--header-timeout', '120',
'--header-max-timeout', '600',
'--body-timeout', '300',
'--body-max-timeout', '600',
'--queue-timeout', '300',
'--deadlock-timeout', '300',
'--startup-timeout', '120',
'--connect-timeout', '300',
'--queue-timeout', '200',
'--graceful-timeout', '90',
'--verbose-debugging'
)