FileSizeExceededError causes connection reset in gunicorn
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
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: ('Connection aborted.', BrokenPipeError(32, 'Broken pipe'))</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_simplewhen it works,gunicornwhen 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
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de geopython/pywps
-
ReadTheDocs OAuth App InstallationQuizá libre de nuevo @tomkralidis la tomó hace 83 días y no hay ningún pull request abierto. Abiertodocumentation
-
Modernizing the packaging of the libraryQuizá libre de nuevo @Zeitsperre la tomó hace 296 días y no hay ningún pull request abierto. Abiertodocumentation enhancement packaging
-
DBLog test are bound to other testPosiblemente ocupada @C1-BA-B1-F3 la tomó hace 8 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 45/100
-
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
-
ComplexOutput data as reference always generates a file named "input.csv", should be "output".Posiblemente ocupada @C1-BA-B1-F3 la tomó hace 8 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
Todos los issues de geopython/pywps
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
vllm-project/vllm#61131 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
kubernetes-client/python#2735 ·
Los mantenedores suelen responder en 1 día
-
desktop help wanted test
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Broken links found in docsAbiertodocs pydanty:is-working
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
pydantic/pydantic-ai#10113 ·
Los mantenedores suelen responder en 1 día
-
Tutorial unit test leaks sample data into tutorial doctestPosiblemente ocupada @Gambit-Checkmate la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100