Re: [Zope] OSError along with FSSession...
On Wed, 6 Sep 2000, Chien-Pin Wang wrote: > > Dear Zope Users: > > I have upgraded to FSSession 0.4.2 lately and occasionally run into > the same problem several times. Each time it costs me a zope down. I do > really need some help... > > > Zope complains an error type "OSError" and throws the error value > saying [Errno 21] Is a directory: '/usr/local/zope/var/FSSession/' > occasionally since a recent upgrade of FSSession product to 0.4.2. I have managed to reproduce the error by setting SessionUID to an empty string before calling FSSession. Check for situations where you clear the REQUEST variables before calling FSSession. In the meantime I will add some checks on the input values of SessionUID. I will probably release a fixed version during the weekend if not sooner. Pavlos ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] HappySession
On Fri, 1 Sep 2000, Dieter Maurer wrote: > I can tell you, that FSSession has the same problem, at least > the version before the current one (announced some days ago). FSSession has no longer such problem. However you might still loose data if you access the same SessionUID from many frames. I don't thing there is a general solution to the problem without involving read locks which will slow down the whole Zope site. Or raising ConflictErrors which for frame usage like the case you mention will occur very often. The same problem will occur whether you store the Session info in an RDBMs or not. For instance: Thread A reads Session1 Thread B reads Session1 Thread A modifies Session1 and commits Thread B modifies Session1 and commits. This creates a conflict and the solution I have chosen is to keep the last to commit. In general we can achieve very high write rates because there is a natural isolation among requests, one thread per SessionUID. Problems will occur if multiple concurrent requests try to access the same SessionUID. This could occur in situations that employ frames but (at least in our case) most of the time the Session info is required only in one frame. In any case I have tested the latest version of FSSession against multiple frames accessing the same SessionUID and I do not get TransactionErrors. Actually there is a slightly better way but it will involve a lot of complicated programming so I won't even mention it ... :-) Pavlos ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] [ANN] FSSession-0-4-2
Hello Zopistas FSSession 0-4-2 is available at: http://www.zope.org/Members/gaaros/FSSession FSSession 0-4-2 corrects a bug on Windows platforms where os.rename fails if the renamed file already exists. This version has also been tested under many "unusual" situations (calling FSSession twice, two users having the same SessionUID) and it seems to be very robust. Regards Pavlos ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] FSSession problems...
On Mon, 28 Aug 2000, Curtis Maloney wrote: > > > This was aparently working fine for quite some time (about a month of public > usage), until last week. We have examined logs, and seen that one person > accidentaly used the system under someone elses ReturnerID, and then > rectified their mistake. If he did rectify the mistake then that should not have resulted in a problem. In any case the problem should have been isolated to that user only. Could it be that the cookie is cached somewhere? I am not familiar with the underlying pricinciples of the apache Proxy directives. Pavlos ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] FSSession problems...
On Fri, 25 Aug 2000, Curtis Maloney wrote: > > But if User A logs in with NS, this doesn't happen. > > I am really confused as to what's going on Me too! > > > My only thoughts are that FSSession is perhaps getting confused by Apache, > but surely it would re-issue the same Session ID the request came in with? SessionUID is a combination of a time stamp in seconds and a random integer between 1 and some billions. I just tested the behaviour of the random generator under multiple threads and it seems to be ok. So I suppose there is close to zero chance of two requests obtaining the same SessionUID. During load time FSSession gets SessionUID from a cookie if it exists. The only way I can see what you describe happening is in a situation where two or more threads share the same volatile attributes, which as far as I know is not the case. ZODB creates separate copies of each object in each individual thread and nothing is really shared apart from global variables and class (not instance) attributes. I will do some tests ... Puzzled Pavlos ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] FSSession problems...
On Fri, 25 Aug 2000, Curtis Maloney wrote: > Greetings, > > I'm using FSSession to store login details about visitors to our site. It is > important that users only be able to see their own data (of course). > > Today, however, I find out that some mistakes have been happening. People > are finding themselves logged in when they haven't yet, and others finding > they're logged in as someone else. This is, obivously, a problem. > > I cannot see how this could be happening, since the Session ID is stored in a > cookie, which should be unique to the client. > This is very weird indeed. Nobody has ever reported a similar problem. Can you send me the DTML method that calls the FSSession? Pavlos ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] REPOST: README.txt Tab
On Fri, 4 Aug 2000 [EMAIL PROTECTED] wrote: > I'll re-ask the question: > > > How do I get the README tab to appear in a product? > > > > What do I need to do? Its been a while but I think what you say is essentially correct. If there is a README.txt it would be displayed assuming your product was initialized correctly. Also make sure you delete the product from the product management screen and restart Zope. Pavlos ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] FSSession - don't call FSSession twice!
On Tue, 1 Aug 2000 [EMAIL PROTECTED] wrote: > > Zope has encountered an error while publishing this resource. > > Error Type: OSError > Error Value: [Errno 2] No such file or directory > > > from the title) that I called FSSession twice. Line 193 appears to > rename a .tmp file and I'd guess that by calling it twice my second > attempt fails as the file has already been renamed. Obviously this > > Hope this is of some use > > Ian > Ian Thanks for the report and the excellent analysis. Unfortunately I did not consider the case of calling FSSession twice. During the last couple of days I had a few suggestions (Brian and Dieter) on improving FSSession so a new version soon. Thanks Pavlos ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] FSSession used in Python???
On Fri, 7 Jul 2000, Dan Narkiewicz wrote: > inside my own python written Zope product... Any help would be.. well... > helpful.. I am not sure if it is a good idea to use a Product in the manner you describe but in any case: > --- a class definition --- > def FStest(self): > """fssession test""" > self.a = FSSession() < error appears here FSSession needs to be initialized with a cookie name, (whatever one wants to call the cookie that will store the session id). self.a=FSSession('Danssession') Still it might not work if FSSession cannot access REQUEST etc. Let me know. Pavlos ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: FSSession buglette
On Fri, 7 Jul 2000, Paul Gresham wrote: > Hi, Yep, I'm definitely running 0-4-0, I think the fact that I did > something naughty caused the rename (and therefore the commit) to fail, > when it expected to work. An exception in the commit then caused Zope to > stop all commits. What is worrying is that someone much more naughty > than I am, may just do something similar on our live system (Once this > goes live) Paul When I was testing FSSession-0-4-0 before release I created all sorts of weird situations and at least I got the impression that even under those situations FSSession would behave ok. I suppose I could make it foolproof by trying to serialize the contents everytime someone makes changes. This would guarantee that no exception will be raised during commit, but as I understand it it should be ok if an exception is raised during the first phase of commit (ie during tpc_begin). Zope should remain in a consistent state and the transaction machinery should clean up things ok, if something bad happens during the first phase of commit. It is only if an exception is raised in the second phase of commit that Zope refuses to carry on more transactions. In any case please send me your setup that creates such a problem with FSSession0.4.0 so I can look into it. If you want to restrict the kind of objects that your users will store in FSSession you could swap _dump and -load for the equivalent marshal ones. Pavlos ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: FSSession buglette
Paul Are you running FSSession0.4.0? If not please upgrade. The problems you mention below have been corrected. Nevertheless the first problem you descripe is not really related to FSSession. What happens is that certain Zope objects that can be pickled should not be stored in FSSession. Initially FSSession used marshal to serialize python objects, which is faster and does not allow storing of instances etc. I moved to pickle at the users request but one should be careful what he/she stores in FSSession. FSsession-0.4.0 should not raise an exception in tpc_finish. If I understand Zope's two phase commit mechanism, it is ok to raise an exception in tpc_begin (which corresponds to the 'polling' stage i believe) but not in tpc_finish. So now potential problems like full filesystem, unpicklable instances etc should be caught in tpc_begin. Pavlos ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] basic FSSession question
On Mon, 3 Jul 2000, Leichtman, David J wrote: > overwrites > the other data, implying that it's the same SessionUID. I thought that > calling from a different machine, would then > create a > new session with the SessionUID stored on that machine. How, then, do > I get > multiple sessions? Yes it will create a new Session. I have not received such a complain in the past so please check your setup carefully. If the problem persists can you send me a description of your setup so I can try to recreate it? > There seems to be a severe lack of documentation for FSSession. > Can you email me more specific suggestions as to where the docs need improvement? Pavlos ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Howto engineer a scientific paper system
On Thu, 29 Jun 2000, [EMAIL PROTECTED] wrote: > Thank you for the comments and links for latex and docbook. > > Going the latex path seems to me worthwhile - but on another day > ;-) , I have already done some setup in zope that I would like to > build on. What I did not find about LaTeX was a screenshot (isn't it Having used latex for a long time I would like to point out that if you are planing to to write many papers for conferences/publications Latex has some very helpful tools. For one many scientific journals provide Latex style files so you don't need to worry about formating. Also (and IMO the most important) are the pain in the ... bib contents. There are very nice bib databases for Latex and latex (or bibtex) can produce bibliography contents in the formats required by most journals. Check also Lynx which is a minimal (last i checked) wysiwig environment for Latex. Pavlos ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] HTML Editors that recognize DTML (was bastardized formofXML)
On Wed, 28 Jun 2000, Jon Franz wrote: > This looks very cool - the HTMl jive, that is. I'm going to mod it some, > and get permission from the author to incorporate it into Zope... I'll add > some features like search and replace also... > > >>> > -Original Message- > From: Gidon Friedman [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, June 28, 2000 6:12 AM > To: Jon Franz > Cc: [EMAIL PROTECTED] > Subject: Re: [Zope] HTML Editors that recognize DTML (was bastardized > formofXML) > > > > Does anyone know of a good (free!) java applet based text editor? > Something > > with basic color tagging abilities and maybe even (gasp) a spell checker, > > search/replace, etc? If there is one, we could mod it to spit its output Also jedit http://jedit.sourceforge.net/ Pavlos ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] ZODB/FSSession TransactionError
On Tue, 27 Jun 2000, Brian McClain wrote: > In my original Zope installation, I'm still getting the same EOFError > when I try to view a document containing . I > have been unable to reproduce the original TransactionError in the > original Zope. I have mucked around with the 1st Zope since receiving > this initial TransactionError - mostly removing var/Data.fs, etc.. and > reinstalling FSSession etc... so that I could start "fresh". You can correct the first Zope installation by doing the following. Remove and instead use . This will give you the problematic unpicklable session uid file and just remove it. It should be ok after that. Don't spend time on it , I have a pretty good idea what is going on. I hope by tonight to have a fixed version out. Pavlos ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] ZODB/FSSession TransactionError
On Wed, 28 Jun 2000, Dieter Maurer wrote: > > That's strange, because Python usually indicates EOF by returning > an empty string and not by raising EOFError. cPickle returns EOFError which is confusing since the Python docs state that only input and raw_input return this exception. The problem is actually deeper than I previously thought. I am still not sure whether it is FSSession that is causing it or Zope's transaction manager. I will spend more time on it tomorrow. In any case if you delete the offending FSSession file on the filesystem and restart Zope it should be fine for now. Pavlos ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] ZODB/FSSession TransactionError
On Tue, 27 Jun 2000, Brian McClain wrote: > > Error Type: TransactionError Ooouch ... I am not sure I can diagnose the problem but it is certainly a serious issue. Your email indicates two problems. The first trace (TransactionError) does not mention FSSession anywhere so I do not know where to start. Did you have any other indications that the error was raised because of FSSession? Is it reproducible? The second trace indicates an EOFError which indicates that cPickle is trying to unpickle a file with 0 length. So I guess you tried to store objects in FSSession that were unPicklable and looking at the code I can see that FSSession does not do a proper cleaning after such an event. I will correct the second problem now and post the new version soon. Thanks Pavlos ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: FSSession newbie problem
On Fri, 9 Jun 2000, Hung Jung Lu wrote: > Pavlos: this is the part that is confusing to newbies. FSSession can be made > in such a way that this initial call can be avoided. HappySession works that You are right. There is no real need for the initial call. It was initially designed like this because I inherited directly from UserDict and I was lazy to override every call to check whether FSSession was initialized or not. Also and more important I wanted to be compatible with SQLSession so the migrating users from one to the other will do so without needing to change much of the code. The initial call is useful if you need to pass parameters, like noCookie or _force_new_session etc etc. Pavlos ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: FSSession newbie problem
On Fri, 9 Jun 2000, Marcello Lupo wrote: > > 1) Is necessary to call FSSession in every document of the site or is > sufficient on the first page (home page of the e-com for example)? > Becouse i noticed (obviously) that every time it open a file the HD. > And i think this is a problem because every time it initialize a new > session passing the new cookie to the Browser (i think). Yes it is neccessary beacuse HTTP is stateless. It will only start a new session if FSSession cannot find a valid UID either through a cookie or a FORM or as part of te URL > > 2) How may i change the value of an element in a dictionary contained in > FSSession? > > Example: I have the object 'carrello' as in the examples before that > contain a dictionary passed to it from the form. > I store the quantity of the item ordered in the value > 'quantita_prodotto' in the object 'carrello'. > If a user add another piece of that item i need to update the > 'quantita_prodotto' summing to it the new item. > I think this is possible but i ignore the syntax to do this. > As you descripe in your example carrello is a dictinory. So one way is to make quantitita_prodotto a list and append to it. Something like plus some more logic to check if the variables are empty/correct etc .. Pavlos ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: FSSession newbie problem
On Fri, 9 Jun 2000, Marcello Lupo wrote: > It prints out "None" I supose you mean ...FSSession['carrello'] .. > > The FSSession is in the same folder of my two methods, may be this a > problem? No it should not > one. > Probably the second method point to a different session file than the > first. I also have in my standard html header and I never had problems. I will try a few tests when I return. Please keep me posted if you continue having troubles. Pavlos ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] FSSession newbie problem
Hi Marcello On Wed, 7 Jun 2000, Marcello Lupo wrote: > and macically i obtain the same error. > this is the code i used: > > > > > > Shouldn't the above be: Pavlos ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] SQLSession vs FSSession for ultra-high scalability andspeed.
On Sun, 21 May 2000, chas wrote: > Hi Folks, > > Sorry if this has been asked before, but can anybody > advise on FSSession vs SQLSession for: > > a) Speed. > b) Scalability. > FSSession does not use ZODB to store data, but stores session pickles directly on the harddisk. It will also update session info only if there are modifications to the session object. Given OS file caching I would not be supprised if FSSession is faster than any RDBMs based solution. Also note that if you have to support many writes on the Session objects, a filesystem provides a nice map from users --> files, which then utilizes the 'high concurrency' provided by the FS. OTO an RDBMS maybe a more reliable datastore than the filesystem with better consistency, recovery tools etc etc. Also check whether SQLSession caches info. It used to hit the RDBMs for every variable access which was very prohibitive for us, but Anthony mentioned that he was changing that. Since performance is going to be a major issue in your design I suggest you run a small bechmark to test relative performance. Pavlos ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] FSSession error
On Thu, 18 May 2000, urs.beyeler wrote: > line 142, in load > (Object: FSSession) > SystemError: (see above) > > any ideas? > The error seems to result from an instance stored in FSSession that cannot find its class object. I am not sure it is an FSSession error. Do you have any custom classes with instances of those stored in FSSession? Pavlos ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )