http://groups.google.com/group/web2py/browse_thread/thread/b587b14f451da0f8/
and resulted in the same problems using sqlite:memory: :)
Robin B suggested a 'RAMDB':
> No one has published a 'RAMDB' (a DAL driver for RAM). It could
> easily be implemented as a global dict, and it could be useful for say
> caching, but I would not put sessions into ram for production. If you
> have more than 1 application server/process, you will not be able to
> share sessions between them. RAMDB would however be very useful for
> development. :)
>
> Robin
Markus
Regards
--
Kuba
"Is there a way" in web2py to place sqlite database somewhere else
than "databases" folder ?
I couldn't quickly find info about it on the web.
As "somewhere else" I mean also a subfolder of "databases" folder.
Than we could have both type of storages in one app.
The problem is I have to mount /dev/ramX ON A FOLDER. I've tested it
with "databases" but this way we could loose a lot of important data
on an unexpected reboot ;)
--
Kuba
On modern linux distros it is as easy as:
mount -t tmpfs tmpfs $folder_path -o rw,size=$size
where:
$folder_path is a path to the folder you wish to make "turbocharged"
$size is the amount of memory you want to dedicate( M - megabytes )
for example:
mount -t tmpfs tmpfs /usr/local/web2py/applications/example/cache -o
rw,size=200M
mount -t tmpfs tmpfs /usr/local/web2py/applications/example/sessions
-o rw,size=200M
you can of course do something like that:
mkdir /usr/local/web2py/applications/example/databases/ramdisk/
mount -t tmpfs tmpfs
/usr/local/web2py/applications/example/databases/ramdisk/ -o
rw,size=20M
and then
SQLDB('sqlite:///usr/local/web2py/applications/example/databases/ramdisk/ramstorage.db')
--
Kuba
it seems like "on modern linux distros" you don't have to pass extra
parameters to kernel anymore (to have ram-type disk). It has been a
while since I used it.
Sory if I scared someone ;)
--
Kuba
--
Kuba