Hi. I would like to store a BIG files into a DB. Yes, I would like to do it via the session, because there are should be a pool of several files to upload. Well, all is fine except the Session is in the RAM. So when I allow users to store a lot of data in the RAM, server can go down. Is there some trick to store session data in the FS? I mean that session manager, which came with Zope 2.5.x out of the box? There was some link of some author somewhere in Zope.org (Chris McDonough?), but I've missed it and can't repair... -- Regards, Bogdan World domination. Fast. -- Linus Torvalds
On Mon, 2002-10-14 at 11:56, Bo M. Maryniuck wrote:
Hi. I would like to store a BIG files into a DB. Yes, I would like to do it via the session, because there are should be a pool of several files to upload.
FWIW, uploading big files via HTTP is almost always a problem. HTTP POST was not really designed for this. Just a warning.
Well, all is fine except the Session is in the RAM. So when I allow users to store a lot of data in the RAM, server can go down. Is there some trick to store session data in the FS? I mean that session manager, which came with Zope 2.5.x out of the box?
Yes. Just point the session data manager at a different transient session data container (point it to one you create in the main database). See http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/Sessions.stx .
There was some link of some author somewhere in Zope.org (Chris McDonough?), but I've missed it and can't repair...
That's me. ;-) - C
On Monday 14 October 2002 18:11, Chris McDonough wrote:
FWIW, uploading big files via HTTP is almost always a problem. HTTP POST was not really designed for this. Just a warning. Yes, thank you, I know it. Big files will be allowed over Intranet and over the Internet will be limited.
-- Regards, Bogdan Debian Linux will be ideal distro. Soon. -- Bogdan M. Maryniuck
On Monday 14 October 2002 18:11, Chris McDonough wrote:
Yes. Just point the session data manager at a different transient session data container
Erm... What you mean here? :-) There is no such things in doc (or I just blind and watch nothing). Default is /temp_folder/session_data. What is a session_data? Should I do some External Method? If yes, than what it should be: list? dictionary? an open file handler? :/ -- Regards, Bogdan When all else fails, read the instructions.
Step by step: - create a Transient Object Container in your Zope root folder named "iamtoolazytoreadthedocs" ;-) - Navigate to the /session_data_manager object in your root folder and change its Transient Object Container Path from "/temp_folder/session_data" to "/iamtoolazytoreadthedocs" HTH, - C On Mon, 2002-10-14 at 12:41, Bo M. Maryniuck wrote:
On Monday 14 October 2002 18:11, Chris McDonough wrote:
Yes. Just point the session data manager at a different transient session data container
Erm... What you mean here? :-) There is no such things in doc (or I just blind and watch nothing). Default is /temp_folder/session_data. What is a session_data? Should I do some External Method? If yes, than what it should be: list? dictionary? an open file handler? :/
-- Regards, Bogdan
When all else fails, read the instructions.
On Monday 14 October 2002 18:51, Chris McDonough wrote:
Step by step:
- create a Transient Object Container in your Zope root folder named "iamtoolazytoreadthedocs" ;-)
Umm... I'm not lazy to rtfm! ;-) But I just haven't understood this hocus-pokus trick & mystical magic. Did You mean that creating two Transient Object Containers with the name "blah" and the name "session_data" will store in _different_ storages (first in the FS, other in the RAM)? -- Regards, Bogdan As of 2.91, these bugs have all been fixed. We look forward to new ones, well, not exactly... -- libstdc++-v3 FAQ
On Mon, 2002-10-14 at 13:10, Bo M. Maryniuck wrote:
On Monday 14 October 2002 18:51, Chris McDonough wrote:
Step by step:
- create a Transient Object Container in your Zope root folder named "iamtoolazytoreadthedocs" ;-)
Umm... I'm not lazy to rtfm! ;-) But I just haven't understood this hocus-pokus trick & mystical magic. Did You mean that creating two Transient Object Containers with the name "blah" and the name "session_data" will store in _different_ storages (first in the FS, other in the RAM)?
There is really no magic here. ;-) A session data manager stores its session data in one transient object container, referenced by the "Transient Object Container Path" in its setup. If you change this value in the "default" session data manager (/session_data_manager), your session data will be stored in the transient object container you change it to. The default transient object container (at '/temp_folder/session_data') stores data in RAM because 'temp_folder" is a mounted RAM-backed database. If you place one at '/iamtoolazytoreadthedocs', you are placing it into the "main" database (which stores stuff into Data.fs), which is not RAM-based. This is explained in the docs, as far as I can tell. - C
On Monday 14 October 2002 19:23, Chris McDonough wrote:
The default transient object container (at '/temp_folder/session_data') stores data in RAM because 'temp_folder" is a mounted RAM-backed database. Ah! That's what I've missed during quick reading... Thank You much!
-- Regards, Bogdan We don't care. We don't have to. We're the Phone Company.
participants (2)
-
Bo M. Maryniuck -
Chris McDonough