prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  [BUG] Internal server error @ fresh install
  ### Description
  
  Get "Internal server error" with no description after a fresh install.  Have I missed a step, or is this a bug?
  
  ### Steps to reproduce
  
  ...
  
  ### Webserver logs
  
  ```bash
  Nothing shows up using 'docker-compose logs -f'
  
  webserver_1  | [2022-08-30 23:21:18 +0000] [44] [CRITICAL] WORKER TIMEOUT (pid:47)
  webserver_1  | [2022-08-30 23:21:18 +0000] [44] [WARNING] Worker with pid 47 was terminated due to signal 6
  ```
  
  
  ### Paperless-ngx version
  
  1.8.0
  
  ### Host OS
  
  CentOS 7.9 -fully patched with latest patches
  
  ### Installation method
  
  Docker - official image
  
  ### Browser
  
  Firefox
  
  ### Configuration changes
  
  none
  
  ### Other
  
  ...
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `gunicorn.conf.py`
  Content:
  ```
  1 import os
  2 
  3 bind = f'{os.getenv("PAPERLESS_BIND_ADDR", "[::]")}:{os.getenv("PAPERLESS_PORT", 8000)}'
  4 workers = int(os.getenv("PAPERLESS_WEBSERVER_WORKERS", 1))
  5 worker_class = "paperless.workers.ConfigurableWorker"
  6 timeout = 120
  7 
  8 
  9 def pre_fork(server, worker):
  10     pass
  11 
  12 
  13 def pre_exec(server):
  14     server.log.info("Forked child, re-executing.")
  15 
  16 
  17 def when_ready(server):
  18     server.log.info("Server is ready. Spawning workers")
  19 
  20 
  21 def worker_int(worker):
  22     worker.log.info("worker received INT or QUIT signal")
  23 
  24     ## get traceback info
  25     import threading, sys, traceback
  26 
  27     id2name = {th.ident: th.name for th in threading.enumerate()}
  28     code = []
  29     for threadId, stack in sys._current_frames().items():
  30         code.append("\n# Thread: %s(%d)" % (id2name.get(threadId, ""), threadId))
  31         for filename, lineno, name, line in traceback.extract_stack(stack):
  32             code.append('File: "%s", line %d, in %s' % (filename, lineno, name))
  33             if line:
  34                 code.append("  %s" % (line.strip()))
  35     worker.log.debug("\n".join(code))
  36 
  37 
  38 def worker_abort(worker):
  39     worker.log.info("worker received SIGABRT signal")
  40
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/gunicorn.conf.py b/gunicorn.conf.py
  --- a/gunicorn.conf.py
  +++ b/gunicorn.conf.py
  @@ -1,9 +1,17 @@
   import os
   
  +# See https://docs.gunicorn.org/en/stable/settings.html for
  +# explanations of settings
  +
   bind = f'{os.getenv("PAPERLESS_BIND_ADDR", "[::]")}:{os.getenv("PAPERLESS_PORT", 8000)}'
  +
   workers = int(os.getenv("PAPERLESS_WEBSERVER_WORKERS", 1))
   worker_class = "paperless.workers.ConfigurableWorker"
   timeout = 120
  +preload_app = True
  +
  +# https://docs.gunicorn.org/en/stable/faq.html#blocking-os-fchmod
  +worker_tmp_dir = "/dev/shm"
   
   
   def pre_fork(server, worker):
  
verification_info: {"golden_diff": "diff --git a/gunicorn.conf.py b/gunicorn.conf.py\n--- a/gunicorn.conf.py\n+++ b/gunicorn.conf.py\n@@ -1,9 +1,17 @@\n import os\n \n+# See https://docs.gunicorn.org/en/stable/settings.html for\n+# explanations of settings\n+\n bind = f'{os.getenv(\"PAPERLESS_BIND_ADDR\", \"[::]\")}:{os.getenv(\"PAPERLESS_PORT\", 8000)}'\n+\n workers = int(os.getenv(\"PAPERLESS_WEBSERVER_WORKERS\", 1))\n worker_class = \"paperless.workers.ConfigurableWorker\"\n timeout = 120\n+preload_app = True\n+\n+# https://docs.gunicorn.org/en/stable/faq.html#blocking-os-fchmod\n+worker_tmp_dir = \"/dev/shm\"\n \n \n def pre_fork(server, worker):\n", "issue": "[BUG] Internal server error @ fresh install\n### Description\n\nGet \"Internal server error\" with no description after a fresh install.  Have I missed a step, or is this a bug?\n\n### Steps to reproduce\n\n...\n\n### Webserver logs\n\n```bash\nNothing shows up using 'docker-compose logs -f'\r\n\r\nwebserver_1  | [2022-08-30 23:21:18 +0000] [44] [CRITICAL] WORKER TIMEOUT (pid:47)\r\nwebserver_1  | [2022-08-30 23:21:18 +0000] [44] [WARNING] Worker with pid 47 was terminated due to signal 6\n```\n\n\n### Paperless-ngx version\n\n1.8.0\n\n### Host OS\n\nCentOS 7.9 -fully patched with latest patches\n\n### Installation method\n\nDocker - official image\n\n### Browser\n\nFirefox\n\n### Configuration changes\n\nnone\n\n### Other\n\n...\n", "before_files": [{"content": "import os\n\nbind = f'{os.getenv(\"PAPERLESS_BIND_ADDR\", \"[::]\")}:{os.getenv(\"PAPERLESS_PORT\", 8000)}'\nworkers = int(os.getenv(\"PAPERLESS_WEBSERVER_WORKERS\", 1))\nworker_class = \"paperless.workers.ConfigurableWorker\"\ntimeout = 120\n\n\ndef pre_fork(server, worker):\n    pass\n\n\ndef pre_exec(server):\n    server.log.info(\"Forked child, re-executing.\")\n\n\ndef when_ready(server):\n    server.log.info(\"Server is ready. Spawning workers\")\n\n\ndef worker_int(worker):\n    worker.log.info(\"worker received INT or QUIT signal\")\n\n    ## get traceback info\n    import threading, sys, traceback\n\n    id2name = {th.ident: th.name for th in threading.enumerate()}\n    code = []\n    for threadId, stack in sys._current_frames().items():\n        code.append(\"\\n# Thread: %s(%d)\" % (id2name.get(threadId, \"\"), threadId))\n        for filename, lineno, name, line in traceback.extract_stack(stack):\n            code.append('File: \"%s\", line %d, in %s' % (filename, lineno, name))\n            if line:\n                code.append(\"  %s\" % (line.strip()))\n    worker.log.debug(\"\\n\".join(code))\n\n\ndef worker_abort(worker):\n    worker.log.info(\"worker received SIGABRT signal\")\n", "path": "gunicorn.conf.py"}], "after_files": [{"content": "import os\n\n# See https://docs.gunicorn.org/en/stable/settings.html for\n# explanations of settings\n\nbind = f'{os.getenv(\"PAPERLESS_BIND_ADDR\", \"[::]\")}:{os.getenv(\"PAPERLESS_PORT\", 8000)}'\n\nworkers = int(os.getenv(\"PAPERLESS_WEBSERVER_WORKERS\", 1))\nworker_class = \"paperless.workers.ConfigurableWorker\"\ntimeout = 120\npreload_app = True\n\n# https://docs.gunicorn.org/en/stable/faq.html#blocking-os-fchmod\nworker_tmp_dir = \"/dev/shm\"\n\n\ndef pre_fork(server, worker):\n    pass\n\n\ndef pre_exec(server):\n    server.log.info(\"Forked child, re-executing.\")\n\n\ndef when_ready(server):\n    server.log.info(\"Server is ready. Spawning workers\")\n\n\ndef worker_int(worker):\n    worker.log.info(\"worker received INT or QUIT signal\")\n\n    ## get traceback info\n    import threading, sys, traceback\n\n    id2name = {th.ident: th.name for th in threading.enumerate()}\n    code = []\n    for threadId, stack in sys._current_frames().items():\n        code.append(\"\\n# Thread: %s(%d)\" % (id2name.get(threadId, \"\"), threadId))\n        for filename, lineno, name, line in traceback.extract_stack(stack):\n            code.append('File: \"%s\", line %d, in %s' % (filename, lineno, name))\n            if line:\n                code.append(\"  %s\" % (line.strip()))\n    worker.log.debug(\"\\n\".join(code))\n\n\ndef worker_abort(worker):\n    worker.log.info(\"worker received SIGABRT signal\")\n", "path": "gunicorn.conf.py"}]}