An app that hangs is most often because a third party Python package is used 
which has a C extension which hasn’t been implemented properly so it works with 
sub interpreters. You need to ensure your application runs in the main Python 
sub interpreter. See:

https://modwsgi.readthedocs.io/en/develop/user-guides/application-issues.html#python-simplified-gil-state-api
 
<https://modwsgi.readthedocs.io/en/develop/user-guides/application-issues.html#python-simplified-gil-state-api>

If you don’t have direct access to change the Apache config with EB, you will 
need to work out what the equivalent is for setting:

    WSGIApplicationGroup %{GLOBAL}

Graham

> On 14 Jan 2020, at 10:55 pm, Fabrice Triboix <[email protected]> wrote:
> 
> Hi everyone,
> 
> I tried to find some articles online to help me, but I can't find anything 
> about my specific problem, except for a couple of unanswered questions on 
> SO...
> 
> So my Flask-based app runs fine on its own, but when I try to run it in 
> Elastic Beanstalk, it hangs. 
> I located the line of code which hangs, which is: `from profanity_check 
> import predict_prob`
> 
> Because it hangs only when I run it in EB, I need to be enable some kind of 
> debugging at WSGI level. I found many resources about how to deal with 
> crashes and stack traces, but what I need is be able to trace where exactly 
> the app is hanging, as I can't instrument a library such as profanity_check. 
> I was thinking of using the `trace` module to print out every single line of 
> code that is executed, but I don't know how to do that through WSGI....
> 
> Any help would be greatly appreciated!
> 
>   Fabrice
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "modwsgi" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/modwsgi/86e19829-e128-45ed-9212-0da51e61ba17%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/modwsgi/86e19829-e128-45ed-9212-0da51e61ba17%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/modwsgi/FE604B73-C407-4502-B34C-766CE7CE7FD8%40gmail.com.

Reply via email to