Forums

Slowness of mirrored project

I have 2 totally same projects (files are copied).

  • https://sadel.pythonanywhere.com/

  • https://www.hacstats.org/

Hacstats.org is very slow and some users complaints they even can't reach it. It is on my domain, so there is some other setting then CNAME change needed? Any advice welcome.

Thanks

Have you compared the traffic? Is sadel.pythonanywhere.com also used by customers or is it only for testing? Is the slowness on the www.hacstats.org something constant or only periodical? You may look at the access log and check which endpoints are being slow, maybe add some printing to the relevant views to establish which parts of code are being executed slowly. Generally there may be multiple reasons for the slowness (you may check also this help page).

OK, so it was mix of two issues.

  1. unreachability. Some people were trying to reach hacstats.org instead of www.hacstats.org. Solved by redirecting via nakedSSL.com service.
  2. speed issue was solved by reducing number of reading files in data preprocessing phase.

Thanks for help

Glad you figured that out, and thanks for sharing the solution!