Re: [cherrypy-users] MemoryError on cherrypy application hosted on pythonanywhere.com

53 views
Skip to first unread message

Joel Rivera

unread,
May 20, 2013, 5:23:56 AM5/20/13
to cherryp...@googlegroups.com
Hi Giorgos,

how much data are you storing in the sessions?, how much sessions files
does it have in the temporary directory and what is the timeout value
of the sessions?

Cheers.

On Sat, 18 May 2013 04:10:18 -0700 (PDT)
Giorgos Tzampanakis <giorgos.t...@gmail.com> wrote:

> I have a cherrypy application hosted on pythonanywhere.com. The
> application receives very low traffic (very rarely do I see more than
> 2 concurrent users), but still I see MemoryErrors very frequently,
> for example:
> ENGINE Error in background task thread function <bound method
> FileSession.clean_up of <cherrypy.lib.sessions.FileSession object at
> 0x4bc2e50>>.
> Traceback (most recent call last):
> File
> "/usr/local/lib/python2.7/site-packages/cherrypy/process/plugins.py",
> line 485, in run
> self.function(*self.args, **self.kwargs)
> File
> "/usr/local/lib/python2.7/site-packages/cherrypy/lib/sessions.py",
> line 494, in clean_up contents = self._load(path)
> File
> "/usr/local/lib/python2.7/site-packages/cherrypy/lib/sessions.py",
> line 441, in _load return pickle.load(f)
> MemoryError
>
> or even
>
> MemoryError: (12, 'Cannot allocate memory -- malloc: 9127: Cannot
> allocate memory')
>
> Pythonanywhere have let me know that my applicaiton is using about 70
> MB resident memory and about 512 MB of virtual memory (512 MB being
> the maximum allowed, hence the MemoryErrors).
>
> I'm at a loss trying to solve this problem. Locally my application
> never uses more than 130 MB of virtual memory.
>
> Are there any known cherrypy issues at work here? Any help will be
> greatly appreciated.
>



--
Rivera²
Reply all
Reply to author
Forward
0 new messages