E
Erik Rose
It seems that the combination of ActivePython, ASP, and IIS is incapable
of processing multiple HTTP requests at a time. Am I insane? Is this,
perhaps, a configuration issue on my end?
Here's the test code that brought me to this conclusion:
<%@ Language = Python %>
<%
def slow():
for i in range(100000):
j = i * i;
return 'Wow, that took forever!!!';
Response.write(slow());
%>
I dumped the above into a file called slow.asp, yielding a page that
takes about 7 seconds to load. When I load slow.asp in two browser
windows approximately simultaneously, one of them loads 7 seconds after
the other. If they were running concurrently, I would expect them to
both load almost simultaneously, after about 14 seconds. I got the same
results using a time.sleep(10) call instead of the above CPU-heavy loop.
Incidentally, a similar test with ActivePerl yields the same results.
If this limitation is real, it seems to me that this setup is entirely
unsuitable for production work, since any page that makes a long-running
DB query brings all other request processing to a halt. This would
surprise me, though, given the high profile of ActiveState's products in
the IIS community. Can anybody give me some good news here? I'm striving
valiantly to free my project from the clutches of VBScript but have been
thus far foiled.
Hopefully,
Erik Rose
Programmer/Analyst
Pennsylvania State University
of processing multiple HTTP requests at a time. Am I insane? Is this,
perhaps, a configuration issue on my end?
Here's the test code that brought me to this conclusion:
<%@ Language = Python %>
<%
def slow():
for i in range(100000):
j = i * i;
return 'Wow, that took forever!!!';
Response.write(slow());
%>
I dumped the above into a file called slow.asp, yielding a page that
takes about 7 seconds to load. When I load slow.asp in two browser
windows approximately simultaneously, one of them loads 7 seconds after
the other. If they were running concurrently, I would expect them to
both load almost simultaneously, after about 14 seconds. I got the same
results using a time.sleep(10) call instead of the above CPU-heavy loop.
Incidentally, a similar test with ActivePerl yields the same results.
If this limitation is real, it seems to me that this setup is entirely
unsuitable for production work, since any page that makes a long-running
DB query brings all other request processing to a halt. This would
surprise me, though, given the high profile of ActiveState's products in
the IIS community. Can anybody give me some good news here? I'm striving
valiantly to free my project from the clutches of VBScript but have been
thus far foiled.
Hopefully,
Erik Rose
Programmer/Analyst
Pennsylvania State University