Re: [Zope-dev] Possible 'bad' with Client.py and urllib

2001-03-07 Thread Chris Withers

>  > Has anyone got any ideas how I'd go about inestigating this?
> You could try to figure out in what state Zope is when it
> blocks. Does is consumes time? Maybe, you can use a debugger
> to determine in what state the various threads are.
> This may give us a hint where the block is established.

Hmmm, looks like I'm going to have to punt on this one due to my own time
shortage :-(

If anyone does find something odd in here, please let the list know ;-)

cheers,

Chris


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Possible 'bad' with Client.py and urllib

2001-02-28 Thread Dieter Maurer

Chris Withers writes:
 > Dieter Maurer wrote:
 > > 
 > > Chris Withers writes:
 > >  >  urllib & Client block Zope 
 > > That would suggest a bug in Python's socket implementation:
 > > 
 > >   its "makefile().read" method would not release the global
 > >   interpreter lock.
 > 
 > Do you think this is likely? If so, where would I go to report it, or maybe it's
 > perhaps already fixed in Python 2.0?
If your Zope blocks, then multi-threading seems to be disabled:
either because the global interpreter lock was not released or
all threads are used up.

The Python bug tracker is at Sourceforge (hopefully linked from
http://www.python.org).

"comp.lang.python" may be of help, too.

 > That said, this problem only started manifesting itself when the target of the
 > urlopen or Client.get was a Python Script. It had been working fine before when
 > the target was DTML Method. 
Strange, there should be no difference between DTML and PythonScript
in this respect.

 > What with the Byte Code hacks, etc, in Python Scripts, I wonder if that isn't
 > maybe the problem.
I would not expect this.

 > Has anyone got any ideas how I'd go about inestigating this?
You could try to figure out in what state Zope is when it
blocks. Does is consumes time? Maybe, you can use a debugger
to determine in what state the various threads are.
This may give us a hint where the block is established.


Dieter

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Possible 'bad' with Client.py and urllib

2001-02-27 Thread Chris Withers

Dieter Maurer wrote:
> 
> Chris Withers writes:
>  >  urllib & Client block Zope 
> That would suggest a bug in Python's socket implementation:
> 
>   its "makefile().read" method would not release the global
>   interpreter lock.

Do you think this is likely? If so, where would I go to report it, or maybe it's
perhaps already fixed in Python 2.0?

That said, this problem only started manifesting itself when the target of the
urlopen or Client.get was a Python Script. It had been working fine before when
the target was DTML Method. 

What with the Byte Code hacks, etc, in Python Scripts, I wonder if that isn't
maybe the problem.

Has anyone got any ideas how I'd go about inestigating this?

cheers,

Chris



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Possible 'bad' with Client.py and urllib

2001-02-08 Thread Dieter Maurer

Chris Withers writes:
 >  urllib & Client block Zope 
That would suggest a bug in Python's socket implementation:

  its "makefile().read" method would not release the global
  interpreter lock.

Dieter

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] Possible 'bad' with Client.py and urllib

2001-02-08 Thread Chris Withers

Hi,

Both urllib and Client.py can be used to get stuff from other sites via HTTP and
do useful stuff with it, right?

Well, I was doing this and I think I've found what could be a 'real bad
problem'.

It appears that both of the above block while getting stuff from the remote
site. Worse than that, they don't only block their current thread, they seem to
block _all_ the Zope threads.

The reason I say that is I ended up in a situation where I was using Client.py
to get something from the Zope server on which Client.py was running. Because of
the above, it effectively blocked the whole Zope server until the Client.py bit
timed out.

Does any of this make any sense to anyone?
Is there a thread-safe equivalent of Client.py and/or urllib.open?
Kindof related, is there any way to set the HTTP timeout when getting stuff
using either approach?

cheers for any help,

Chris

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )