Re: Beaker error (Beaker 1.4.2 released)
Hi Ben, I've been running beaker with your patch for over a week now on our live site and have seen no further messages, even under load. I'd say the problem is fixed. Thank you! Damian On Oct 2, 6:55 pm, Ben Bangert b...@groovie.org wrote: On Oct 2, 2009, at 6:05 AM, Damian wrote: Module beaker.cache:115 in get def get(self, key, **kw): Retrieve a cached value from the container return self._get_value(key, **kw).get_value() get_value = get return self._get_value(key, **kw).get_value() Module beaker.container:269 in get_value if not creation_lock.acquire(wait=False): debug(get_value returning old value while new one is created) return value else: debug(lock_creatfunc (didnt wait)) return value UnboundLocalError: local variable 'value' referenced before assignment It would appear that it sees the value with has_value right before its deleted. I've added a line so that if it fails to then get the value, it sets has_value to false. This should remedy your situation, if you could try the latest Beaker tip from source that has this fix in it, that'd be great. Cheers, Ben --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: Beaker error (Beaker 1.4.2 released)
Hi Ben, I've recently upgraded one of my busiest sites to use beaker 1.4.2 and I am getting an intermittent error: Module beaker.cache:115 in get def get(self, key, **kw): Retrieve a cached value from the container return self._get_value(key, **kw).get_value() get_value = get return self._get_value(key, **kw).get_value() Module beaker.container:269 in get_value if not creation_lock.acquire(wait=False): debug(get_value returning old value while new one is created) return value else: debug(lock_creatfunc (didnt wait)) return value UnboundLocalError: local variable 'value' referenced before assignment I am using Memcached with the pure-python driver as the caching backend. What we do is manually invalidate (delete) the cache under certain circumstances. What is happening here as far as I can tell is: - the cache gets delted (using memcached's delete key functionality) - the first request comes in where it gets regenerated - while the cache is being regenerated, a second request comes in and beaker tries to return the old value which no longer exists, even though for some reason beaker thinks its there. I understand this is to avoid the dog-pile effect, and would be the correct thing to do if we still had the old cache. Is delting the key not the way to go? Can I 'invlidate' the cache some other way that preserves the anti-dogpile effect? Also, should beaker not behave differently if there is no old value to return? Thanks, Damian This bug has been fixed with a work-around in Beaker, and Beaker 1.4.2 has been released with it. - Ben --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: Beaker error (Beaker 1.4.2 released)
On Oct 2, 2009, at 6:05 AM, Damian wrote: Module beaker.cache:115 in get def get(self, key, **kw): Retrieve a cached value from the container return self._get_value(key, **kw).get_value() get_value = get return self._get_value(key, **kw).get_value() Module beaker.container:269 in get_value if not creation_lock.acquire(wait=False): debug(get_value returning old value while new one is created) return value else: debug(lock_creatfunc (didnt wait)) return value UnboundLocalError: local variable 'value' referenced before assignment It would appear that it sees the value with has_value right before its deleted. I've added a line so that if it fails to then get the value, it sets has_value to false. This should remedy your situation, if you could try the latest Beaker tip from source that has this fix in it, that'd be great. Cheers, Ben --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: Beaker error (Beaker 1.4.2 released)
On Sep 24, 2009, at 3:28 PM, Philip Jenvey wrote: Module beaker.synchronization:260 in do_acquire_write_lock return False else: fcntl.flock(filedescriptor, fcntl.LOCK_EX) return True fcntl.flock(filedescriptor, fcntl.LOCK_EX) TypeError: argument must be an int, or have a fileno() method. FYI I narrowed this problem down today, it should be fixed in Beaker trunk. It's due to a CPython bug =[ http://www.pylonshq.com/project/pylonshq/ticket/645 This bug has been fixed with a work-around in Beaker, and Beaker 1.4.2 has been released with it. - Ben --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: Beaker error
On Mar 2, 2009, at 11:24 AM, Mike Orr wrote: I've started getting an intermittent Beaker error. It happens in the base controller when I pass ``session.id`` to a generic logging routine. However, I have three sites with the same logging code, and it's only happening on one of the sites. It occurs on a variety of URLs. Here's the exception: Module beaker.synchronization:260 in do_acquire_write_lock return False else: fcntl.flock(filedescriptor, fcntl.LOCK_EX) return True fcntl.flock(filedescriptor, fcntl.LOCK_EX) TypeError: argument must be an int, or have a fileno() method. FYI I narrowed this problem down today, it should be fixed in Beaker trunk. It's due to a CPython bug =[ http://www.pylonshq.com/project/pylonshq/ticket/645 -- Philip Jenvey --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: Beaker error
On Jun 10, 2:46 pm, Mike Orr sluggos...@gmail.com wrote: I moved my site to another server and I'm getting a Beaker cache error. === Module pylons.controllers.core:60 in _perform_call Hide the traceback for everything above this method __traceback_hide__ = 'before_and_this' return func(**args) def _inspect_call(self, func): return func(**args) Module ?:2 in all_incidents Module pylons.decorators.cache:97 in wrapper b_kwargs['type'] = type my_cache = pylons.cache.get_cache(namespace, **b_kwargs) if expire == never: my_cache = pylons.cache.get_cache(namespace, **b_kwargs) Module beaker.cache:187 in get_cache kw = self.kwargs.copy() kw.update(kwargs) return self.caches.setdefault(name + str(kw), Cache(name, **kw)) def get_cache_region(self, name, region): return self.caches.setdefault(name + str(kw), Cache(name, **kw)) Module beaker.cache:104 in __init__ raise TypeError(Unknown cache implementation %r % type) self.namespace = cls(namespace, **nsargs) self.expiretime = expiretime or expire self.starttime = starttime self.namespace = cls(namespace, **nsargs) Module beaker.container:485 in __init__ if not file_dir and not data_dir: raise MissingCacheParameter(data_dir or file_dir is required) elif file_dir: self.file_dir = file_dir raise MissingCacheParameter(data_dir or file_dir is required) MissingCacheParameter: data_dir or file_dir is required === I stumbled upon the same problem, although I was trying to use memcached. I worked out that this is a bug with Beaker 1.3.1 which is fixed in hg tip. See http://bitbucket.org/bbangert/beaker/changeset/403ef7c82d32/ Cheers, Chris Miles --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: Beaker error
Just to follow up, my problem with Beaker disk-based sessions On Sat, Mar 14, 2009 at 1:24 PM, Michael Bayer mike...@zzzcomputing.com wrote: I'd consider memcached sessions since they don't rely on file locks. On Mar 13, 2009, at 3:31 PM, Mike Orr sluggos...@gmail.com wrote: -- Forwarded message -- From: Michael Bayer mike...@zzzcomputing.com Date: Wed, Mar 11, 2009 at 11:05 AM Subject: Re: Beaker error To: pylons-discuss@googlegroups.com Mike Orr wrote: This site gets the most load, at 1.1 million hits/month. The next-highest site is 228,000. They all have been using Beaker sessions without a problem, until I put session.id in the base controller and then this site started giving errors. Just to follow up, my session problems disappeared. I'm not sure whether it was reinstalling Beaker, or having forgotten to restart the site after moving it to a new virtualenv. But in any case, it's running now on Beaker 1.2.3. I'm still using disk-based sessions. The memcache backend was underdocumented, the cookie backend would have required significant changes to my code to use shorter session values, SQLite gave disk image corruption errors because it didn't like the threading, and MySQL just had an ordinary permission error I could have fixed if I'd been more persistent. One issue in Beaker is there are two SQLAlchemy backends in the code but only one of them works. I think it's the one that's not in the documentation, but I've deleted my INI file already so I'm not sure which one worked. -- Mike Orr sluggos...@gmail.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: Beaker error
On Apr 22, 2009, at 10:48 AM, Mike Orr wrote: Just to follow up, my session problems disappeared. I'm not sure whether it was reinstalling Beaker, or having forgotten to restart the site after moving it to a new virtualenv. But in any case, it's running now on Beaker 1.2.3. I'd highly recommend upgrading to Beaker 1.3 as it fixes critical problems in Beaker 1.2.3, such as sessions failing to time-out, sessions under invalidation conditions not being properly reset, and open read file handles under some high-load conditions during session invalidation. Cheers, Ben smime.p7s Description: S/MIME cryptographic signature
Re: Beaker error
On Tue, Mar 3, 2009 at 1:03 PM, Mike Orr sluggos...@gmail.com wrote: On Tue, Mar 3, 2009 at 12:27 PM, Ben Bangert b...@groovie.org wrote: On Mar 3, 2009, at 12:24 PM, Mike Orr wrote: fcntl.flock(filedescriptor, fcntl.LOCK_EX) TypeError: argument must be an int, or have a fileno() method. Nobody knows about this? I don't, no. Mike Bayer might. Can you try upgrading Beaker just to ensure it wasn't fixed? How do you reproduce? I can't reproduce it on demand. It happened about 6 times this morning between 8 and 9 AM, and once in the last hour. This on a site that gets an average of 26 requests a minute, so it happens in occasional spurts. It started after I began using session.id in a function call in the base controller. I upgraded to Beaker 1.2.3 and Pylons 0.9.7 (from 1.1.2 and 0.9.7rc4), so I guess I'll know tomorrow if that fixes it. It's still happening. 13 requests at 4:45-4:55am, one at 5:00am, and two at 8:21am. I guess I'll see if Beaker can use a MySQL backend. -- Mike Orr sluggos...@gmail.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: Beaker error
these seem like filesystem failures of some kind.what is special about the filesystem where the lockfiles are getting created ? special includes how its mounted, no NFS or similar in use, etc. Mike Orr wrote: On Tue, Mar 3, 2009 at 4:52 PM, Philip Jenvey pjen...@underboss.org wrote: On Mar 2, 2009, at 11:24 AM, Mike Orr wrote: I've started getting an intermittent Beaker error. It happens in the base controller when I pass ``session.id`` to a generic logging routine. However, I have three sites with the same logging code, and it's only happening on one of the sites. It occurs on a variety of URLs. Here's the exception: x = self.do_acquire_write_lock(wait) Module beaker.synchronization:260 in do_acquire_write_lock return False else: fcntl.flock(filedescriptor, fcntl.LOCK_EX) return True fcntl.flock(filedescriptor, fcntl.LOCK_EX) TypeError: argument must be an int, or have a fileno() method. It'd be helpful to know what the value of filedescriptor is when this happens. I'd like to know that too, but the local variables aren't included in the email traceback. :) -- Mike Orr sluggos...@gmail.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: Beaker error
All the disk partitions are local ext3 filesystems; there are no network drives. It's a Dell blade server running Ubuntu 7.04. I have never gotten a disk error on it before. On Thu, Mar 5, 2009 at 9:35 AM, Michael Bayer mike...@zzzcomputing.com wrote: these seem like filesystem failures of some kind. what is special about the filesystem where the lockfiles are getting created ? special includes how its mounted, no NFS or similar in use, etc. Mike Orr wrote: On Tue, Mar 3, 2009 at 4:52 PM, Philip Jenvey pjen...@underboss.org wrote: On Mar 2, 2009, at 11:24 AM, Mike Orr wrote: I've started getting an intermittent Beaker error. It happens in the base controller when I pass ``session.id`` to a generic logging routine. However, I have three sites with the same logging code, and it's only happening on one of the sites. It occurs on a variety of URLs. Here's the exception: x = self.do_acquire_write_lock(wait) Module beaker.synchronization:260 in do_acquire_write_lock return False else: fcntl.flock(filedescriptor, fcntl.LOCK_EX) return True fcntl.flock(filedescriptor, fcntl.LOCK_EX) TypeError: argument must be an int, or have a fileno() method. It'd be helpful to know what the value of filedescriptor is when this happens. I'd like to know that too, but the local variables aren't included in the email traceback. :) -- Mike Orr sluggos...@gmail.com -- Mike Orr sluggos...@gmail.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: Beaker error
what else is different about this app versus the other two ? do all three get similar load ? Mike Orr wrote: All the disk partitions are local ext3 filesystems; there are no network drives. It's a Dell blade server running Ubuntu 7.04. I have never gotten a disk error on it before. On Thu, Mar 5, 2009 at 9:35 AM, Michael Bayer mike...@zzzcomputing.com wrote: these seem like filesystem failures of some kind. what is special about the filesystem where the lockfiles are getting created ? special includes how its mounted, no NFS or similar in use, etc. Mike Orr wrote: On Tue, Mar 3, 2009 at 4:52 PM, Philip Jenvey pjen...@underboss.org wrote: On Mar 2, 2009, at 11:24 AM, Mike Orr wrote: I've started getting an intermittent Beaker error. It happens in the base controller when I pass ``session.id`` to a generic logging routine. However, I have three sites with the same logging code, and it's only happening on one of the sites. It occurs on a variety of URLs. Here's the exception: x = self.do_acquire_write_lock(wait) Module beaker.synchronization:260 in do_acquire_write_lock return False else: fcntl.flock(filedescriptor, fcntl.LOCK_EX) return True fcntl.flock(filedescriptor, fcntl.LOCK_EX) TypeError: argument must be an int, or have a fileno() method. It'd be helpful to know what the value of filedescriptor is when this happens. I'd like to know that too, but the local variables aren't included in the email traceback. :) -- Mike Orr sluggos...@gmail.com -- Mike Orr sluggos...@gmail.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: Beaker error
This site gets the most load, at 1.1 million hits/month. The next-highest site is 228,000. They all have been using Beaker sessions without a problem, until I put session.id in the base controller and then this site started giving errors. On Thu, Mar 5, 2009 at 1:08 PM, Michael Bayer mike...@zzzcomputing.com wrote: what else is different about this app versus the other two ? do all three get similar load ? Mike Orr wrote: All the disk partitions are local ext3 filesystems; there are no network drives. It's a Dell blade server running Ubuntu 7.04. I have never gotten a disk error on it before. On Thu, Mar 5, 2009 at 9:35 AM, Michael Bayer mike...@zzzcomputing.com wrote: these seem like filesystem failures of some kind. what is special about the filesystem where the lockfiles are getting created ? special includes how its mounted, no NFS or similar in use, etc. Mike Orr wrote: On Tue, Mar 3, 2009 at 4:52 PM, Philip Jenvey pjen...@underboss.org wrote: On Mar 2, 2009, at 11:24 AM, Mike Orr wrote: I've started getting an intermittent Beaker error. It happens in the base controller when I pass ``session.id`` to a generic logging routine. However, I have three sites with the same logging code, and it's only happening on one of the sites. It occurs on a variety of URLs. Here's the exception: x = self.do_acquire_write_lock(wait) Module beaker.synchronization:260 in do_acquire_write_lock return False else: fcntl.flock(filedescriptor, fcntl.LOCK_EX) return True fcntl.flock(filedescriptor, fcntl.LOCK_EX) TypeError: argument must be an int, or have a fileno() method. It'd be helpful to know what the value of filedescriptor is when this happens. I'd like to know that too, but the local variables aren't included in the email traceback. :) -- Mike Orr sluggos...@gmail.com -- Mike Orr sluggos...@gmail.com -- Mike Orr sluggos...@gmail.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: Beaker error
On Mon, Mar 2, 2009 at 11:24 AM, Mike Orr sluggos...@gmail.com wrote: I've started getting an intermittent Beaker error. fcntl.flock(filedescriptor, fcntl.LOCK_EX) TypeError: argument must be an int, or have a fileno() method. Nobody knows about this? -- Mike Orr sluggos...@gmail.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: Beaker error
On Mar 3, 2009, at 12:24 PM, Mike Orr wrote: fcntl.flock(filedescriptor, fcntl.LOCK_EX) TypeError: argument must be an int, or have a fileno() method. Nobody knows about this? I don't, no. Mike Bayer might. Can you try upgrading Beaker just to ensure it wasn't fixed? How do you reproduce? Cheers, Ben smime.p7s Description: S/MIME cryptographic signature
Re: Beaker error
On Tue, Mar 3, 2009 at 12:27 PM, Ben Bangert b...@groovie.org wrote: On Mar 3, 2009, at 12:24 PM, Mike Orr wrote: fcntl.flock(filedescriptor, fcntl.LOCK_EX) TypeError: argument must be an int, or have a fileno() method. Nobody knows about this? I don't, no. Mike Bayer might. Can you try upgrading Beaker just to ensure it wasn't fixed? How do you reproduce? I can't reproduce it on demand. It happened about 6 times this morning between 8 and 9 AM, and once in the last hour. This on a site that gets an average of 26 requests a minute, so it happens in occasional spurts. It started after I began using session.id in a function call in the base controller. I upgraded to Beaker 1.2.3 and Pylons 0.9.7 (from 1.1.2 and 0.9.7rc4), so I guess I'll know tomorrow if that fixes it. Is it efficient to use session.id in all requests, even those that don't otherwise use or modify a session? Would that in itself create a persistent session object? Is there a way to get the session ID if a session has been established for this request, or None if not? Because another problem I'm having is that certain requests (all related to RoboHelp static files, which are served by paste.fileapp and requested by RoboHelp's Javascript) are being logged with a different session ID for every hit, which ruins the aggregate session count. One site contains only RoboHelp files and is doing this throughout. Another site uses RoboHelp only for its help section, and the problem seems to be isolated to that section. So I could blame the browser or Javascript, but isn't Beaker generating the session ID? What criteria does it use to determine whether to generate a new ID? Would it be typical for Javascript requests to not send the session cookie, or does the browser just send them automatically? -- Mike Orr sluggos...@gmail.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: Beaker error
On Mar 2, 2009, at 11:24 AM, Mike Orr wrote: I've started getting an intermittent Beaker error. It happens in the base controller when I pass ``session.id`` to a generic logging routine. However, I have three sites with the same logging code, and it's only happening on one of the sites. It occurs on a variety of URLs. Here's the exception: x = self.do_acquire_write_lock(wait) Module beaker.synchronization:260 in do_acquire_write_lock return False else: fcntl.flock(filedescriptor, fcntl.LOCK_EX) return True fcntl.flock(filedescriptor, fcntl.LOCK_EX) TypeError: argument must be an int, or have a fileno() method. It'd be helpful to know what the value of filedescriptor is when this happens. -- Philip Jenvey --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: Beaker error
On Tue, Mar 3, 2009 at 4:52 PM, Philip Jenvey pjen...@underboss.org wrote: On Mar 2, 2009, at 11:24 AM, Mike Orr wrote: I've started getting an intermittent Beaker error. It happens in the base controller when I pass ``session.id`` to a generic logging routine. However, I have three sites with the same logging code, and it's only happening on one of the sites. It occurs on a variety of URLs. Here's the exception: x = self.do_acquire_write_lock(wait) Module beaker.synchronization:260 in do_acquire_write_lock return False else: fcntl.flock(filedescriptor, fcntl.LOCK_EX) return True fcntl.flock(filedescriptor, fcntl.LOCK_EX) TypeError: argument must be an int, or have a fileno() method. It'd be helpful to know what the value of filedescriptor is when this happens. I'd like to know that too, but the local variables aren't included in the email traceback. :) -- Mike Orr sluggos...@gmail.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Beaker error
I've started getting an intermittent Beaker error. It happens in the base controller when I pass ``session.id`` to a generic logging routine. However, I have three sites with the same logging code, and it's only happening on one of the sites. It occurs on a variety of URLs. Here's the exception: URL: http://localhost:8010/search/results Module weberror.errormiddleware:162 in __call__ __traceback_supplement__ = Supplement, self, environ sr_checker = ResponseStartChecker(start_response) app_iter = self.application(environ, sr_checker) return self.make_catching_iter(app_iter, environ, sr_checker) except: app_iter = self.application(environ, sr_checker) Module beaker.middleware:81 in __call__ self.cache_manager) environ[self.environ_key] = self.cache_manager return self.app(environ, start_response) return self.app(environ, start_response) Module beaker.middleware:159 in __call__ headers.append(('Set-cookie', cookie)) return start_response(status, headers, exc_info) return self.wrap_app(environ, session_start_response) def _get_session(self): return self.wrap_app(environ, session_start_response) Module routes.middleware:118 in __call__ environ['SCRIPT_NAME'] = environ['SCRIPT_NAME'][:-1] response = self.app(environ, start_response) # Wrapped in try as in rare cases the attribute will be gone already response = self.app(environ, start_response) Module pylons.wsgiapp:117 in __call__ controller = self.resolve(environ, start_response) response = self.dispatch(controller, environ, start_response) if 'paste.testing_variables' in environ and hasattr(response, response = self.dispatch(controller, environ, start_response) Module pylons.wsgiapp:316 in dispatch if log_debug: log.debug(Calling controller class with WSGI interface) return controller(environ, start_response) def load_test_env(self, environ): return controller(environ, start_response) Module cameo.lib.base:39 in __call__ return WSGIController.__call__(self, environ, start_response) finally: self.sitestats.log_access_pylons(request, response, session.id) self.sitestats.log_referer(request.referer) g.backend.cleanup_request() self.sitestats.log_access_pylons(request, response, session.id) Module paste.registry:137 in __getattr__ def __getattr__(self, attr): return getattr(self._current_obj(), attr) def __setattr__(self, attr, value): return getattr(self._current_obj(), attr) Module beaker.session:463 in __getattr__ def __getattr__(self, attr): return getattr(self._session(), attr) def __setattr__(self, attr, value): return getattr(self._session(), attr) Module beaker.session:459 in _session else: self.__dict__['_sess'] = Session(req, use_cookies=True, **params) return self.__dict__['_sess'] **params) Module beaker.session:103 in __init__ except: if invalidate_corrupt: self.invalidate() else: raise self.invalidate() Module beaker.session:170 in invalidate if hasattr(self, 'namespace'): namespace = self.namespace namespace.acquire_write_lock() try: namespace.remove() namespace.acquire_write_lock() Module beaker.container:113 in acquire_write_lock def acquire_write_lock(self, wait=True): r = self.access_lock.acquire_write_lock(wait) try: if (wait or r): r = self.access_lock.acquire_write_lock(wait) Module beaker.synchronization:172 in acquire_write_lock if state.reentrantcount == 0: x = self.do_acquire_write_lock(wait) if (wait or x): state.reentrantcount += 1 x = self.do_acquire_write_lock(wait) Module beaker.synchronization:260 in do_acquire_write_lock return False else: fcntl.flock(filedescriptor, fcntl.LOCK_EX) return True fcntl.flock(filedescriptor, fcntl.LOCK_EX) TypeError: argument must be an int, or have a fileno() method. The Beaker WSGI variables are: beaker.cachebeaker.cache.CacheManager object at 0x8f5eccc beaker.get_session bound method SessionMiddleware._get_session of beaker.middleware.SessionMiddleware object at 0x8f5ec6c beaker.session Cannot print: argument must be an int, or have a fileno() method. Note that the ``beaker.session`` message is identical to the exception