<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-text-flowed" style="font-family: -moz-fixed;
font-size: 12px;" lang="x-unicode">
<br>
Am 02.10.2018 um 23:39 schrieb Geert Stappers:
<br>
<blockquote type="cite" style="color: #000000;">On Tue, Oct 02,
2018 at 05:05:47PM +0200, Michael Bayer wrote:
<br>
<blockquote type="cite" style="color: #000000;">Hi everyone,
<br>
<br>
I discovered a funny behavior of my flask app, when running on
ARM
<br>
based apache wsgi servers. Could you please give me some hints
to
<br>
debug this? <span class="moz-smiley-s1" title=":-)"></span>
<br>
<br>
I have a flask application, that supports file upload.
<br>
It runs on an ARM based debian stable server with apache wsgi.
<br>
If I upload small files, everything is fine. The problem
appears,
<br>
when I upload files with a file size >64kb. The famous "Bad
request
<br>
- The browser (or proxy) sent a request that this server could
not
<br>
understand." pops up.
<br>
<br>
Things I tried out so far:
<br>
- Deploying my flask app to my productive ARM based webserver
(debian
<br>
stable): Here I discovered the issue.
<br>
- Running in flask's development wsgi server on my Development
PC:
<br>
No problem, I can upload files with any size I want.
<br>
- Clean debian stable installation in a virtualbox on my
Development
<br>
PC (AMD64) same packages as my productive server, but AMD64
instead
<br>
of armhf (apache, mod_wsgi): Again no problems at all.
<br>
- Clean installation of raspian on a spare ARM Raspberry Pi
(based on
<br>
debian 9) with apache, mod_wsgi: Here comes the problem
again!
<br>
- Increase apache LogLevel to debug -> no error logged
<br>
- Activate FileLogging inside my flask app -> no error
logged
<br>
<br>
Have you seen anything like this?
<br>
</blockquote>
No.
<br>
<br>
Thing that intriges me, is that 64K is a 16-bit limit.
<br>
ARMHF versus AMD64 is 32-bit vs 64-bit ...
<br>
</blockquote>
Thanks for your answer!
<br>
Yes, this is strange. I also don't have an explanation
<br>
<blockquote type="cite" style="color: #000000;">
<br>
<blockquote type="cite" style="color: #000000;">I unfortunately
do not have much experience with web servers/development
<br>
so I'm stuck with my debugging approaches :/
<br>
<br>
What could I do besides that?
<br>
</blockquote>
Consider it a none flask problem, it will allow you to look at
Apache,
<br>
uWSGI, Python and other links in the chain. Is a webproxy
involved??
<br>
</blockquote>
<br>
There is no proxy in the network.
<br>
<br>
<br>
<blockquote type="cite" style="color: #000000;">
<blockquote type="cite" style="color: #000000;">What information
do you need from my side?
<br>
I can provide any code/configuration you need.
<br>
</blockquote>
That will help reproducing the problem.
<br>
</blockquote>
I created a minimal example to reproduce the error:
<br>
<a class="moz-txt-link-freetext"
href="https://github.com/mjbayer/flask-upload-issue-arm">https://github.com/mjbayer/flask-upload-issue-arm</a>
<br>
<br>
This repo contains code, configuration and example files that can
be used for upload.
<br>
<br>
Here is a demo Raspberry Pi (just for that purpose) to try it out:
<br>
<a class="moz-txt-link-freetext"
href="http://rgb.mjbayer.de/trackdb/">http://rgb.mjbayer.de/trackdb/</a>
<br>
(I could also give ssh access to the Raspi if required)
<br>
<br>
If you run the code in flasks development wsgi server or apache
mod_wsgi on AMD64, you will not see the issue.
<br>
<br>
<br>
Michael
<br>
<br>
</div>
</body>
</html>