I have OSQA script running on Windows 2008/MySQL with Python via Helicon Zoo. When I open it via web, each single user/browser causes Python.exe process to work really hard. When I open 15-20 browsers, the CPU loads almost 100% (see attachments). I have a fast 8-core CPU but each open browser uses up the whole core.

It worked fast enough in the beginning (I had 2-3 questions) but it's now very slow when I have 20+ questions. The homepage with the list of questions is especially slow - it takes 30+ seconds to load.

One browser open: alt text

15+ browsers open: alt text

asked 18 Jul '11, 23:40

osqa81's gravatar image

osqa81
56359
accept rate: 0%

edited 18 Jul '11, 23:42

2

Thanks for the hint. I added a special "web.config" inside /m/ folder so that static files are processed via IIS, not Python/Django. It reduced the load significantly.

(19 Jul '11, 02:31) osqa81

Also, you should start using memcached if not using it yet. Will help a lot.

(19 Jul '11, 07:22) Hernani Cerq... ♦♦

The problem returned :(

(19 Jul '11, 07:41) osqa81

I know its easy to blame OSQA, neither microsoft, or the python people, or even the django people would give much attention to your problem, but I can assure you its not OSQA's fault. The server where this site is running has several OSQA sites running on it, one of which with near 20k questions!! There is also jira and fisheye, etc, all running in this server.

(19 Jul '11, 07:50) Hernani Cerq... ♦♦

Didn't mean to blame anybody. Just looking for a solution specific to my situation. I guess every bit of technology contributes to the problem.

(19 Jul '11, 08:45) osqa81

Are you using anything like wsgi but for windows? Right now it looks like you're having to spawn a separate python process for each request. This likely isn't going to work real well and will chew into the processors for each request.

(19 Jul '11, 10:41) matt ♦♦
showing 5 of 6 show 1 more comments

You must have something seriously wrong in your config. We routinely run OSQA sites with 10,000+ questions and operate with near-zero average loads.

link

answered 18 Jul '11, 23:56

rickross's gravatar image

rickross ♦♦
12.5k2914972
accept rate: 46%

Please check this article and find "Static content" chapter. This is usual case when Python is trying to operate on every static file, causing every request running as tens or hundreds requests. Thy to apply static content fix form the article.

link

answered 20 Jan, 14:27

govorunov's gravatar image

govorunov
464
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×25
×1

Asked: 18 Jul '11, 23:40

Seen: 452 times

Last updated: 20 Jan, 14:27

powered by OSQA