[dev] Unserialize/cache problems

Michael M Slusarz slusarz at horde.org
Fri Mar 9 04:47:16 UTC 2007


Quoting Chuck Hagenbuch <chuck at horde.org>:

> Due to the unserialization changes, this happens every time i purge
> deleted messages:
>
> Fatal error: IMP_MailboxCache::retrieve() [<a
> href='function.IMP-MailboxCache-retrieve'>function.IMP-MailboxCache-retrieve</a>]: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition &quot;MIME_Message&quot; of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition in /var/www/horde/imp/lib/IMAP/MailboxCache.php on  
> line
> 276

As an aside: my impetus for changing/fixing this was because I was  
getting out-of-memory errors when accessing large mailboxes.  I have  
been running lately with a 16M limit, and have had no other problems  
(this in and of itself indicates that all the changes we've been  
making lately in terms of memory usage is paying off).  Unfortunately,  
it looks like for at least modest data sizes (say 1 MB), the PHP gz  
functions are allocating at least 6x as much for memory, and  
subsequent calls do not use this same memory - more memory needs to be  
allocated.  This may be more of an issue with the way PHP calculates  
memory usage rather than actual memory usage, but it is irrelevant  
because it causes us to exceed the memory limit.

With these changes, I don't see these problems anymore.

Finally, if some others running HEAD would be willing to set their  
memory limits lower (i.e. 16M or 24M) to scope out code that could be  
rewritten to be more memory efficient, that would be great.

michael

___________________________________
Michael Slusarz [slusarz at horde.org]



More information about the dev mailing list