Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

FileSizeExceededError causes connection reset in gunicorn

Abierto
#596 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
python
Área
api, backend

Línea de trabajo

Reproduce el fallo con emu usando --maxsingleinputsize 1mb y, a continuación, compara werkzeug.serving.run_simple con gunicorn --bind=0.0.0.0:5000 finch.wsgi:application; el ejemplo de cliente usa birdy y una entrada NetCDF grande. Traza cómo se gestiona FileSizeExceededError a través de gunicorn, nginx y twitcher, y considera resuelto el problema cuando una entrada demasiado grande devuelve la excepción legible esperada en lugar de restablecer la conexión o producir BrokenPipeError.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Description

Might not be the best issue title, I'm not quite sure what is happening myself. When I "push" a file that is too large as an input, the "File size for input exceeded" message is readable when I am using the basic server (a pywps Service through werkzeug.serving.run_simple). However, when using gunicorn, the connexion is reset and the client fails with ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')), coming from the request package.

I have another setup, where the pywps service is launched the same way (with gunicorn), but is also behind nginx and twitcher (see comment below). In that case, I did receive a proper Exception xml, but not the good one:

<Exception exceptionCode="NoApplicableCode" locator="NotAcceptable">
        <ExceptionText>Request failed: (&#x27;Connection aborted.&#x27;, BrokenPipeError(32, &#x27;Broken pipe&#x27;))</ExceptionText>
</Exception>

Note that this other server is on another machine, while my first simple setup has the client and server on the same machine. Also, I am able to bypass nginx and twitcher on the second setup, which gave me the exact same error as my simple local setup : ConnectionResetError.

I am in fact using finch (https://github.com/bird-house/finch) as the pyWPS Service. The simple run_simple server is actually taken from emu (https://github.com/bird-house/emu/).
I am using birdy and owslib for the client side.

Environment

  • operating system: Linux
  • Python version: 3.8
  • PyWPS version: 4.4.0
  • source/distribution
  • git clone
  • Debian
  • PyPI
  • zip/tar.gz
  • other (please specify):
  • web server
  • Apache/mod_wsgi
  • CGI
  • other (please specify): werkzeug.serving.run_simple when it works, gunicorn when it doesn't.

Steps to Reproduce

This is the simplest way I can think of to reproduce the bug, but it involves emu and birdy. Sorry I am still a noob in this wps thing.

Server. With emu installed, in a terminal:

emu start --maxsingleinputsize 1mb

Client. With birdy installed, in a python session:

from birdy import WPSClient

wps = WPSClient('http://127.0.0.1:5000')
wps.inout(dataset="path/to/a/netcdf/file/larger/than/a/few/MBs")

Additional Information

(*) @tlvu Can you give basic details on how your dev server is different from me calling gunicorn --bind=0.0.0.0:5000 finch.wsgi:application in a terminal? EDIT: Added some info relating to that different setup.

Lenguaje dominante
Python
Estrellas
186
Forks
117
Merge medio
17 d 23 h
PR fusionados (30 d)
1

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de geopython/pywps

Todos los issues de geopython/pywps

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.