Forums

Clarification on Web workers and Memory Limit

The pythonanywhere website states the following:

"Because system RAM is one of the most scarce resources on the PythonAnywhere servers, we limit your processes to a maximum in-memory size of 3GB. This is a per-process limit, not a system-wide one, so if you have larger memory needs, you may be able to do the processing you need by running multiple smaller processes."

I am looking for clarification if each web worker is allocated 3 GB of RAM, or if the web app is allocated 3 GB of RAM.

It's per-worker limit. Each worker is a separate process.

@fjl does each web app have a limit on concurrent HTTP requests? Each worker on my server makes a request to an external aws instance and returns that data to the user. It appears that those wait times pertaining to the aws requests have high variability. The performance of my web app doesn't scale linearly with the amount of workers that I add.

Yes -- each web app can handle simultaneously as many requests as it has available workers. See this help page as well.