Re: Webware/Apache Threading Problem?

Gary Perez <gary.perez-kSqzKFmFPN9Wk0Htik3J/[email protected]>
Newsgroups gmane.comp.python.webware
Message-ID <[email protected]>
On Sep 12, 2006, at 12:35 PM, Chuck Esterbrook wrote:

> On 9/12/06, Gary Perez <gary.perez-kSqzKFmFPN9Wk0Htik3J/[email protected]> wrote:
>> On Sep 8, 2006, at 8:34 AM, sophana wrote:
>>
>>> Looking at the error messages, it seems that it is webware that  
>>> don't
>>> accept the connection.
>>> I don't know why, and don't even know if I have the same problem.
>>> Are you sure that your second request is not blocked by the first
>>> one in
>>> webware?
>>
>> How would I be able to determine whether the second request is being
>> blocked? If the simple answer is "because the second request doesn't
>> get served", then yeah, it's being blocked... but why, and is there a
>> way around this?
>>
>> I admit I don't know a lot about threads/threading, but I was under
>> the impression that the AppServer (as config'd below) could handle
>> multiple, simultaneous requests.
>>
>> Is there something completely obvious that I'm overlooking?
>
> Does anyone think this could be Python's GIL kicking in? Perhaps the
> first thread has acquired the GIL and is not letting it go?

GIL (global interpreter lock) - I'm *very* unqualified to address this.

> Is the first thread using any extension modules (Python modules
> written in C instead of Python)?

No sir. From the first thread (form processor):

from Template import Template
import vtools, os.path

... where "vtools" is an external .py module that's written entirely  
in Python (no C).

The 2nd request is also a python-only module that simply does a  
glob.glob('*') on the pwd.

> What does it do with all the form
> data being uploaded?
> -Chuck


At the moment, it simply does a bit of form checking (e.g., did the  
user select a file to upload), then writes the file.value from the  
form data, as such:

filename, contents = file.filename, file.value
open(os.path.join(PROJDIR + pdir, filename), 'wb').write(contents)

As I previously stated, I was going to try to figure out a way to  
write the file data in chunks (?) so I could provide some type of  
status display to the user doing the uploading, but that's a problem  
for a later time...

-Gary

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.