Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Python app CPU usage

Discussion in 'Workarounds and Optimization' started by TragedyStruck, Apr 8, 2019.

  1. TragedyStruck

    TragedyStruck Registered

    Joined:
    Aug 11, 2017
    Messages:
    3
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Sweden
    cPanel Access Level:
    Website Owner
    I've recently deployed a Python app (Flask+Marshmallow) to my web host which runs cPanel. My understanding is this runs through Passenger, however I don't have access to (as far as I know) the configuration for Passenger.

    Looking at my general cPanel dashboard I now see increasing CPU usage for each new user of my Python app, and I'm slightly worried that I might hit some sort of problem very soon if this continues. It might be that I am wrong, given that I'm not very sure of how Passenger is set up and how it functions.

    * Will Passenger+Python automatically "cap out" gracefully, simply limiting my apps performance, or might I get some other type of problem?

    * Does Passenger+Python create a new process for each request, or does it reuse processes if they are not currently processing any request?

    * Might it be that currently my CPU usage is high because it quickly got up to Passengers "max pool size" in terms of processes, and It'll flat out the increase in CPU usage, or can I expect CPU usage to keep rising for each new user (adding more requests towards my app endpoints)?

    I'm kind of looking both for tips on increasing performance, as well as an explanation to why I'm seeing very high CPU usage (70%++) with not that many requests (IMO), at lets for example say 2-3 per second. Clearly I was expecting this kind of CPU usage at WAY more than a couple requests per seconds.
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,009
    Likes Received:
    2,123
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @TragedyStruck,

    Are you using a feature called Setup Python App in cPanel? If so, this is a third-party plugin offered as part of CloudLinux:

    CloudLinux - Main | New template

    CloudLinux documents more information about this feature on the link below:

    Python and Ruby Selector

    I recommend contacting your web hosting provider for more information about how they have configured the plugin and any of the corresponding CloudLinux usage limits. Let us know the outcome if possible.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice