FileSizeExceededError causes connection reset in gunicorn
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
Riproduci il malfunzionamento con emu usando --maxsingleinputsize 1mb, quindi confronta werkzeug.serving.run_simple con gunicorn --bind=0.0.0.0:5000 finch.wsgi:application; l’esempio del client usa birdy e un input NetCDF di grandi dimensioni. Traccia come viene gestito FileSizeExceededError tramite gunicorn, nginx e twitcher, e considera il problema risolto quando un input troppo grande restituisce l’eccezione leggibile prevista invece di reimpostare la connessione o produrre BrokenPipeError.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Python
- Stelle
- 186
- Fork
- 117
- Merge medio
- 17g 23h
- PR unite (30g)
- 1
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di geopython/pywps
-
ReadTheDocs OAuth App InstallationForse di nuovo libera @tomkralidis l’ha presa 85 giorni fa e non c’è nessuna pull request aperta. Apertadocumentation
-
Modernizing the packaging of the libraryForse di nuovo libera @Zeitsperre l’ha presa 298 giorni fa e non c’è nessuna pull request aperta. Apertadocumentation enhancement packaging
-
DBLog test are bound to other testForse già presa @C1-BA-B1-F3 l’ha presa 10 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 45/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
-
ComplexOutput data as reference always generates a file named "input.csv", should be "output".Forse già presa @C1-BA-B1-F3 l’ha presa 10 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
Tutte le issue di geopython/pywps
Issue simili
-
python triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
microsoft/semantic-kernel#14590 ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
pinterest/pymemcache#662 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 Mezza giornata Idoneità per principianti 62/100
gnocchixyz/gnocchi#1527 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
tenstorrent/tt-model-manager#181 ·
I maintainer di solito rispondono entro 1 giorno