Help with exUserfolder( CVS - postgres auth ) and Groupuserfolder ( CVS ) - a showstopper 'bug'
I'm having very very strange performance problem with exUserFolder with Group Userfolder - but only when using PostgreSql authentication source. With ZODB authsource or without GRUF everything works just fine without any problems. This is a very nasty almost showstopper for me, so any help would be appreciated and I can atleast offer a beer in Europython 2004, if not even something else. Like said this is almost a showstopper that I need to overcome ,-6 Setup: Zope 2.6.1 Python 2.2.2 ZEO exUserFolder from CVS GroupUserFolder from CVS Plone 1.0.3 When using postgres authentication source inside Gruf every request takes many seconds more to finish. First I thought that the problem was same that I had before: http://www.google.fi/search?q=sqlListUsers+%2B+performance+%2B+Zope&ie=UTF-8... But even changing caching on sql methods had no effect. Caching on exUserFolder itself shows following: Total Access: 117 Hits: 2 1.71% Misses -- not in cache 111 94.87% Misses -- wrong password 0 0.00% Misses -- session timed out 4 3.42% And from Call Profiler I see: sqlListOneUser +0.0155 0.0002 0.0% | +- sqlListUsers +0.0156 0.0002 0.0% | | +- sqlListUsers (2nd call) +0.0158 0.0002 0.0% | | | +- sqlListUsers (3rd call) .... Continue Total time for a page was more than 7 seconds, when with normal user folder or without gruff it was 0.3 seconds. both on sqlListUsers and sqlListUser I have set maximum time to cache to 10 seconds, but that does not seem to help at all. Properties of exUserFolder: Credential Cache Timeout 20 secs Negative Credential Cache Timeout 20 secs Any help would be very appreciated. GRUF and Exuserfolder are both great tools and I need to be able to use them together for the sake of requirements in certain functionality. -huima
Hi, You can drop an empty "debug.txt" file in your GRUF installation : this will generate more talkative tracelogs that may give you some optimization hints. Also, have you got the code for your sqlListUsers method ? Everything leads me to think that you've got some kind of infinite recursion pb... I'll try to have a look at that. I can do anythink for a beer ! :-) Cheers, P.-J.
I'm having very very strange performance problem with exUserFolder with Group Userfolder - but only when using PostgreSql authentication source.
With ZODB authsource or without GRUF everything works just fine without any problems.
This is a very nasty almost showstopper for me, so any help would be appreciated and I can atleast offer a beer in Europython 2004, if not even something else. Like said this is almost a showstopper that I need to overcome ,-6
Setup: Zope 2.6.1 Python 2.2.2 ZEO exUserFolder from CVS GroupUserFolder from CVS Plone 1.0.3
When using postgres authentication source inside Gruf every request takes many seconds more to finish. First I thought that the problem was same that I had before:
http://www.google.fi/search?q=sqlListUsers+%2B+performance+%2B+Zope&ie=UTF-8...
But even changing caching on sql methods had no effect.
Caching on exUserFolder itself shows following:
Total Access: 117 Hits: 2 1.71% Misses -- not in cache 111 94.87% Misses -- wrong password 0 0.00% Misses -- session timed out 4 3.42%
And from Call Profiler I see:
sqlListOneUser +0.0155 0.0002 0.0% | +- sqlListUsers +0.0156 0.0002 0.0% | | +- sqlListUsers (2nd call) +0.0158 0.0002 0.0% | | | +- sqlListUsers (3rd call) .... Continue
Total time for a page was more than 7 seconds, when with normal user folder or without gruff it was 0.3 seconds.
both on sqlListUsers and sqlListUser I have set maximum time to cache to 10 seconds, but that does not seem to help at all.
Properties of exUserFolder: Credential Cache Timeout 20 secs Negative Credential Cache Timeout 20 secs
Any help would be very appreciated. GRUF and Exuserfolder are both great tools and I need to be able to use them together for the sake of requirements in certain functionality.
-huima
+-------[ Heimo Laukkanen ]---------------------- | I'm having very very strange performance problem with exUserFolder with | Group Userfolder - but only when using PostgreSql authentication source. | With ZODB authsource or without GRUF everything works just fine | without any problems. | | This is a very nasty almost showstopper for me, so any help would be | appreciated and I can atleast offer a beer in Europython 2004, if not | even something else. Like said this is almost a showstopper that I need | to overcome ,-6 | | Setup: | Zope 2.6.1 | Python 2.2.2 | ZEO | exUserFolder from CVS | GroupUserFolder from CVS | Plone 1.0.3 Plone/CMF causes infinite loops in some cases with XUF and property sources, since CMF has it's own User object. I don't know about GRUF. | Total time for a page was more than 7 seconds, when with normal user | folder or without gruff it was 0.3 seconds. | Any help would be very appreciated. GRUF and Exuserfolder are both great | tools and I need to be able to use them together for the sake of | requirements in certain functionality. Tried using the Group source of XUF instead of using GRUF? If you get some better traces of WHY it's calling listUsers over and over again, we might be able to work out what's going on. -- Totally Holistic Enterprises Internet| | Andrew Milton The Internet (Aust) Pty Ltd | M:+61 416 022 411 | ACN: 082 081 472 ABN: 83 082 081 472 |akm@theinternet.com.au| Carpe Daemon
Andrew Kenneth Milton wrote:
Plone/CMF causes infinite loops in some cases with XUF and property sources, since CMF has it's own User object. I don't know about GRUF.
Gruf defines it's own User GRUFUser-object but haven't yet looked into the internals of that. Could you elaborate more what are / were the points that cause a non standard userobject to cause infinite loops?
Tried using the Group source of XUF instead of using GRUF?
Not yet. I started to work with GRUF, since it will be included in Plone 1.1 and on our project we would like to use as much as possible standard bits and pieces - especially since GRUF requires no additional work to the application to make groups work. But I will have to give a try to the group source and see how it works.
If you get some better traces of WHY it's calling listUsers over and over again, we might be able to work out what's going on.
Any pointers on what to do - ie. where to log or set tracepoints, since the exact same context ( portal / folder / user ) provides these delays depending on whether I have gruf + pgAuthSource or just pgauthsource or Gruf and some other authsource on exUserFolder. -huima
Andrew Kenneth Milton wrote:
If you get some better traces of WHY it's calling listUsers over and over again, we might be able to work out what's going on.
Ok. I took pdb to help and started to debug. I am sure now that when inside GRUF, exUserFolder's internal caching does not work. def cache_getUser(self, username, password): if not self.sessionLength: return None pp = string.join(self.getPhysicalPath(), '/') x = XUFUserCache.getCache(pp) if not x: return None ..... So here x is always None, meaning that cache is never found. Also I tried with a breakpoint inside add to cache function, and it was never called. However outside GRUF it worked, user was added to cache and everything was peacy. This is atleast a start in finding out what is the problem. Andrew - any ideas and pointer what could be the next move? ,-) -huima
+-------[ Heimo Laukkanen ]---------------------- | Andrew Kenneth Milton wrote: | | >If you get some better traces of WHY it's calling listUsers over and over | >again, we might be able to work out what's going on. | | Ok. I took pdb to help and started to debug. | | I am sure now that when inside GRUF, exUserFolder's internal caching | does not work. | | def cache_getUser(self, username, password): | if not self.sessionLength: | return None | pp = string.join(self.getPhysicalPath(), '/') | x = XUFUserCache.getCache(pp) | if not x: | return None | ..... | | So here x is always None, meaning that cache is never found. | | Also I tried with a breakpoint inside add to cache function, and it was | never called. what's the value of pp? Is it the same path that indicates where your acl_users for XUF is? -- Totally Holistic Enterprises Internet| | Andrew Milton The Internet (Aust) Pty Ltd | M:+61 416 022 411 | ACN: 082 081 472 ABN: 83 082 081 472 |akm@theinternet.com.au| Carpe Daemon
Andrew Kenneth Milton wrote:
what's the value of pp? Is it the same path that indicates where your acl_users for XUF is?
Yes. Like I said in another email it happens that the cache is checked, but no value is put into cache, so the check always fails - since there is no cache. -huima
+-------[ Heimo Laukkanen ]---------------------- | Andrew Kenneth Milton wrote: | | >what's the value of pp? | >Is it the same path that indicates where your acl_users for XUF is? | | Yes. | | Like I said in another email it happens that the cache is checked, but | no value is put into cache, so the check always fails - since there is | no cache. The cache is keyed off of the physical path, so there's one cache for each acl_users that exists. This is normally setup when your acl_users is added. Are you adding your XUF via the ZMI, or from python? -- Totally Holistic Enterprises Internet| | Andrew Milton The Internet (Aust) Pty Ltd | M:+61 416 022 411 | ACN: 082 081 472 ABN: 83 082 081 472 |akm@theinternet.com.au| Carpe Daemon
participants (3)
-
Andrew Kenneth Milton -
Heimo Laukkanen -
Pierre-Julien Grizel (Ingeniweb)