Slow DJango 1.4 with timeouts on Helicon Zoo

Repository of web frameworks and applications for Microsoft IIS.
User avatar
Posts: 56
Joined: 01 Nov 2013, 01:50

Slow DJango 1.4 with timeouts on Helicon Zoo

27 Mar 2014, 00:54

We finally done migrating to Helicon Zoo on Windows 2012 (from ISAPI 2008).
The problem is that users complain about random slowdowns and timeouts with the application.

From reading through the net, it seem to be a known problem with Python 32 bit running on top of Windows 2012 64-bit.
Any plans to switch to the 64-bit version? Otherwise, any idea what else I can check?

(Just to note, the problem is not entirely Zoo related, as runserver also gives same slow results).

Thanks in advance!

User avatar
Posts: 110
Joined: 07 Mar 2012, 10:22

Re: Slow DJango 1.4 with timeouts on Helicon Zoo

27 Mar 2014, 07:34

Hello,

you can try to install and use Python x64 by himself:

1. Install Python x64
2. Create custom Zoo engine for wsgi apps on Python x64
3. Update engine in app web.config and recreate app virtualenv with Python x64 executable.

Example of custom Zoo engine:

Code: Select all
<heliconZooServer>
  ...
  <userEngines>
    <clear />
    <add name="python.x64.2.7.wsgi" displayName="Python x64 2.7 wsgi"
            fullPath="%SystemDrive%\python27x64\python.exe" arguments="%SystemDrive%\Zoo\Workers\python\zoofcgi.py"
            transport="NamedPipe" protocol="fastcgi" portLower="49152" portUpper="65535"
            maxInstances="0" minInstances="1" timeLimit="0" gracefulShutdownTimeout="30" memoryLimit="0">
      <environmentVariables>
        <clear />
      </environmentVariables>
    </add>
  </userEngines>
</heliconZooServer>


Thanks!

User avatar
Posts: 110
Joined: 07 Mar 2012, 10:22

Re: Slow DJango 1.4 with timeouts on Helicon Zoo

27 Mar 2014, 08:40

Could you please also clarify how the slowdown occurs. Does it happen for the first request only? Or does it happen sporadically? Or is it simply low RPS? Are all processor cores heavily loaded?

User avatar
Posts: 56
Joined: 01 Nov 2013, 01:50

Re: Slow DJango 1.4 with timeouts on Helicon Zoo

27 Mar 2014, 10:21

Forgot to mention - the CPU is the leading cause for that.

As we running the systems on Amazon AWS, we see their memory-oriented instances practically over-consumed by the CPU.
Switching to CPU-oriented instances helps a bit, but we still see the cores being filled up to 80%-90% by python.exe process usage on every request.
Last edited by SyRenity on 27 Mar 2014, 10:25, edited 1 time in total.

User avatar
Posts: 56
Joined: 01 Nov 2013, 01:50

High CPU usage on DJango 1.4 with timeouts on Helicon Zoo

27 Mar 2014, 10:24

Ruslan wrote:Could you please also clarify how the slowdown occurs. Does it happen for the first request only? Or does it happen sporadically? Or is it simply low RPS? Are all processor cores heavily loaded?



* The slow-downs are caused by high CPU usage, consuming up to 80%-90% of the available CPU time
* It happens on every request, every-time
* All available processor cores become overloaded

User avatar
Posts: 56
Joined: 01 Nov 2013, 01:50

Re: Slow DJango 1.4 with timeouts on Helicon Zoo

31 Mar 2014, 19:50

Switching to 64-bit solved the issue! Apparently the double-virtualization (64-bit WOW -> AWS Xen) has caused the issues.

Any idea how it's possible to install just the Zoo modules, without the Python as well?
Also, a VERY good idea will be to ship 64-bit Python version with Zoo, this problem might happen on any AWS EC machine.

User avatar
Posts: 110
Joined: 07 Mar 2012, 10:22

Re: Slow DJango 1.4 with timeouts on Helicon Zoo

01 Apr 2014, 06:02

Thank you for reporting! We plan to add Python x64 in Zoo feed later.

> Any idea how it's possible to install just the Zoo modules, without the Python as well?

Just install 'Zoo Module' product in Web Platform Installer, not Python Hosting Package.

User avatar
Posts: 56
Joined: 01 Nov 2013, 01:50

Re: Slow DJango 1.4 with timeouts on Helicon Zoo

01 Apr 2014, 08:00

Thanks.

Return to Helicon Zoo

Who is online

Users browsing this forum: No registered users and 32 guests