Pylons / waitress

Waitress - A WSGI server for Python 3
https://docs.pylonsproject.org/projects/waitress/en/latest/
Other
1.44k stars 164 forks source link

Memory Errors after several runs using Waitress 2.0.0 #348

Closed hurricanetechnology closed 3 years ago

hurricanetechnology commented 3 years ago

I am using waitress 2.0.0 via a proxy service on AWS Windows Sever 2019.

The Flask service waitress serves uses the Parseltmouth phonetic library which takes "mp3" or "wav" files and produces, in my case, output graphics using matplotlib.


Here are the project's libraries used:

appdirs==1.4.4 appnope==0.1.2 argon2-cffi==20.1.0 async-generator==1.10 attrs==20.3.0 backcall==0.2.0 bleach==3.3.0 certifi==2020.12.5 cffi==1.14.5 click==7.1.2 cycler==0.10.0 decorator==5.0.7 defusedxml==0.7.1 distlib==0.3.1 entrypoints==0.3 filelock==3.0.12 Flask==1.1.4 ipykernel==5.5.3 ipython==7.23.0 ipython-genutils==0.2.0 ipywidgets==7.6.3 itsdangerous==1.1.0 jedi==0.18.0 Jinja2==2.11.3 joblib==1.0.1 jsonschema==3.2.0 jupyter==1.0.0 jupyter-client==6.1.12 jupyter-console==6.4.0 jupyter-core==4.7.1 jupyterlab-pygments==0.1.2 jupyterlab-widgets==1.0.0 kiwisolver==1.3.1 MarkupSafe==2.0.1 matplotlib==3.4.2 matplotlib-inline==0.1.2 mistune==0.8.4 nbclient==0.5.3 nbconvert==6.0.7 nbformat==5.1.3 nest-asyncio==1.5.1 notebook==6.3.0 numpy==1.20.3 packaging==20.9 pandas==1.2.4 pandocfilters==1.4.3 parso==0.8.2 pexpect==4.8.0 pickleshare==0.7.5 Pillow==8.2.0 praat-parselmouth==0.4.0 prometheus-client==0.10.1 prompt-toolkit==3.0.18 ptyprocess==0.7.0 pycparser==2.20 Pygments==2.8.1 pyparsing==2.4.7 pyrsistent==0.17.3 python-dateutil==2.8.1 pytz==2021.1 pyzmq==22.0.3 qtconsole==5.0.3 QtPy==1.9.0 scikit-learn==0.24.2 scipy==1.6.3 seaborn==0.11.1 Send2Trash==1.5.0 six==1.15.0 terminado==0.9.4 testpath==0.4.4 threadpoolctl==2.1.0 tornado==6.1 traitlets==5.0.5 virtualenv==20.4.6 wcwidth==0.2.5 webencodings==0.5.1 Werkzeug==1.0.1 widgetsnbextension==3.5.1

What I notice is that after running waitress several times, numpi and other components say they no longer have the memory to allocate. Other times after multiple waitress, I just get a flat-out memory error. Restarting waitress temporarily fixes the issue, but I cannot use waitress in production. If there is a workaround for the high memory usage or failure to de-allocate memory, I would be happy to try an interim build with my development project. Please let me know if I can offer any other additional information. Thanks,

stevepiercy commented 3 years ago

There's not much we can do without a reproducible example, stack trace, or error logs.

mmerickel commented 3 years ago

This isn't about a bug in waitress without further information. Rather a memory leak in usage of libraries in the WSGI application. I'd suggest looking at tools like memory_profiler and the mailing lists where more users may be able to offer suggestions but it's really hard to help with memory leak issues without reproducible examples.

hurricanetechnology commented 3 years ago

If you let me know how to create the error logs you need, I will be happy to do that. Since this is a runtime error, there's no "stacktrace" that I'm aware of other than the error that appear in the command window. I'm sorry you closed this item as I'm still "open" to helping. :)