Forums

Subject: Performance Issue with Deployed Application on PythonAnywhere

Dear PythonAnywhere Support Team,

I hope this message finds you well. I am experiencing performance issues with my application deployed on PythonAnywhere, and I would appreciate your assistance in resolving this matter.

My application runs smoothly on my local windows machine with 16 workers, but it is considerably slower when running on PythonAnywhere, where I only have access to 3 workers under my current plan. To provide more context, here are some details about my application:

It is a Flask app that uses the Dash library. The app relies on external APIs and databases. It is currently deployed with the following plan features:

CPU time per day: 4000 seconds Number of web apps: 1 Number of web workers: 3 Number of always-on tasks: 1 Disk space: 5 GB

I have tried to optimize my application as much as possible, but the performance issues persist. I would appreciate it if you could help me identify any potential causes for this slowdown on PythonAnywhere and suggest possible solutions, such as upgrading to a plan with more workers or optimizing my application to better work with the limited resources available.

Specifically, I would like to know if you can provide information on the following:

Are there any known issues with Flask or Dash applications on PythonAnywhere that could cause performance problems? Can you provide insights into the resource usage of my application (CPU, memory) and let me know if it is within the acceptable limits for my plan? Is there any network latency between my application and the external APIs/databases it relies on? Are there any server-side configurations or optimizations I should be aware of to improve the performance of my application on PythonAnywhere, given the limited number of workers? I understand that performance can be affected by various factors, but I would appreciate any guidance you can provide in identifying the root cause of this issue. Your expertise would be invaluable in helping me optimize my application for the production environment.

Thank you in advance for your assistance. I look forward to hearing from you soon.

Best regards,

Daniel