Re: [Zope-dev] ping

2001-07-02 Thread Dyon Balding

ACK

ethan mindlace fremen wrote:
 
 pong
 --
 -mindlace-
 zopatista community liason
 
 ___
 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 )

-- 
| Dyon Balding . Software Engineer . HiringTools.Monster.com
|   [EMAIL PROTECTED] . +1 415 288 3375

___
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] Add a user to zope

2001-06-20 Thread Dyon Balding

Hi Johan,

It would probably be more efficient for you to look at alternative
user folders that retrieve user data directly from your SQL table.

I'm not sure the current state of the art product is for that, but
UserDb used to be the one, and we have that integrated successfully
in our site.

Check the Products area on zope.org, and I'm sure you'll find something.

-d

Johan Beauce wrote:
 
 Hello,
 
 I need your help. I'm trying to add all users from of our company in zope.
 I don't want enter all users and all passwords.
 I would like make a dtml-method which select all users and passwords
 in my (SQL) table and create automatically these users.
 I have created this dtml-method but I don't succed to redirect the page
 to acl_users/manage_users (method that create users)
 so that I don't need to press add button for each users.
 
 Do you Have a answer or another best solution ?
 
 Thanks ...
 
 Johan.
 
 form action=acl_users/manage_users method=post
 table
 
   input type=text name=name value=totoTest
   input type=password name=password value=test
   input type=password name=confirm value=test
   input type=text name=domains:tokens value=
   select name=roles:list size=5 multiple
 option value=ManagerManager
 option value=MemberMember
 option selected value=OwnerOwner
 option value=ReviewerReviewer
 option value=publisherpublisher
   /select
   input type=submit name=submit value=Add
 
 /table
 /form
 
 ... or ...
 
 dtml-call
 self.Users.acl_users._addUser('testToto','toto','toto','Owner',0)
 
 ___
 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 )

-- 
| Dyon Balding . Software Engineer . HiringTools.Monster.com
|   [EMAIL PROTECTED] . +1 415 288 3375

___
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] dtml-in batching badly

2001-06-20 Thread Dyon Balding

Michael Bernstein wrote:
 
 But the algorithm doesn't seem 'smart' enough to roll-up the
 batches by recursing through them in reverse order. Arguably
 though, you should never set your batch size smaller than
 the orphan size, so this isn't really an issue.
 

so maybe the dtml batching code should just set the orphans to
the batch size if it is greater than the batch size?  that would
at least eliminate some of the confusion with batching.

-d

-- 
| Dyon Balding . Software Engineer . HiringTools.Monster.com
|   [EMAIL PROTECTED] . +1 415 288 3375

___
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] Access to extra modules in Python Scripts

2001-06-20 Thread Dyon Balding

I wanted to make the re module accessible to Python Scripts on my site.

The instructions in the README.txt in the product directory specify that
you should place:

from Products.PythonScripts.Utility import allow_module
allow_module('re')

in a product __init__.py.  This appears to work fine for basic re
functions, however I wish to use the returned re.MatchObject objects,
and these raise an Unauthorized exception when methods are called. 
Reverting to the old __allow_access_to_unprotected_subobjects__ on re,
re.MatchObjects and re.RegexObjects appears to work however.

How is one supposed to expose that functionality to Python Scripts using
the new security features?  In the Utility.py is an allow_class method
as well, but I couldn't work out if that was what I needed.

thanks
-d

-- 
| Dyon Balding . Software Engineer . HiringTools.Monster.com
|   [EMAIL PROTECTED] . +1 415 288 3375

___
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] bug in ZEO-1.0b3

2001-05-29 Thread Dyon Balding

If the ZEO server goes down, the the client no longer tries to keep
reconnecting.

This appears to be something to do with the __closed attribute in
zrpc.py.

Is there a page to check the status of bugs in ZEO?
When is the next version due out? and will it be a final 1.0 version?

thanks
-d

___
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] ZEO on SMP

2001-05-23 Thread Dyon Balding

Hi,

We are setting up a cluster of ZEO clients on dual processor machines. 
From some experiments and from searching through the mailing lists, it
appears that a single Zope process will not take full advantage of the
two processors.

The solution would appear to be to run two ZEO clients on each server. 
This, however, is causing problems.

I can successfully run two Zope (non-ZEO) processes on a single machine,
but two ZEO clients don't seem to coexist nicely on the Windows 2000
machine.  The second client to start will accept connections, but never
responds with anything.

Zope: 2.3.2, ZEO: 1.0b3, Windows 2k for clients, Linux and Windows 2k
for storage server.

Is there a better solution?  If not, has anyone come across this
problem?

Any pointers appreciated
-d

___
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] ZEO on SMP

2001-05-23 Thread Dyon Balding

Tino,

Thanks for your reply.

When you say it works fine on a dual processor machine, are you saying
that a single ZEO client fully utilises both processors? or that you
are running two ZEO clients successfully?

Unfortunately I'm currently stuck with Windows due to both political
reasons, and because we are interfacing to a large SQLServer database.

-d

On Wed, May 23, 2001 at 08:44:59PM +0200, Tino Wildenhain wrote:
 Hi Dyon,
 
 ZEO on a dual processor machine runs fine for me.
 I'm using redhat-linux for the server (ZEO and Clients
 on same machine)
 If you dont need strange things I would not recommend
 Win2k as server platform.
 
 Best regards
 Tino Wildenhain
 
 --On Mittwoch, 23. Mai 2001 11:35 -0700 Dyon Balding [EMAIL PROTECTED] 
 wrote:
 
  Hi,
 
  We are setting up a cluster of ZEO clients on dual processor machines.
  From some experiments and from searching through the mailing lists, it
  appears that a single Zope process will not take full advantage of the
  two processors.
 
  The solution would appear to be to run two ZEO clients on each server.
  This, however, is causing problems.
 
  I can successfully run two Zope (non-ZEO) processes on a single machine,
  but two ZEO clients don't seem to coexist nicely on the Windows 2000
  machine.  The second client to start will accept connections, but never
  responds with anything.
 
  Zope: 2.3.2, ZEO: 1.0b3, Windows 2k for clients, Linux and Windows 2k
  for storage server.
 
  Is there a better solution?  If not, has anyone come across this
  problem?
 
  Any pointers appreciated
  -d
 
  ___
  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 )
 
 
 

-- 
Dyon Balding [EMAIL PROTECTED]

___
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] ZEO on SMP

2001-05-23 Thread Dyon Balding

They are listening on different ports, (80 and 81) in my test case.

And yes, there will be a load balancer in front of them (there will
be 15 dual processor servers) to make the cluster appear like one
machine.

-dyon

On Wed, May 23, 2001 at 12:38:25PM -0700, Randall F. Kern wrote:
 If I understand your scenario, you are trying to run two instances of
 Zope on a single machine, talking to a ZEO server?
 
 That won't work :)
 
 Neither Unix nor Windows knows what to do with two processes trying to
 open the same port for listen.  I'm surprised the second Zope instance
 even starts.
 
 If you want to try it, start each instance of Zope on different ports,
 then use some kind of ipforwarding/load balancer on the box to route
 connections to port 80 to either of your Zope servers (say 8081 and
 8082).
 
 -Randy

-- 
Dyon Balding [EMAIL PROTECTED]

___
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] ZEO on SMP

2001-05-23 Thread Dyon Balding

Well that's what I'm trying to do, but as mentioned in my original
post, any Zope clients utilising ZEO started after the first one do
not respond.  The ZEO storage server is running on a separate machine,
serving the 15 client machines.

-d

On Wed, May 23, 2001 at 05:51:57PM -0700, David Brown wrote:
 At 08:26 PM 5/23/2001 -0400, Jeremy Hylton wrote:
 Since a single Python process has a single global interpreter lock,
 you'll never fully utilize a 2-processor machine.
 
 
 I may be merely demonstrating ignorance, but --
 
 If you, say, launched two separate Zope processes, and one ZEO process, on 
 the same machine, aren't you going to be running 3 different Python 
 interpreters, each in it's own process?
 
 Couldn't you then be utilizing up to three processors on an SMP box?
 
 I agree that threads within a particular Python interpreter are not really 
 going to gain anything because of the global interpreter lock, but isn't 
 that a moot point with separate Python interpreter processes?
 
 Or does the TCP/IP stack cause problems?
 
 dave

-- 
Dyon Balding [EMAIL PROTECTED]

___
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] Hotfixes and __bases__

2001-05-17 Thread Dyon Balding

In Caseman's How-To named Extend Zope Dynamically with Hotfixes, at
http://www.zope.org/Members/Caseman/Dynamic_Hotfix, he mentions that you
could: Add new base classes to existing classes.

I have tried this, and can't get it to work, my question is: is it
possible?, and if so, how do I make it work? :)

I am using Python 1.5.2, which supports dynamically updating the
__bases__ attribute.   I can successfully update the bases in simple
Python classes, but when I try to do it to a Zope (2.3.2) class
(specifically Folder), my assignment to the __bases__ attribute doesn't
update it.

Is what I'm doing even possible?

thanks
-d

___
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] Tracking memory leak

2001-04-10 Thread Dyon Balding
  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 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 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 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 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 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 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 )

-- 
Dyon Balding [EMAIL PROTECTED]

___
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] memory leak

2001-04-10 Thread Dyon Balding

have you checked the debug page in the control panel and noted any refcounts
increasing?

any chance that this is the same problem that andy is running into (read his
posts above)?

-d

On Tue, Apr 10, 2001 at 05:27:28PM +0200, Marco Nova wrote:
 Hello guys,
 
 It seems that I've some memory leak problems and I want to understand where
 I've to look for.
 
 Scenario:
 
 I've an IIS web server that generates an XML page (taking data from
 SqlServer);
 The Zope web server must retrieve the XML page, manage the data and render
 them in HTML (I cant only apply a XSL stylesheet to XML).
 
 The Facts:
 
 I've written a external method that - using httplib - reads the XML page and
 return a string that is the raw XML sources, than I've written another
 external method that use ExpatBuilder of Products.ParsedXML.DOM to parse the
 XML an generate a list of [(id - {mapping})] which will be accessed with a
 dtml-in tag, so in the sequence-key I've access to the ID and with
 sequence-item I can access to the mapping object.
 I'm using latest version of ZOPE (2.3.1, the binary one with Python 1.5.2)
 and ParsedXML.
 
 The Problem:
 
 It seems that every time the method retrieve the page or parse the XML I
 loose a bunch of kilobytes. Because the methods are very simple (100 lines
 of code in total) and because I didn't create any class for handling this
 workflow I can't understand where I can loose bytes.
 
 The Questions:
 
 Is the list generated for the dtml-in tag freed automatically by ZOPE ?
 Is there a Garbage Collector somewhere that must be activated ?
 Should I avoid the use of the ExpatBuilder for XML processing ?
 
 Thanks for listening my newbies questions.
 
 
 Best Regards,
 
 - mn
 
 ___
 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 )

-- 
Dyon Balding [EMAIL PROTECTED]

___
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] standard_error_message manipulation

2001-04-09 Thread Dyon Balding

Hi,

As part of a large python product I wanted to modify the normal
"Zope Error" standard_error_message page.

Most exceptions will be caught in the code, and therefore those
that do get through and cause an error message to be displayed
to the user probably indicate a bug in our code.  I would like
to give the user the ability to submit the details of the exception
along with their own information as a bug report.

I created my own standard_error_message, and wanted it to contain
a form with the values of error_value and error_tb among
others.  It however appears that the values of these variables get
rendered into HTML much earlier than desired and therefore aren't
very readable in a bug report.

Is there a better approach to this problem? or a work around?

thanks
-d

-- 
Dyon Balding [EMAIL PROTECTED]

___
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] standard_error_message manipulation

2001-04-09 Thread Dyon Balding

argh! that wasn't the answer i was looking for :)

-d

On Mon, Apr 09, 2001 at 09:57:36PM -0700, Andy McKay wrote:
 I run error_value through a simple python script to get the original message
 back again :)
 
 Cheers.
 --
   Andy McKay.
 
 
 - Original Message -
 From: "Dyon Balding" [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, April 09, 2001 9:44 PM
 Subject: [Zope-dev] standard_error_message manipulation
 
 
  Hi,
 
  As part of a large python product I wanted to modify the normal
  "Zope Error" standard_error_message page.
 
  Most exceptions will be caught in the code, and therefore those
  that do get through and cause an error message to be displayed
  to the user probably indicate a bug in our code.  I would like
  to give the user the ability to submit the details of the exception
  along with their own information as a bug report.
 
  I created my own standard_error_message, and wanted it to contain
  a form with the values of error_value and error_tb among
  others.  It however appears that the values of these variables get
  rendered into HTML much earlier than desired and therefore aren't
  very readable in a bug report.
 
  Is there a better approach to this problem? or a work around?
 
  thanks
  -d
 
  --
  Dyon Balding [EMAIL PROTECTED]
 
  ___
  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 )
 

-- 
Dyon Balding [EMAIL PROTECTED]

___
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] SQLAlias Memory Leak?

2000-12-07 Thread Dyon Balding

OK, I've put this into the Collector.  I'm intrigued as to what
the operating procedure is with the Collector though - there appear
to be a large number of Pending jobs.  Does that mean that Digital
Creations haven't even looked at them, or that they just haven't
done anything about them?

http://classic.zope.org:8080/Collector/1772/view

This is causing big problems with our site, and we need to resolve
it pretty desperately.  I guess the another solution would be to ensure
that all calls to SQL columns are the same case as in the database,
but with around 500 ZSQLMethods - that is a daunting task.

-d

On Wed, Dec 06, 2000 at 03:08:33PM -0800, Jon Prettyman wrote:
 I've seen this as well under DCOracle.
 
 -jon
 
 Dyon Balding [EMAIL PROTECTED] writes:
 
  OK, I've had more of a hack at this, and I've narrowed the problem
  down a little.
  
  It appears that any access to an SQLAlias object causes it to not
  be correctly released.  The SQLAlias objects means that you can
  access column names using a different case to how they are stored
  in the database.
  
  For example, we store users in a users table in the database, with
  column names like USERNAME, but they are accessed with:
  dtml-var username, this causes the SQLAlias objects to stick around.
  
  One solution to our problem is to just do a dtml-var USERNAME
  instead.  However that doesn't solve the problem with this
  "feature" of being able to call it with a different case.
  
  This is a fairly easy bug to reproduce, on my setup at least :).
  I have tested it with ZSQLRelay and ZODBDA both talking to SQLServer,
  and with ZPyGreSQLDA talking to PostgreSQL.
  
  I would appreciate it if someone else can reproduce the bug,
  and I'll put it in the Collector I guess.
  
  thanks
  -d
  

-- 
Dyon Balding [EMAIL PROTECTED]

___
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] Linux Zope - Win2K SQL Server?

2000-12-07 Thread Dyon Balding

I am currently running Zope - ZSQLRelayDA - SQLRelay+FreeTDS - SQLServer on NT.

It works, but not particularly robustly it would seem.

-d

On Thu, Dec 07, 2000 at 02:57:28PM -0800, Neil K wrote:
 
 I'm still trying to figure out what the missing pieces are... if anyone else
 has gotten a Linux Zope talking to a Win2K SQL Server 2000, I would
 appreciate some guidance.
 
 It seems I would have to write my own Product from scratch to do this, no
 matter what. None of the ODBC Products seem to be available for Unix, and
 ODBC from Unix - Windows will require additional software like EasySoft's
 ODBC Bridge anyway. Or I could just not use ODBC at all and make some
 Product customized to MS SQL Server.
 
 Some may suggest using ActiveState's Perl Methods for Zope and DBD::Proxy.
 :)  It's a possibility, but I'd like to see if more conventional solutions
 exist.
 
 --
 Neil Kandalgaonkar, ActiveState
 
 
 
 ___
 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 )

-- 
Dyon Balding [EMAIL PROTECTED]

___
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] SQLAlias Memory Leak?

2000-12-06 Thread Dyon Balding

OK, I've had more of a hack at this, and I've narrowed the problem
down a little.

It appears that any access to an SQLAlias object causes it to not
be correctly released.  The SQLAlias objects means that you can
access column names using a different case to how they are stored
in the database.

For example, we store users in a users table in the database, with
column names like USERNAME, but they are accessed with:
dtml-var username, this causes the SQLAlias objects to stick around.

One solution to our problem is to just do a dtml-var USERNAME
instead.  However that doesn't solve the problem with this
"feature" of being able to call it with a different case.

This is a fairly easy bug to reproduce, on my setup at least :).
I have tested it with ZSQLRelay and ZODBDA both talking to SQLServer,
and with ZPyGreSQLDA talking to PostgreSQL.

I would appreciate it if someone else can reproduce the bug,
and I'll put it in the Collector I guess.

thanks
-d

On Wed, Dec 06, 2000 at 09:06:47AM +1100, Dyon Balding wrote:
 Hi,
 
 I have an application that stores state data in a
 SQLServer database.  The Zope and database servers
 run on different windows machines, using the ZODBCDA
 product to connect Zope to the ODBC machinery.
 
 What I have been observing is that the Zope client's
 memory usage increases consistently when ZSQL methods
 are being called.  In the Debug screens, the
 culprit appears to be Shared.DC.ZRDB.RDB.SQLAlias.
 
 Here's a dump of the first few lines after hitting
 a ZSQL method a few hundred times using ab.  The
 SQLAlias figures never seem to go down.
 
 Class 
 December 5, 2000
 1:58 pm 
  December 5, 2000
  2:01 pm 
  
Delta 
 Shared.DC.ZRDB.RDB.SQLAlias 
 1048 
  4068 
  
+3020 
 ZClasses.ZClass.ZClass 
 73 
  108 
  
+35 
 OFS.DTMLMethod.DTMLMethod 
 63 
  94 
  
+31 
 
 In fact most of our servers run out of memory and need
 to be restarted every couple of days when they get
 sufficient use.
 
 I've done a bit of a search of the mailing lists, and noone
 else appears to be having the same problem.  So does
 anyone have an idea of what we might be doing differently
 to everyone else?  We appear to have the latest versions
 installed.
 
 I've had a bit of a look through the code, and it appears
 that SQLAlias is used to case desensitize the column names
 of the returned data?
 
 Any pointers would be appreciated.
 
 thanks, d
 
 -- 
 |Dyon Balding [EMAIL PROTECTED] |
 
 ___
 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 )

-- 
Dyon Balding [EMAIL PROTECTED]

___
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 )