Using a different location for var folder?

Because the files in the var folder (like blobstorage and Data.fs) are so huge, I wanted to change the location of it to a different drive that has more storage space. I'm SOOO close to getting this to work, but it's running into a problem. Here's what I did so far:

  • in base.cfg changed all instances of var = ${buildout:var-dir} to var = /mnt/volume_nyc1_01/var
  • in buildout.cfg I changed var-dir=/mnt/volume_nyc1_01/var
  • I created the /mnt/volume_nyc1_01/var folder and set all the permissions to look exactly like the old var folder permissions, and also copied over all the files and set their permissions to look just like the old location as well
  • I stopped Plone and killed all Plone related processes
  • I ran buildout
  • I started Plone again

It appears to be working from the command line. No errors, and it says:

zeoserver: . . . . . . . 
daemon process started, pid=2770
client1: . 
daemon process started, pid=2777
client2: . 
daemon process started, pid=2786

However, when I try to access it via the browser, it says site cannot be reached. When I look at the new var location (/mnt/volume_nyc1_01/var) there are indeed new files there! So it's finding it and writing to it. However, when I look at the zeoserver.log it shows me this:

2023-01-26T17:05:01 daemonizing the process
2023-01-26T17:05:01 set current directory: '/opt/plone/zeocluster/parts/zeoserver'
2023-01-26T17:05:01 daemon manager started
2023-01-26T17:05:01 spawned process pid=2767
2023-01-26T17:05:01 (2767) created PID file '/mnt/volume_nyc1_01/var/zeoserver/'
2023-01-26T17:05:01 (2767) opening storage '1' using FileStorage
2023-01-26T17:05:01 (2767) removed PID file '/mnt/volume_nyc1_01/var/zeoserver/'
2023-01-26T17:05:01 sleep 1 to avoid rapid restarts
2023-01-26T17:05:01 pid 2767: exit status 1
2023-01-26T17:05:02 spawned process pid=2768
2023-01-26T17:05:02 (2768) created PID file '/mnt/volume_nyc1_01/var/zeoserver/'
2023-01-26T17:05:02 (2768) opening storage '1' using FileStorage
2023-01-26T17:05:02 (2768) removed PID file '/mnt/volume_nyc1_01/var/zeoserver/'
2023-01-26T17:05:02 sleep 2 to avoid rapid restarts
2023-01-26T17:05:02 pid 2768: exit status 1
2023-01-26T17:05:04 spawned process pid=2769
2023-01-26T17:05:04 (2769) created PID file '/mnt/volume_nyc1_01/var/zeoserver/'
2023-01-26T17:05:04 (2769) opening storage '1' using FileStorage
2023-01-26T17:05:04 (2769) removed PID file '/mnt/volume_nyc1_01/var/zeoserver/'
2023-01-26T17:05:05 sleep 3 to avoid rapid restarts
2023-01-26T17:05:05 pid 2769: exit status 1
2023-01-26T17:05:08 spawned process pid=2770
2023-01-26T17:05:08 (2770) created PID file '/mnt/volume_nyc1_01/var/zeoserver/'
2023-01-26T17:05:08 (2770) opening storage '1' using FileStorage
2023-01-26T17:05:08 (2770) removed PID file '/mnt/volume_nyc1_01/var/zeoserver/'
2023-01-26T17:05:08 sleep 4 to avoid rapid restarts
2023-01-26T17:05:08 pid 2770: exit status 1
2023-01-26T17:05:12 spawned process pid=2780
2023-01-26T17:05:12 (2780) created PID file '/mnt/volume_nyc1_01/var/zeoserver/'
2023-01-26T17:05:12 (2780) opening storage '1' using FileStorage
2023-01-26T17:05:12 (2780) removed PID file '/mnt/volume_nyc1_01/var/zeoserver/'
2023-01-26T17:05:13 sleep 5 to avoid rapid restarts
2023-01-26T17:05:13 pid 2780: exit status 1
2023-01-26T17:05:18 spawned process pid=2789
2023-01-26T17:05:18 (2789) created PID file '/mnt/volume_nyc1_01/var/zeoserver/'
2023-01-26T17:05:18 (2789) opening storage '1' using FileStorage
2023-01-26T17:05:18 (2789) removed PID file '/mnt/volume_nyc1_01/var/zeoserver/'
2023-01-26T17:05:18 sleep 6 to avoid rapid restarts
2023-01-26T17:05:18 pid 2789: exit status 1
2023-01-26T17:05:24 spawned process pid=2791
2023-01-26T17:05:24 (2791) created PID file '/mnt/volume_nyc1_01/var/zeoserver/'
2023-01-26T17:05:24 (2791) opening storage '1' using FileStorage
2023-01-26T17:05:24 (2791) removed PID file '/mnt/volume_nyc1_01/var/zeoserver/'
2023-01-26T17:05:24 sleep 7 to avoid rapid restarts
2023-01-26T17:05:24 pid 2791: exit status 1
2023-01-26T17:05:31 spawned process pid=2792
2023-01-26T17:05:32 (2792) created PID file '/mnt/volume_nyc1_01/var/zeoserver/'
2023-01-26T17:05:32 (2792) opening storage '1' using FileStorage
2023-01-26T17:05:32 (2792) removed PID file '/mnt/volume_nyc1_01/var/zeoserver/'
2023-01-26T17:05:32 sleep 8 to avoid rapid restarts
2023-01-26T17:05:32 pid 2792: exit status 1
2023-01-26T17:05:40 spawned process pid=2793
2023-01-26T17:05:40 (2793) created PID file '/mnt/volume_nyc1_01/var/zeoserver/'
2023-01-26T17:05:40 (2793) opening storage '1' using FileStorage
2023-01-26T17:05:40 (2793) removed PID file '/mnt/volume_nyc1_01/var/zeoserver/'
2023-01-26T17:05:40 sleep 9 to avoid rapid restarts
2023-01-26T17:05:40 pid 2793: exit status 1
2023-01-26T17:05:49 spawned process pid=2798
2023-01-26T17:05:49 (2798) created PID file '/mnt/volume_nyc1_01/var/zeoserver/'
2023-01-26T17:05:49 (2798) opening storage '1' using FileStorage
2023-01-26T17:05:49 (2798) removed PID file '/mnt/volume_nyc1_01/var/zeoserver/'
2023-01-26T17:05:50 restarting too frequently; quit

Anyone know what this means? And how to fix it? Thanks in advance

Tried restarting it again, and looked in /mnt/volume_nyc1_01/var/zeoserver folder before the deamon quit and this is the contents of that folder:

srwx------ 1 plone_buildout plone_group    0 Jan 26 17:38 zeo.zdsock=
-rw-r--r-- 1 plone_buildout plone_group 7782 Jan 26 17:38 zeoserver.log

Does that look weird to anyone?

which user is running the zeo process ? Anyway, replicate the same folder permissions of the original folder.

Ah! You're a genius. I accidentally used plone_buildout to start the zeo process instead of plone_daemon


Thanks so much, it works now

1 Like