python-flask icon indicating copy to clipboard operation
python-flask copied to clipboard

Running via flask run hangs forever

Open ror6ax opened this issue 7 years ago • 3 comments
trafficstars

As a workaround, one could run python3 server.py. I suppose it's a side effect of https://github.com/jaegertracing/jaeger-client-python/issues/50.

ror6ax avatar May 14 '18 12:05 ror6ax

@carlosalberto - any ideas why this may be a thing?

ror6ax avatar May 29 '18 13:05 ror6ax

@ror6ax I don't have much experience with Jaeger myself, but will take a look later today ;)

carlosalberto avatar May 29 '18 14:05 carlosalberto

I had the same issue. Pywren's map function appears to use Threadpool. It doesn't appear that Flask is designed for this. One workaround is to put your pywren code into a script and run with subprocess. E.g.: pw_output = subprocess.check_output(["python", "run_pw.py", args])

Celery seems like it may work but I haven't got around to trying it.

dbernardoj avatar Aug 16 '19 01:08 dbernardoj